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>
);
}















