Preview
Installation
<> import.ts
import { BeautifulImageCarousel, BeautifulCardCarousel } from "@/components/ui/carousel"Code
<> component.tsx
import { Carousel } from "@/components/ui/carousel"
<Carousel />API Reference
Carousel
A card carousel with images and textual content, built on slick.
<> import.ts
import { BeautifulCardCarousel } from "@/components/ui/carousel"Props
| Prop | Type | Default | Description |
|---|---|---|---|
data | Array<{ id: number | string; title: string; subtitle: string; description: string; image: string; gradient?: string }> | — | Card slides to render |
itemsPerView | number | 3 | Cards visible at once |
showPagination | boolean | true | Show dot indicators |
autoPlay | boolean | false | Enable autoplay |
autoPlaySpeed | number | 5000 | Autoplay interval in ms |
showArrows | boolean | true | Show previous/next arrows |
arrowsInside | boolean | false | Place arrows inside the slide area |
Examples
Example 1
<> example.tsx
// Basic carousel
<BeautifulCardCarousel />Example 2
<> example.tsx
// Two cards per view
<BeautifulCardCarousel itemsPerView={2} />Example 3
<> example.tsx
// With autoplay and inside arrows
<BeautifulCardCarousel
itemsPerView={2}
autoPlay={true}
autoPlaySpeed={4000}
arrowsInside={true}
/>