Carousel
A carousel with motion and swipe, built with Embla. Supports sizes, spacing, orientation, and the Embla API.
Default
A basic carousel with previous and next controls.
Installation
CLI
Also needs
npx @sonojs/ui@latest add button && npm i embla-carousel-react lucide-reactUsage
carousel.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| opts | CarouselOptions | — | Embla options such as align, loop, and direction. |
| orientation | "horizontal" · "vertical" | "horizontal" | Scroll axis of the carousel. |
| plugins | CarouselPlugin | — | Embla plugins (for example Autoplay). |
| setApi | (api: CarouselApi) => void | — | Receives the Embla API once the carousel is ready. |