About
A draggable, swipeable image/content slider with arrows, dot pagination, thumbnails, autoplay, fade, and auto-height, for showcasing photo galleries or product shots one slide at a time.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Carousel to your project and fits it to your theme.
Code
How Carousel is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import {
Carousel,
CarouselContent,
CarouselSlide,
CarouselPagination,
} from "@/components/ui/carousel";
const SLIDES = [1, 5, 4, 7, 6];
export default function CarouselAutoplay() {
return (
<div className="w-full max-w-xl pb-8">
<Carousel loop autoplay={{ delay: 4000, resumeAfter: 3000 }}>
<CarouselContent>
{SLIDES.map((n) => (
<CarouselSlide key={n}>
<img
src={`https://appica.dev/carousel/slide-${n}.jpg`}
alt={`Slide ${n}`}
className="aspect-3/2 w-full rounded-xl object-cover"
/>
</CarouselSlide>
))}
</CarouselContent>
<CarouselPagination className="absolute inset-x-0 top-full mt-5 justify-center" />
</Carousel>
</div>
);
}














