Carousel

Embla-based carousel primitives for swipeable content.

Quick Preview

Apartment
Duplex
Terrace

Composition

Use this public composition when building Carousel:

Carousel
├── CarouselContent
│   └── CarouselItem
├── CarouselPrevious
├── CarouselNext
└── CarouselIndicator

Usage

<Carousel><CarouselContent><CarouselItem>Slide 1</CarouselItem></CarouselContent></Carousel>

Examples

Arrows and the windowed dot indicator float over the slides on a glass chrome. Keyboard arrows follow the scroll axis.

Apartment
Duplex
Terrace

Orientation

Use vertical orientation when the carousel lives in a tall media slot or sidebar. Up/Down arrow keys drive vertical carousels.

Apartment
Duplex
Terrace

Props

Prop/APITypeDefaultDescription
orientation`"horizontal""vertical"`"horizontal"
size`"sm""md""lg"`
imageSize`"sm""md""lg"
opts / pluginsEmbla options/plugins-Forwarded to Embla carousel.
setApi(api: CarouselApi) => void-Exposes the Embla API for external control.
count / selected / onSelectnumber / number / (index) => voidfrom contextCarouselIndicator overrides for standalone use.
classNamestring-Local layout or spacing overrides.
native/root propsReact component props-Passed through to the underlying root or primitive.

Accessibility

  • Preserve the documented Carousel composition so labels, triggers, content, and controls remain connected.
  • The root is a region with aria-roledescription="carousel"; slides are groups with aria-roledescription="slide".
  • Arrow keys (matching the orientation) move between slides when focus is inside the carousel.
  • Provide visible labels or accessible names for interactive controls.
  • Do not communicate state with color alone; include text, icons, or helper copy.

On this page