Stat
Native controls work. Demo links and submissions stay inside this specimen. This example scrolls horizontally at this width.
Source markup
<!-- @dsCard group="Display" height=160 -->
<!DOCTYPE html>
<html lang="en-GB">
<head>
<meta charset="utf-8">
<title>Stat</title>
<style>
/* layout of the demo states only */
.demo {
display: grid;
gap: var(--space-md);
padding: var(--space-md) var(--space-sm);
max-width: 960px;
}
/* .state exists only to carry one caption per state. In real markup .stat is the
direct child of .hero__stats, as the README says. */
.state { display: flex; flex-direction: column; gap: var(--space-2xs); }
/* .hero__stats carries margin-top: var(--space-lg) for the hero; drop it here */
.demo .hero__stats { margin-top: 0; }
</style>
</head>
<body>
<div class="demo">
<div class="hero__stats">
<div class="state">
<p class="t-label">.stat__value</p>
<div class="stat">
<span class="stat__value">Encryption</span>
<span class="stat__label">Privacy first</span>
</div>
</div>
<div class="state">
<p class="t-label">.stat__value--bright</p>
<div class="stat">
<span class="stat__value stat__value--bright">POPIA</span>
<span class="stat__label">Data sovereignty</span>
</div>
</div>
<div class="state">
<p class="t-label">.stat__value + .phosphor</p>
<div class="stat">
<span class="stat__value phosphor">FOSS</span>
<span class="stat__label">Open-source foundation</span>
</div>
</div>
</div>
</div>
</body>
</html>
Stat is the value-and-label pair that states one sourced fact beside a headline, usually in the hero row under the call to action.
Use it where a reader takes a fact in at a glance: a brand value, a pillar, a jurisdiction. .hero__stats holds two to four of them. It is a flex row that wraps, with space-xl between columns tightening to space-md below 768px, and a space-lg top margin because it sits under the hero call to action.
Do not use Stat for a figure with no source behind it. A category chip is .tag; a condition is .badge-status; a sentence of explanation is .alert.
What the consumer provides
Section titled “What the consumer provides”One .stat per fact, with .stat__value first and .stat__label second. Both lines are font-family-mono. .stat is a flex column with a space-3xs gap, so the pair stays locked together. Pillar scope classes are not part of this component: a pillar stat names the pillar in its label and leaves the value amber.
States and their tokens
Section titled “States and their tokens”.stat__valueiscolor-semantic-accent-primaryatfont-scale-h2,font-weight-bold, line-height 1..stat__value--brightiscolor-semantic-text-primary. Use it for the one fact that should read first; leave the others amber..phosphoron a value iscolor-semantic-accent-primaryplusshadow-phosphor-text. Allowed here becausefont-scale-h2in mono clears the 24px floor. One glowing element per view..stat__labeliscolor-semantic-text-mutedatfont-scale-sm, uppercase, withfont-tracking-label.
Accessibility
Section titled “Accessibility”- Role: nothing is interactive and no ARIA role is needed; the preview uses plain
<span>elements inside.stat. - Name: a stat carries no name of its own. Both lines read in source order, so
.stat__valuemust come before.stat__label. - Keyboard: not interactive. Tab, Enter, Space, Escape and the arrows all pass over it.
- Target size: no interactive parts, so WCAG 2.2 SC 2.5.8 does not apply; a link placed in a label carries its own 24px.
- Announcement: none. If a value changes at runtime the consumer owns the live region.
Do and don’t
Section titled “Do and don’t”Keep a value to one or two words, because font-scale-h2 in mono runs out of room fast. Never put .phosphor on more than one stat in a row. Never set color-semantic-text-faint on a label: it fails AA at this size. Never invent a figure to fill the row: three facts that can be cited beat five that cannot.
Hand-written from themes/noiz/assets/css/components.css (.stat, .stat__value, .stat__value–bright, .stat__label, .hero__stats).