3D Carousel
betaA 3D carousel of cards — a fanned arc or a CoverFlow path — with buttons, dots, arrow keys and swipe.
- Display
- 1 file
- 1 npm package
- Accessibility notes
Loading the example…
pnpm dlx @dowel-ui/cli add carousel-3dnpm packages installed: class-variance-authority.
import { Carousel3D } from "@/components/ui/carousel-3d";Default
Cover Flow
Gallery
Controlled
Right To Left
Custom Content
<Carousel3D>
| Prop | Type | Default |
|---|---|---|
items (required) | Carousel3DItem[] | — |
defaultIndexInitial slide when uncontrolled. Defaults to the middle one, as in the source. | number | — |
dotsLabelName of the dot list. | string | "Slides" |
indexControlled index of the current slide. | number | — |
loopWrap from the last slide to the first, and back. The strip rewinds rather than circling. | boolean | false |
nextLabel | string | "Next slide" |
onIndexChange | (index: number) => void | — |
previousLabel | string | "Previous slide" |
size | "sm" | "md" | "lg" | "md" |
slideLabelLabel of each slide, announced with its position. | (index: number, count: number) => string | (i, count) => `${String(i + 1)} of ${String(count)}` |
spread | "hover" | "always" | "never" | "hover" |
tone | "media" | "mono" | "media" |
variant | "arc" | "coverflow" | "arc" |
Plus every attribute of <section> except children.
Follows the APG tabbed carousel: a region with aria-roledescription="carousel", slides that are tabpanels with aria-roledescription="slide" and a position label, named previous/next buttons, and a tablist of dots with a roving tab stop. Arrow keys (mirrored in right-to-left layouts), Home and End move between slides anywhere in the carousel; changes are announced through a polite status. Only the current slide is in the accessibility tree and tab order — the neighbours are inert, and clicking one selects it. Swipe is a pointer convenience with button, dot and key equivalents. It never rotates on its own. Motion stops under reduced motion.
10/10
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — passes
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — passes
- className merged — passes
- Visible focus — passes
- No fixed widths — passes