Carousel
Accessible slide carousel with prev/next, dots, drag and swipe, keyboard arrows, loop and pausable autoplay.
Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
CarouselProps
Also accepts all props of Omit<React.ComponentProps<"section">, "children">
| Prop | Type | Default | Description |
|---|---|---|---|
| slides* required | CarouselSlide[] | — | — |
| loop | boolean | false | Wrap from the last slide to the first (and back) |
| autoplay | boolean | false | — |
| interval | number | 4500 | Autoplay delay in ms |
| showDots | boolean | true | — |
| showArrows | boolean | true | — |
| label | string | "Carousel" | Accessible name of the carousel |
Install
$ npx shadcn@latest add https://chromotion.dev/r/carousel.json