Example#
- 95+
- 0
- 2mo
Usage#
Use a stat to make one number the point: a score, a speed, a count. A StatGroup sets two to four side by side, as a description list, often on the slab as "numbers you can check".
- Parts.
value(a preformatted string),label, an optionalunit,sizeandline(the value in the line's text ink). - Claims you can check.
sourceadds a footnote link under the label, to the report or page the number comes from. - No counting up. Values print at their final figure at once; the words stay still (D-H1).
Anatomy#
- 95+
- 0
- 2mo
- StatOne fact, divided from the next by a rule.
data-mk-part="item" - ValueA numeral with an optional unit.
.mk-stat-value - LabelWhat was measured, under the value.
.mk-stat-label
Volume#
Reading layer: identical at every volume.
Quiet
- 95+
- 0
- 2mo
Studio
- 95+
- 0
- 2mo
Press
- 95+
- 0
- 2mo
Rave
- 95+
- 0
- 2mo
Content#
- The value is exact and has its unit: "0.7 s", "95+".
- The label says what was measured, in a few words: "Lighthouse performance".
- Every claim has a source a reader could check, or it does not go in a stat.
Do and don't#
Do
- 95+
- 0.7s
Don't
- 10x
- 100%
Accessibility#
StatGroupis a<dl>: the label is the term, shown under the value by CSS order.- Values never animate (words still, D-H1); a
sourcelink lets readers check the claim.
Props#
| Prop | Type | Default | Description |
|---|---|---|---|
size | NumeralSize | m | Default `m`. |
value required | string | none | Preformatted ("95+", "0.7 s", "$3,200"). |
label required | string | none | |
unit | string | none | |
line | "custom-apps" | "growth" | "maxos" | "software" | "websites" | none | Prints the value in the line's text ink. |
source | { readonly label: string; readonly href: string; } | none | A footnote link to the evidence. |
Tokens#
System tokens (13)
--mk-border--mk-focus--mk-line-text--mk-link--mk-radius-plate--mk-rule-soft--mk-space-1--mk-space-3--mk-space-6--mk-surface--mk-text--mk-text-2--mk-type-numeral-m-size
Its own properties (2)
--mk-stat-group-cols--mk-stat-group-gap
Changelog#
Arrived in 0.1.0.
Sectionwith its plate andArtslot,Plate,VolumeScope,PageHero,SectionHead,Eyebrow,Card,LineCard,InfoPanel,Stack,Cluster,Grid,Container,Main,Ruleand theFittedLineclient fitter;Navbarwith theNavDisclosuremega panels,Footer,FooterMap,BuildStamp,SkipLink,ActionDockandVisitorControls; theTableparts,ComparisonTablewith the one-tier switcher,SpecStrip,Numeral,Stat,StatGroup,StatusChip,BadgeandScoreDial;ProsewithmdxComponents,Quote,CodeBlockwithCopyButton,Figure,ScreenshotFrameandPhoneFrame; and the brand: the three evolved 2 × 2 options inmarkGeometry(a Overprint by default, b Paper seam, c Key block) with the pixel-snappedpxmode and the one-ink seam variant,logoGeometrywith the 1x clear-space frame,Mark,Wordmark,Logo,MaxosMarkandLineBadge. Read the whole entry