How to build an accessible Stat in React

Presentational by role; the label-value pairing is real text so the metric and its meaning are read in order, and trend direction is conveyed by text/glyph, not color alone

When to use a Stat

When not to use it

Accessibility

Role none, verified at WCAG 2.2-AA.

Common mistakes

Avoid: A grid of Stats used to fake a data table

Prefer: DataTable when the values are rows to compare and sort

Stat optimizes for one headline number, not tabular comparison

Example

<Stat label="Components" value={106} />

See the full Stat reference →