About
A glassmorphic card that displays a labeled numeric stat with a trend or supporting description, used for dashboard and analytics summaries.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Stat Card to your project and fits it to your theme.
Code
How Stat Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import StatCard, {
StatCardLabel,
StatCardValue,
StatCardDescription,
} from "@/components/ui/stat-card";
const stats = [
{ label: "Revenue", value: "$24.5k", change: "+12%" },
{ label: "Users", value: "8,291", change: "+4%" },
{ label: "Orders", value: "1,429", change: "+8%" },
{ label: "Bounce", value: "42%", change: "-3%" },
];
export default function StatCardDemo() {
return (
<div
className="w-full min-h-screen flex items-center justify-center p-8"
style={{ background: "oklch(0.16 0.035 275)", color: "oklch(0.98 0 0)" }}
>
<div className="grid grid-cols-2 md:grid-cols-4 gap-4 w-full max-w-2xl">
{stats.map((stat) => (
<StatCard key={stat.label}>
<StatCardLabel>{stat.label}</StatCardLabel>
<StatCardValue>{stat.value}</StatCardValue>
<StatCardDescription>{stat.change}</StatCardDescription>
</StatCard>
))}
</div>
</div>
);
}















