Simple and easy carousels for React. Copy-paste ready carousel components for your apps, like shadcn.
- Lightweight CSS-based transitions (no animation library required)
- Drag/swipe support for touch and mouse
- Loop navigation
- Controlled and uncontrolled modes
- Customizable indicators and navigation
- Accessible with ARIA labels
- Dark mode support
Copy the carousel component into your project:
npx shadcn@latest add https://carouselcn.dev/r/carousel.jsonOr manually copy from registry/components/ui/carousel.tsx.
import {
Carousel,
CarouselContent,
CarouselItem,
CarouselNavigation,
CarouselIndicator,
} from "@/components/ui/carousel";
export function Demo() {
return (
<Carousel>
<CarouselContent>
<CarouselItem>Slide 1</CarouselItem>
<CarouselItem>Slide 2</CarouselItem>
<CarouselItem>Slide 3</CarouselItem>
</CarouselContent>
<CarouselNavigation />
<CarouselIndicator />
</Carousel>
);
}See Docs for available props and API.
pnpm install
pnpm devOpen http://localhost:3000 to see the documentation site.
See CONTRIBUTING.md for guidelines on adding features, demos, and examples.
MIT
Created by mnove.
Check out more of my work at marcellonovelli.com.