Preview

Installation

<> import.ts
import { ImageCarousel } from "@/components/ui/image-carousel"

Code

<> component.tsx
import { ImageCarousel } from "@/components/ui/image-carousel"

<ImageCarousel />

API Reference

ImageCarousel

A slick-powered image carousel with pagination, arrows, and autoplay.

<> import.ts
import { ImageCarousel } from "@/components/ui/image-carousel"

Props

PropTypeDefaultDescription
data
Array<{ id: number | string; title: string; subtitle: string; image: string }>Slides to render
itemsPerView
number3Slides visible at once (responsive caps apply)
showPagination
booleantrueShow dot indicators
autoPlay
booleanfalseEnable autoplay
autoPlaySpeed
number3000Autoplay interval in ms
showArrows
booleantrueShow previous/next arrows
arrowsInside
booleanfalsePlace arrows inside the slide area

Examples

Example 1
<> example.tsx
// Basic
<ImageCarousel />
Example 2
<> example.tsx
// Two per view, autoplay
<ImageCarousel itemsPerView={2} autoPlay autoPlaySpeed={4000} />