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
image
ARIA on web
aria-hidden
aria-label
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.
The metrics sit edge to edge inside one bordered surface, a hairline between each: a 16px inset, a 13px label, a 28px figure and a 12px delta led by its direction arrow. framed separates them into tiles 12px apart. A trend draws as a small line beside the figure and a composition as a thin bar over its legend. 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