Blog / UX patterns

KPI cards and sparklines: how to design dashboard metrics that read at a glance

A KPI card should answer three questions in one look: what is this, how much is it, and is that good. Here is the anatomy that does it, and the small charts that add the context.

By Abdullah NomanNovember 30, 20263 min read

Sparkline Ticker Strip, hairline isometric illustration

Short answer: a good KPI card has a short label, one large number with its unit, a delta against a stated period (with direction and colour), and a small chart for context, usually a sparkline. Keep everything else off the card.

What goes on a KPI card?

  1. Label: what the number is, in plain words. "Monthly recurring revenue", not "MRR (net)".
  2. Value: rounded to what matters. $84,210 or $84.2K, rarely $84,210.37.
  3. Delta: the change and the period it compares with: "+12.4% vs last month". Use an arrow as well as colour, because red and green alone fail for many readers.
  4. Context chart: a sparkline for trend, a bullet or meter for progress against a target.

Which small chart fits which metric?

MetricChart
Trend over recent days or weeksSparkline or spark bars
Progress to a goalBullet chart, meter or progress ring
A score within a rangeGauge or half donut
Streaks or pass/fail runsWin/loss chart
Daily activity densityDot matrix or mini calendar heatmap

Should sparklines have axes?

No. A sparkline shows shape, not exact values; the big number already gives the value. What helps is an end dot marking the latest point, and a tooltip if someone wants a specific day.

How many KPI cards should a dashboard show?

As many as the person acts on, usually four to six in a row. If every card is "important", none is. Group the rest below or behind a tab.

How do you build one in React?

import { Sparkline } from "@/components/charts"

<div className="card">
  <small>Weekly active users</small>
  <b>8,412</b> <em>↑ 6.3% vs last week</em>
  <Sparkline data={[35, 34, 42, 51, 50, 55, 60, 67]} />
</div>

Liniqo Charts includes stat tiles, sparklines, spark bars, win/loss, meters and dot matrices, 47 KPI styles in all, plus gauges and progress rings in the circular set.

Questions

What is a KPI card?

A compact dashboard element showing one metric: its label, current value, change against a period, and often a small trend chart.

What is a sparkline?

A tiny line chart without axes that shows the shape of a trend next to a number.

Should KPI deltas use red and green?

Use colour plus an arrow or sign, so the direction is clear to colour-blind readers and in print.

How many KPIs should a dashboard have?

Usually four to six headline metrics; more makes it hard to see what matters.

Keep reading