Skip to main content

Module stat_tile

Module stat_tile 

Expand description

StatTile: one number and what it measures, on the content ground.

A statistic is not a card: tiles sit on the ground and are separated by space (StatGroup lays out a set and reflows 4 → 2 → 1 columns). A tile reads top to bottom:

  • the label (Caption, secondary ink, sentence case),
  • the value in tabular figures (Title, or Display for the one hero number of a screen) with an optional unit (Caption), elided to the tile’s width,
  • an optional note: a neutral qualifier read with the value (“of 2 TB”, “estimated”), in Caption,
  • an optional change line: a Trend arrow and its text,
  • an optional live Sparkline footer.

A Tone adds a ticker down the tile’s leading edge: what state the measured thing is in (a failed backup, a healthy tunnel). A tile that opens a detail view is pressable and can be the selected one.

StatTileFace paints the same geometry for immediate-mode callers.

Structs§

StatGroup
A set of stat tiles that reflows by width: all in one row when they fit, then half per row (a 2×2 for four), then one per row. Tiles are separated by space, never boxed.
StatTile
A retained stat tile. See the module docs.
StatTileFace
Immediate-mode stat tile.

Enums§

Trend
Direction of a tile’s change line. The arrow says which way the number moved; whether that is good is the tile’s Tone, not the arrow’s.