Stats
Molecule
Single value, grouped row, with sparkline, with comparison. Used for dashboards and overview pages.
Playground
Every control sets a real prop of StatsProps. The JSX below updates as you go.
Web
iOS
Android
JSX · StatsProps
Variants
8 examples from src/molecules/stats/stats.md, each rendered live from its own JSX.
Anatomy
1
Group
2
Stat
3
Label
4
Value
5
Delta
Dimmed parts appear only in some states or variants.
Props
9 props on StatsProps, grouped as they are declared in source. Required props are marked *.
Accessibility and keyboard
Keyboard
Not focusable. It has no interaction of its own and takes the semantics of what it wraps.
Semantics
Roles
button
Platform skins
The playground's props on each platform: same tree, native shapes, type and touch sizes.
Usage
Under the value each tile can draw one strip: its trend (spark) or its composition (share). Both reserve the same height, so a row that mixes them keeps one card height and no tile is left half empty. framed puts every strip on a muted track, which is what makes a ROW of them scan evenly.
Each metric is a tile: the card fill on a hairline at the card corner, an 18px inset, a 12px label, a 28px figure and a 12px mono delta. plain sets the metrics edge to edge inside one bordered surface, a hairline between each. compact renders value-first rail tiles with a 12px inset and 20px figures; large renders 36px dashboard headlines; compact wins if both are set. Each item may include a muted description.
Tokens
Read from the playground render. Values follow the scheme and the ion hue.
--bad
--f-dp
--fd
--fm
--ft
--ln
--ok
--sf
--sh-sm
--tx3