UI Components
Carousel
A touch-friendly carousel powered by Embla Carousel with arrows, dot pagination, autoplay, loop, and multi-slide views.
Quick Preview
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Installation
npm install embla-carousel-react
// Copy Carousel.tsx to your components/ui/ folder// src/components/ui/Carousel.tsx
Usage
import { Carousel } from '@/components/ui/Carousel'<Carousel loop autoplay autoplayDelay={3000} showDots showArrows><div className="bg-teal-400 rounded-xl h-48">Slide 1</div><div className="bg-blue-400 rounded-xl h-48">Slide 2</div><div className="bg-purple-400 rounded-xl h-48">Slide 3</div></Carousel>
Examples
Cards โ 2 per view
๐จ
Design Systems
Consistent, scalable design for your team
๐งฉ
Component Library
Reusable components built with care
๐
Dark Mode
Beautiful in every lighting condition
โฟ
Accessibility
Inclusive design for everyone
Looping + autoplay
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Prompt Preview
Copy a prompt that recreates this UI
Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.
Copy-ready AI prompt
Starts from the current visual reference and project constraints.
Tweak only product-specific copy or data after the first generation pass.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children* | React.ReactNode[] | - | Array of slide elements |
loop | boolean | false | Loop carousel infinitely |
autoplay | boolean | false | Auto-advance slides |
autoplayDelay | number | 3000 | Milliseconds between auto-advances |
showArrows | boolean | true | Show prev/next arrow buttons |
showDots | boolean | true | Show pagination dots |
slidesPerView | number | 1 | Number of slides visible at once |
gap | number | 16 | Gap in pixels between slides |