- Docs
- Components
- 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
Key numbers
A StatGroup of Stats: equal ruled cells, at least 200px wide, that wrap where it's narrow.
- Total users
- 1,284
- +38 this week
- Active, last 30 days
- 1,102
- 85.8% of users
- Passkey adoption
- 72%
- +6 pts this month
- Pending invitations
- 64
- 9 expire this week
<StatGroup aria-label="Users at a glance">
<Stat label="Total users" value={1284} note="+38 this week" tone="positive" trend={weekly} />
<Stat label="Active, last 30 days" value={1102} note="85.8% of users" trend={active} />
<Stat label="Passkey adoption" value="72%" note="+6 pts this month" tone="positive" />
<Stat label="Pending invitations" value={64} note="9 expire this week" tone="warning" />
</StatGroup>02
Tones
tone colours the note: positive, negative or warning. The words still say which way.
- Passkey sign-ins
- 8,412
- +12% on last week
- Failed sign-ins
- 312
- Up 40% on last week
- Locked accounts
- 9
- 3 need an admin
- Median sign-in
- 1.8 s
- Last 7 days
<Stat label="Passkey sign-ins" value={8412} note="+12% on last week" tone="positive" />
<Stat label="Failed sign-ins" value={312} note="Up 40% on last week" tone="negative" />
<Stat label="Locked accounts" value={9} note="3 need an admin" tone="warning" />
<Stat label="Median sign-in" value="1.8 s" note="Last 7 days" />03
Amounts
currency: money for the locale, a whole amount with no fraction. A unit is a string.
- Collected this month
- ₹12,45,000
- 38 invoices
- Outstanding
- ₹1,82,400
- 4 overdue
<Stat label="Collected this month" value={1245000} currency="INR" />04
Loading
loading: placeholders keep the strip's height while slower numbers come, and Loading is read in the value's place.
- Total users
- 1,284
- +38 this week
- Active, last 30 days
- 1,102
- 85.8% of users
- Passkey adoption
- Loading
- Pending invitations
- Loading
<Stat label="Passkey adoption" value={data?.adoption} loading={!data} />05
In a page header
PageHeader's summary runs the strip edge to edge, under the title.
Users
1,284- Total users
- 1,284
- +38 this week
- Active, last 30 days
- 1,102
- 85.8% of users
- Passkey adoption
- 72%
- +6 pts this month
- Pending invitations
- 64
- 9 expire this week
<PageHeader title="Users" summary={<StatGroup aria-label="Users at a glance">…</StatGroup>} />