문서 콘텐츠와 미디어

UICarousel

여러 슬라이드를 순서대로 탐색합니다.

기본 사용법

슬라이드 전환

slides에 항목을 전달합니다. 이전과 다음 버튼과 표시점을 눌러 이동합니다.

<script setup lang="ts">
import { UICarousel } from "@connextable/ui";
import { ref } from "vue";

const slides = [
  {
    id: "foundation",
    title: "디자인 토큰",
    description: "색상, 간격, 모서리 정책을 한곳에서 확인합니다.",
  },
  {
    id: "adapters",
    title: "접근성 패턴",
    description: "키보드로 탐색할 수 있는 기본 조작을 익힙니다.",
  },
  {
    id: "frameworks",
    title: "컴포넌트 예제",
    description: "완성된 예제를 열어 조합과 상태를 확인합니다.",
  },
];

const activeSlide = ref<string | null>("foundation");
</script>

<template>
  <UICarousel
    v-model="activeSlide"
    :slides="slides"
    label="디자인 시스템 둘러보기"
    indicators
  />
</template>

설정과 동작

점 버튼을 눌러 해당 슬라이드로 이동합니다. 채워진 점이 현재 슬라이드를 나타냅니다.

슬라이드 전환을 기다린 뒤 일시 정지 버튼을 누릅니다. 같은 자리에서 자동 재생을 다시 시작할 수 있습니다.

Viewport로 Track의 넘침을 제한합니다.

구성 컴포넌트

구조와 배치

UICarouselIndicatorGroup

슬라이드마다 연결된 이동 버튼을 묶습니다.

인디케이터로 바로 이동 예제
UICarouselSlide

슬라이드 하나와 그 식별자를 연결합니다.

인디케이터로 바로 이동 예제

팝업과 위치

UICarouselViewport

스크롤하거나 별도 위치에 표시할 콘텐츠의 영역입니다.

보이는 슬라이드 영역 예제

탐색과 동작

UICarouselPrevious

직전 항목, 단계 또는 페이지로 이동합니다.

인디케이터로 바로 이동 예제
UICarouselNext

다음 항목, 단계 또는 페이지로 이동합니다.

인디케이터로 바로 이동 예제
UICarouselPause

슬라이드의 자동 재생을 일시 정지하거나 다시 시작합니다.

자동 전환과 일시 정지 예제

값과 상태 표시

UICarouselTrack

값이나 슬라이드가 이동하는 바탕 영역입니다.

인디케이터로 바로 이동 예제
UICarouselIndicator

해당 슬라이드로 이동하고 현재 슬라이드를 표시합니다.

인디케이터로 바로 이동 예제

주요 API

속성과 모델

v-model타입string | null | undefined

현재 슬라이드 id를 외부 상태에 연결합니다.

인디케이터로 바로 이동 예제
slides타입readonly (string | Slide)[]

슬라이드의 id, 제목과 설명을 지정합니다.

인디케이터로 바로 이동 예제
indicators타입boolean | undefined

슬라이드 이동 표시점을 표시합니다.

슬라이드 전환 예제
default-value타입string | null | undefined

처음 표시할 슬라이드의 id입니다.

Slide / Indicator value

슬라이드와 이동 표시를 같은 항목에 연결합니다.

슬롯

#slide타입(state: { slide: Slide; }) => VNodeChild

현재 slide 데이터로 본문을 직접 구성합니다.

전체 속성, 이벤트와 슬롯

UICarousel

as
PrimitiveAs | undefined
as-child
boolean | undefined
disabled
boolean | undefined
label
string | undefined
model-value
string | null | undefined
default-value
string | null | undefined
@update:model-value
(_value: string | null) => any
orientation
"horizontal" | "vertical" | undefined
policies
CarouselPolicies | undefined
paused
boolean | undefined
default-paused
boolean | undefined
autoplay
boolean | CarouselAutoplayOptions | undefined
get-slide-label
((id: string, index: number, count: number) => string) | undefined
get-indicator-label
((id: string, index: number, count: number) => string) | undefined
indicator-group-label
string | undefined
get-pause-label
((paused: boolean) => string) | undefined
@announce
(_value: string) => any
@update:paused
(_value: boolean) => any
slides필수
readonly (string | Slide)[]
indicators
boolean | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild
#slide
(state: { slide: Slide; }) => VNodeChild

UICarouselViewport

as-child
boolean | undefined
as
PrimitiveAs | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild

UICarouselTrack

as-child
boolean | undefined
as
PrimitiveAs | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild

UICarouselIndicatorGroup

as-child
boolean | undefined
as
PrimitiveAs | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild

UICarouselPrevious

as-child
boolean | undefined
as
PrimitiveAs | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild

UICarouselNext

as-child
boolean | undefined
as
PrimitiveAs | undefined
#default
(props: CarouselRootSlotProps) => VNodeChild

UICarouselPause

as
PrimitiveAs | undefined
as-child
boolean | undefined
#default
(props: { value: string | null; index: number | null; count: number; paused: boolean; disabled: boolean; }) => any

UICarouselSlide

value필수
string
as
PrimitiveAs | undefined
as-child
boolean | undefined
force-present
boolean | undefined
#default
(props: { value: string; active: boolean; index: number | null; count: number; paused: boolean; disabled: boolean; }) => any

UICarouselIndicator

as
PrimitiveAs | undefined
as-child
boolean | undefined
value필수
string
#default
(props: CarouselSlideSlotProps) => VNodeChild