Carousel
Scroll-snap carousel — native swipe momentum, arrows, dots, keyboard, multi-slide widths and pausable autoplay.
2 files · 131 locdeps: clsx, tailwind-merge
Installation
With the shadcn CLI, pointing at this platform’s registry:
npx shadcn@latest add https://opusui.131199999.xyz/r/carousel.jsonOr offline, straight from your opus55 checkout (copies every file it needs):
node ../tailwind_component/opus55/scripts/add.mjs carouselUsage
import { Carousel } from "@/components/opus/ui/carousel";
<Carousel autoplay={4000}>{slides}</Carousel>API
| Prop | Type | Default | Description |
|---|---|---|---|
| slideWidth | string | "100%" | CSS width per slide. |
| gap | number | 16 | Gap (px). |
| autoplay | number | 0 | ms between slides (pauses on hover/focus). |
| loop / showDots / showArrows | boolean | true | Behaviour. |