- Components
- Data display
Carousel
embla-carousel with pill outline prev/next buttons and optional dots. Arrow keys scroll while it has focus.
Installation#
npx shadcn add @ortaui/carouselExamples#
Default#
1
2
3
4
5
With dots, several per view#
1
2
3
4
5
Vertical#
1
2
3
4
5
API reference#
| Prop | Type | Default | Description |
|---|---|---|---|
| opts | EmblaOptionsType | - | embla options (align, loop, slidesToScroll ...). |
| plugins | EmblaPluginType[] | - | embla plugins (autoplay ...). |
| orientation | "horizontal" | "vertical" | "horizontal" | Scroll axis. |
| setApi | (api: CarouselApi) => void | - | Receives the embla API. |
| CarouselDots | component | - | One dot per snap point; the current dot stretches into a pill. |