Metric card

● Stable · v0.1

Show a single number the user actually cares about — today's sales, cash in hand — as the clear hero of the card. One number, read in a glance, no dashboard required.

In context

9:41

Purpose

Metric card answers one question instantly: "how am I doing on this?" The number is the largest thing on the card; the label and optional trend support it. It exists to make a key figure legible at a glance — not to build a dense analytics view.

Anatomy

  • Label — short and plain ("Today's sales", not "Gross revenue").
  • Value — the hero. Large, bold, pre-formatted with currency and grouping by the caller.
  • Trend (optional) — a small up/down change, coloured success or error.
  • Icon (optional) — a quiet glyph to aid recognition.

Code

import { MetricCard } from '@daytwo/components'
<MetricCard
label="Today's sales"
value="Ks 124,000"
trend={{ direction: 'up', label: '+12% vs yesterday' }}
/>

Formatting and localisation are the caller's job — pass value already formatted.

When to use

  • To surface one important number the user checks often.
  • On the home screen, as the headline figure of the day.

When NOT to use

  • For a grid of many numbers — that's a dashboard, which DayTwo is counter-positioned against. If you need a table of figures, you're building the wrong screen.
  • For a number with no meaning to the user — only show figures a shop owner cares about, not internal metrics.
  • For long text — Metric card is for a value, not a paragraph.

The correct scenario

The home screen opens with one Metric card — "Today's sales: Ks 124,000, +12% vs yesterday." The owner learns how today is going in under a second, which is exactly the "tells me how I'm doing" moment that builds trust.

Anti-patterns

Do
One or two metric cards for the figures that matter, each with a plain label and a clear trend.
Don't
A six-up grid of metrics with jargon labels — a P&L dashboard in disguise, which overwhelms a first-time owner.
Plain labels, meaningful numbers

If a label needs accounting knowledge to understand, rewrite it. The number only helps if the user knows what it means and why it matters to them.

Edge cases

No data yet
Show an empty state, not "Ks 0"
WhyZero can read as a real (alarming) figure
Long value
The value wraps; the card grows
WhyBig numbers + Burmese labels must not clip
Trend down
Uses the error colour and a ↓ — never hidden
WhyHonest signal, even when it's bad news
Loading
Show a skeleton in place of the value
WhyDon't flash a wrong/old number

Tokens used

color.surface.primarycolor.text.primarycolor.text.secondarycolor.feedback.successFgcolor.feedback.errorFgradius.lgelevation.smtypography.largeTitle