About
A dashboard scorecard that shows a single metric with an uppercase label, a large tabular value, and an optional delta pill with an up/down arrow and comparison hint.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds KPI Card to your project and fits it to your theme.
Code
How KPI Card is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import KpiCard from "@/components/ui/kpi-card";
export default function KpiCardDemo() {
return (
<div className="grid w-full grid-cols-1 gap-4 bg-background p-6 sm:grid-cols-2 lg:grid-cols-4">
<KpiCard
label="Revenue"
value={24800}
prefix="$"
delta={8.4}
deltaLabel="vs last month"
/>
<KpiCard
label="Active users"
value={12480}
delta={312}
deltaLabel="last 7 days"
/>
<KpiCard
label="Conversion"
value="3.42"
suffix="%"
delta={0.4}
deltaLabel="vs prior period"
/>
<KpiCard
label="Sessions"
value={89240}
delta={-2.1}
deltaLabel="vs last week"
/>
</div>
);
}
















