Skip to content

Content

Stat

One key number with its label and optional context.

  • Experimental
  • No keyboard interaction
  • Screen reader not tested yet

Updated 2026-11-12

Playground

Change the props and the surface. The controls come from the documented props; the surfaces are the real modes.
open requests
12

Example values

tsx
<Stat value="12" label="open requests" context="Example values" />

Usage

When to use

Use a stat for a key number that people should see at a glance: counts, durations, rates on an overview page.

When not to use

  • For numbers people compare across rows: use Table.
  • As decoration: a stat without a real source doesn't belong on the page.

How it works

The value is shown first and large, the label below it, but both are a description list, so screen readers read “label: value”. lg uses display type for a few headline numbers; md uses heading type for rows of many. context adds period, comparison or source in small type.

Content guidelines

Only real numbers, with their period and source in the context. Keep the value short; long units such as “days” belong in the label, so the number doesn't wrap.

Do and don’t

Do
  • Only real numbers. Say the period and the source in the context.
Don’t
  • Don't round so far that the number becomes a claim; don't use Stat for decoration.

Anatomy

The parts of the component and what each one does, as in the playground above.
  1. valueDisplay type (lg) or heading type (md).
  2. labelSmall text in text.secondary, below the value.
  3. captionOptional context in text-meta.

Examples

Type-checked, and the same code goes into the AI manifest. Import: import { Stat } from "@/ds";

Headline numbers

open requests
12

Example values

days average reply time
3.2

Example values

answered within a week
87 %

Example values

Compact

drafts
4
in review
2

Props

Checked against the component's TypeScript type on every build.
Stat props
NameTypeDefaultDescription
value (required)string | number–The number, formatted for reading.
label (required)string–What the number counts.
contextReactNode–Period, comparison or source.
size"md" | "lg""lg"lg for a few headline numbers, md for rows of many.

Tokens used

Derived from the utility classes in the component's source. Copy a class with one click.
Tokens used by Stat
TokenTierValueUtility
display.trackingcomponent-0.035em
display.weightcomponent800
spacing.1semantic4px
text.primarysemantic#0A0A0B
text.secondarysemantic#555555
type.display-lg.sizesemanticclamp(40px, 6vw, 72px)
type.heading.sizesemanticclamp(24px, 2.5vw, 32px)
type.meta.sizesemantic13px
type.small.sizesemantic14px
weight.semiboldsemantic600

Accessibility

What is checked automatically on every build, and what a person has tested. Nothing is marked as tested unless it was.
Testing status by check
CheckHowStatus
axe-core rulesAutomated on every npm run check, at desktop and mobile widthRuns on every build
KeyboardAutomated Playwright test (scripts/keyboard.mjs)Not applicable
Screen readerManualNot tested yet

Semantics and focus

  • A dl: the label is read before the value, although the value is shown first.