Carousel
A horizontally scrolled row of peers, on native scroll snap. Never auto-advances.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A horizontally scrolled row of peers, on native scroll snap.
Accessibility
Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.
Install and import
npx shadcn@latest add @prism/carousel
import { Carousel } from '@/components/prism/Carousel';
In a no-build prototype, read it from the bundle instead: const { Carousel } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
label | React.ReactNode | — | |
snap | "start" | "center" | — | Scroll-snap alignment for children. |
peek | boolean | — | Leave the next item partly visible, so the row is obviously scrollable. |
children | React.ReactNode | — | |
className | string | — |