Ali Imam

Carousel

Galleries 183

About

Carousel with auto animation

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 } from "@/components/ui/carousel";
import Link from "next/link";
import { Button } from "@/components/ui/button";

export default function DemoOne() {
  return (
    <div className="">
      <Carousel
        slides={[
          <div
            key={"4"}
            className="border h-full w-full relative overflow-hidden rounded-md bg-card text-card-foreground"
          >
            <div className="w-full h-full overflow-hidden"> 
              <img
                src="https://raw.githubusercontent.com/aliimam-in/aliimam/refs/heads/main/apps/www/public/templates/ai-icons.jpg" 
                className="object-cover h-full w-full"
              /> 
            </div>
          </div>,
          <div
            key={"1"}
            className="border h-full w-full relative overflow-hidden rounded-md bg-card text-card-foreground"
          >
            <div className="w-full h-full overflow-hidden"> 
              <img
                src="https://raw.githubusercontent.com/aliimam-in/aliimam/refs/heads/main/apps/www/public/works/social-media-posts.jpg" 
                className="object-cover h-full w-full"
              /> 
            </div>
          </div>,
          <div
            key={"2"}
            className="border h-full w-full relative overflow-hidden rounded-md bg-card text-card-foreground"
          >
            <div className="w-full h-full overflow-hidden"> 
              <img
                src="https://raw.githubusercontent.com/aliimam-in/aliimam/refs/heads/main/apps/www/public/works/dalim.jpg" 
                className="object-cover h-full w-full"
              /> 
            </div>
          </div>,
          <div
            key={"3"}
            className="border h-full w-full relative overflow-hidden rounded-md bg-card text-card-foreground"
          >
            <div className="w-full h-full overflow-hidden"> 
              <img
                src="https://raw.githubusercontent.com/aliimam-in/aliimam/refs/heads/main/apps/www/public/works/website-designs.jpg" 
                className="object-cover h-full w-full"
              /> 
            </div>
          </div>, 
          <div
            key={"5"}
            className="border h-full w-full relative overflow-hidden rounded-md bg-card text-card-foreground"
          >
            <div className="w-full h-full overflow-hidden"> 
              <img
                src="https://raw.githubusercontent.com/aliimam-in/aliimam/refs/heads/main/apps/www/public/templates/ai-logos.jpg" 
                className="object-cover h-full w-full"
              /> 
            </div>
          </div>,
        ]}
      />
      <Link className="flex justify-center mt-10" href="https://aliimam.in/works">
        <Button className="h-14 cursor-pointer rounded-full px-10">
          See All Works
        </Button>
      </Link>
    </div>
  );
}

Dependencies

More by Ali Imam

View all
  • Liquid Glass Button

    Liquid Glass Button

    6.7K
  • Shader Animation

    Shader Animation

    3.7K
  • WebGL Shader

    WebGL Shader

    2.6K
  • Shader Lines

    Shader Lines

    2.3K
  • Shiny Button

    Shiny Button

    2.2K
  • GLSL Hills

    GLSL Hills

    2.1K
  • Canvas

    Canvas

    1.8K
  • Glowing Shadow

    Glowing Shadow

    1.5K

More in Galleries

View all
  • Thumbnail image viewer

    Thumbnail image viewer

    43
  • Animated Gallery

    Animated Gallery

    1.4K
  • File Upload

    File Upload

    18
  • Editorial Collage Hero

    Editorial Collage Hero

    430
  • 3D Parallax Unfurling Gallery

    3D Parallax Unfurling Gallery

    981
  • Image Gallery

    Image Gallery

    123
  • Tilted Grid Hero

    Tilted Grid Hero

    1.5K
  • Hero Section 6

    Hero Section 6

    882