Stat Card

Metric card with trend indicator.

Revenue

$48.2k

12.4%

Tailwind CSS
<div class="max-w-xs rounded-2xl border border-slate-200 bg-white p-5">
  <p class="text-xs font-semibold uppercase tracking-wider text-slate-400">Revenue</p>
  <p class="mt-1 text-3xl font-black text-slate-900">$48.2k</p>
  <p class="mt-2 inline-flex items-center gap-1 text-sm font-semibold text-emerald-600">
    <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" d="M5 15l7-7 4 4 5-6"/></svg>
    12.4%
  </p>
</div>

Free to use in personal and commercial projects. No attribution required.

Variants

Same component, different looks. Preview each one live and copy the code you like.

Down trend

Down trend styling with red for metrics where up is bad, like churn.

Churn

3.1%

0.8%

Tailwind CSS

Dark

Dark dashboard version for analytics panels in night mode.

Revenue

$48.2k

12.4%

Tailwind CSS

With sparkline

Mini sparkline shows the trend shape, not just the number.

Revenue

$48.2k

12.4%

Tailwind CSS

About this stat card

Stat cards turn numbers into stories: $48.2k revenue, up 12.4%. This one pairs a large black numeral with a trend indicator, the dashboard pattern from Stripe to Shopify. The uppercase label, big number, and colored delta are the three required parts.

The trend indicator uses emerald for up, which is the universal convention (red for down). The tiny SVG arrow reinforces the direction for colorblind users who cannot rely on color alone.

One stat per card. Cramming multiple metrics into one card dilutes all of them. The whitespace around the number is what gives it authority.

Dashboards drown in tables, but decisions get made from a handful of numbers: revenue, signups, churn. The stat card rescues one number from the spreadsheet and gives it a stage: large enough to read at a glance, with just enough context (what it is, which direction it is moving) to act on. It is the difference between data existing and data being seen.

Three stacked parts do the job. The label is text-xs font-semibold uppercase tracking-wider: the what. The number is text-3xl font-black: the how much, set heavy so it carries poster weight. The delta row is inline-flex, pairing a small SVG trend arrow with a colored percentage, so direction survives even where color does not.

Add tabular-nums so digits hold their width and the number does not jitter when values update live. Put the unit in the label ("Revenue (MTD)") instead of crowding it against the number. For currency, keep the symbol at a smaller size next to the big numeral so $48.2k scans as one unit rather than two fragments.

The mistake is animating the number with a count-up on every data refresh. A number that is perpetually rolling is never actually readable, which defeats the card's one job: a glanceable fact. Animate the count-up once on first load for delight, then update the digits silently. Motion should introduce the number, not permanently obscure it.

Where to use it

  • ✓ Dashboard metrics
  • ✓ Analytics overviews
  • ✓ Admin panels
  • ✓ Report summaries

Customization tips

Use tabular-nums for aligned digits in tables. Add a sparkline SVG for trend context. Red for negative deltas, emerald for positive; never invert this.

Design notes

When to use

Use it for dashboard metrics and analytics overviews where one number tells the story: revenue, active users, conversion rate. The big numeral with a trend delta follows the proven label, number, direction structure. One stat per card keeps each number authoritative.

What to avoid

Do not cram multiple metrics into one card; each number dilutes the others. Do not invert the color convention: emerald for up and red for down is universal, swapping them confuses everyone.

Accessibility

Do not let color carry the trend alone; the arrow icon helps, but also include text like up 12 percent for screen readers. Use tabular numbers so digits align in tables.

Frequently asked questions

What makes a good stat card?

Three parts: a small uppercase label, a large number, and a trend indicator with direction. One metric per card, generous whitespace.

How should I show negative trends?

Red text with a down arrow. Never use green for negative even if 'down is good' in your context; it confuses.

Should stat numbers animate?

Count-up animation on load adds delight for dashboards. Keep it under 1 second; longer feels like showing off.

How do I show a percentage change vs last month on a stat card?

Put a small delta chip next to the main number with an up or down arrow and the percentage, like +12.4% vs last month. Color it green for positive and red for negative, but never rely on color alone: the arrow direction carries the meaning for colorblind users.

Should stat cards be clickable to show more detail?

If there is a detail view behind the metric, yes. Make the whole card a link or button so the click target is generous, and keep the hover feedback subtle since the card is data, not a button. This element's page treats cards as overview tiles that can drill down into reports.

How many stat cards should I put in one row?

Four is the standard for desktop dashboards, collapsing to two per row on tablets and one per row on phones. More than six in a row makes each number too small to scan. Group related metrics together and give each card one number, one label, and one trend indicator.

Customize it with our tools