Ravi Katiyar

Card

Cards 29

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.8K
  • Hero

    Hero

    3.4K
  • Circular Gallery

    Circular Gallery

    3K
  • Minimalist Hero

    Minimalist Hero

    2.8K
  • Glass Calendar

    Glass Calendar

    2K
  • Floating Icons Hero Section

    Floating Icons Hero Section

    2K
  • Feature Carousel

    Feature Carousel

    1.8K
  • AI Image Generator Hero

    AI Image Generator Hero

    1.5K

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.3K
  • Photo Deck

    Photo Deck

    47
  • Folded Card

    Folded Card

    45
  • Statistics Card 10

    Statistics Card 10

    304
  • Statistics Card 2

    Statistics Card 2

    309
  • Statistics Card 7

    Statistics Card 7

    336
  • CTA Section

    CTA Section

    6
  • Liquid Glass Card

    Liquid Glass Card

    198