cards stats metrics gradient analytics cards stats metrics gradient analytics trend kpi stat cards with gradient metric cards with trend indicators
Stat Cards
Fetch pattern JSON:
curl https://webspire.de/patterns/cards/stat.json stat.html
<section class="ws-cards bg-[var(--ws-cards-bg)] py-20">
<div class="mx-auto max-w-7xl px-6">
<div class="mb-12 text-center">
<h2 class="text-3xl font-bold tracking-tight text-[var(--ws-cards-text)] sm:text-4xl">Platform overview</h2>
<p class="mx-auto mt-4 max-w-xl text-lg text-[var(--ws-cards-text-soft)]">Key metrics at a glance.</p>
</div>
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-4">
<div class="rounded-2xl border border-[var(--ws-cards-border)] bg-gradient-to-br from-indigo-50 to-white p-6">
<div class="flex items-center justify-between">
<div class="flex h-10 w-10 items-center justify-center rounded-xl bg-indigo-100 text-indigo-600">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3v11.25A2.25 2.25 0 006 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0118 16.5h-2.25m-7.5 0h7.5m-7.5 0l-1 3m8.5-3l1 3m0 0l.5 1.5m-.5-1.5h-9.5m0 0l-.5 1.5"/></svg>
</div>
<span class="inline-flex items-center gap-0.5 text-xs font-medium text-emerald-600">
<svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"/></svg>
12%
</span>
</div>
<p class="mt-4 text-2xl font-bold text-[var(--ws-cards-text)]">24,589</p>
<p class="mt-1 text-sm text-[var(--ws-cards-text-muted)]">Page views</p>
</div>
<div class="rounded-2xl border border-[var(--ws-cards-border)] bg-gradient-to-br from-emerald-50 to-white p-6">
<div class="flex items-center justify-between">
<div class="flex h-10 w-10 items-center justify-center rounded-xl bg-emerald-100 text-emerald-600">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z"/></svg>
</div>
<span class="inline-flex items-center gap-0.5 text-xs font-medium text-emerald-600">
<svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"/></svg>
8%
</span>
</div>
<p class="mt-4 text-2xl font-bold text-[var(--ws-cards-text)]">1,423</p>
<p class="mt-1 text-sm text-[var(--ws-cards-text-muted)]">New users</p>
</div>
<div class="rounded-2xl border border-[var(--ws-cards-border)] bg-gradient-to-br from-amber-50 to-white p-6">
<div class="flex items-center justify-between">
<div class="flex h-10 w-10 items-center justify-center rounded-xl bg-amber-100 text-amber-600">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
</div>
<span class="inline-flex items-center gap-0.5 text-xs font-medium text-emerald-600">
<svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 19.5l15-15m0 0H8.25m11.25 0v11.25"/></svg>
3%
</span>
</div>
<p class="mt-4 text-2xl font-bold text-[var(--ws-cards-text)]">4m 32s</p>
<p class="mt-1 text-sm text-[var(--ws-cards-text-muted)]">Avg. session</p>
</div>
<div class="rounded-2xl border border-[var(--ws-cards-border)] bg-gradient-to-br from-rose-50 to-white p-6">
<div class="flex items-center justify-between">
<div class="flex h-10 w-10 items-center justify-center rounded-xl bg-rose-100 text-rose-600">
<svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3"/></svg>
</div>
<span class="inline-flex items-center gap-0.5 text-xs font-medium text-rose-600">
<svg class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 4.5l15 15m0 0V8.25m0 11.25H8.25"/></svg>
1.2%
</span>
</div>
<p class="mt-4 text-2xl font-bold text-[var(--ws-cards-text)]">2.4%</p>
<p class="mt-1 text-sm text-[var(--ws-cards-text-muted)]">Bounce rate</p>
</div>
</div>
</div>
</section>
Details
Responsive Dark Mode Tailwind Only SSR Safe Copy & Paste
Stable Published
cardsstatsmetricsgradientanalytics
Slots
| Name | Required | Description |
|---|---|---|
| heading | No | Section title and description. |
| cards | Yes | Stat cards with icon, trend, number, and label. |
Four-column stat cards with subtle gradient backgrounds (indigo, emerald, amber, rose). Each card has an icon badge, trend indicator (up/down arrow with percentage), large metric number, and label. Responsive: 4 → 2 → 1 columns.