v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS
Carousel
Manually navigate a named set of slides.
Interactive preview
1 / 3
Usage
import { Carousel } from "@devvy-ui/react";
<Carousel label="Project studies" slides={[<p key="one">Orbit</p>,<p key="two">Field notes</p>]} />API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| slides | readonly ReactNode[] | required | Slide content. |
| value / defaultValue | number | 0 | Visible zero-based index. |
| onValueChange | (index: number) => void | — | Slide callback. |
Accessibility & behavior
Platform Behavior & Guidelines
No autoplay or motion dependence. Native previous/next buttons, hidden inactive slides and a polite position status support keyboard and touch.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add carouselMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Carousel.tsxREACT / TSX
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.