Skip to main content
  1. Docs
  2. Components
  3. Data display

Stat

A key number with its label, a note and a small trend. Several sit in a StatGroup's ruled strip.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.4
Renders
<dl>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A console page's key numbers, at the top.
  • A summary under a page header.
Not for

02

Anatomy

  1. 1stat-label<dt>What's counted.
  2. 2stat-value<dd>The number, formatted for the locale.
  3. 3stat-trend<svg>Recent values, oldest first: decorative.
  4. 4stat-note<dd>The change or the context, in the tone.

03

Do and don't

Say what the trend means
DoThe note says which way, and how much.
Don'tA line alone: it's hidden from screen readers, and says nothing exact.
A few, that matter
DoThree or four numbers a person acts on.
Don'tEvery number there is: none stands out.

04

Content

  • Labels a few words, sentence case: "Active, last 30 days".
  • Notes say the change and its period: "+38 this week".
  • A number as a number, so it follows the locale; units and amounts as strings you format.
Next — StatAPI