Ravi Katiyar

Card

Cards 25

About

Profile Card Compact card with user avatar, name, role, and media preview. Includes a simple text section for descriptions or notes. Ideal for portfolios, testimonials, or social feed layouts.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Card to your project and fits it to your theme.

Code

How Card is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,
} from "@/components/ui/card-2";
import { MoreHorizontal } from "lucide-react";

export default function CardDemo() {
  return (
    <div className="w-full max-w-sm mx-auto p-4">
      <Card>
        <CardHeader>
          <div className="flex items-center space-x-4">
            <img
              alt="Avatar"
              className="rounded-full"
              height="40"
              src="https://cdn.21st.dev/assets/mirror/22/222c017eff6ddb1a8a6ffe1de320553f07a174d16c566a88ba1ae83c870586d5.png"
              style={{
                aspectRatio: "40/40",
                objectFit: "cover",
              }}
              width="40"
            />
            <div className="flex-1">
              <CardTitle>Frank Esteban</CardTitle>
              <CardDescription>Web Development</CardDescription>
            </div>
          </div>
        </CardHeader>
        <CardContent>
          <img
            alt="Card content"
            className="w-full h-auto"
            src="https://cdn.21st.dev/assets/mirror/d2/d229e0f368a694eb8bf178c912d21bbccaf5bad15678d2049ec6176d753eb18a.jpg"
            onError={(e) => {
              const target = e.target as HTMLImageElement;
              target.onerror = null; // prevent infinite loop
              target.src = 'https://cdn.21st.dev/assets/mirror/a0/a0f819711d8865ed7953390c93936ca027c121a0b7279d0bb48a0fe1e22b45e3.svg';
            }}
            style={{
              aspectRatio: "600/400",
              objectFit: "cover",
            }}
          />
           <div className="p-4">
             <p className="text-sm text-foreground">This is a basic card</p>
           </div>
        </CardContent>
      </Card>
    </div>
  );
}

Dependencies

More by Ravi Katiyar

View all
  • Animated Shader Hero

    Animated Shader Hero

    3.7K
  • Hero

    Hero

    3.1K
  • Circular Gallery

    Circular Gallery

    2.8K
  • Minimalist Hero

    Minimalist Hero

    2.6K
  • Floating Icons Hero Section

    Floating Icons Hero Section

    1.9K
  • Glass Calendar

    Glass Calendar

    1.8K
  • Feature Carousel

    Feature Carousel

    1.7K
  • AI Image Generator Hero

    AI Image Generator Hero

    1.4K

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.1K
  • Statistics Card 2

    Statistics Card 2

    269
  • Statistics Card 7

    Statistics Card 7

    295
  • Card

    Card

    56
  • Stats cards with links

    Stats cards with links

    86
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    102
  • The Item one

    The Item one

    3
  • Card Studio

    Card Studio

    36