Stat tile

A reading in a tile: mono label, large tabular numeral with a raised unit, and a segment bar.

HTML
<div class="bm-stage">
  <section class="bm-tile" style="width:200px"><div class="bm-stat"><span class="bm-eyebrow">Water tank</span><div class="bm-stat__row"><span class="bm-stat__value">94</span><span class="bm-stat__unit">%</span></div><div class="bm-segbar bm-segbar--fill" data-segbar="19/20"></div></div></section>
  <section class="bm-tile" style="width:200px"><div class="bm-stat"><span class="bm-eyebrow">Pressure</span><div class="bm-stat__row"><span class="bm-stat__value">9.0</span><span class="bm-stat__unit">bar</span><span class="bm-stat__target">/ 9.0</span></div><div class="bm-segbar bm-segbar--fill bm-segbar--primary" data-segbar="11/20/11"></div></div></section>
  <section class="bm-tile bm-tile--heat" style="width:200px"><div class="bm-tile__head"><span class="bm-eyebrow">Boiler</span><span class="bm-chip bm-chip--heat">Heating</span></div><div class="bm-stat"><div class="bm-stat__row"><span class="bm-stat__value">78</span><span class="bm-stat__unit">°C</span><span class="bm-stat__target">/ 93</span></div><div class="bm-segbar bm-segbar--fill bm-segbar--heat" data-segbar="10/20/12"></div></div></section>
  <section class="bm-tile" style="width:200px"><div class="bm-stat"><span class="bm-eyebrow">Flow</span><div class="bm-stat__row"><span class="bm-stat__value">2.1</span><span class="bm-stat__unit">ml/s</span></div><div class="bm-segbar bm-segbar--fill bm-segbar--flow" data-segbar="8/20"></div></div></section>
  <section class="bm-tile" style="width:200px"><div class="bm-stat"><span class="bm-eyebrow">Weight</span><div class="bm-stat__row"><span class="bm-stat__value">—</span><span class="bm-stat__unit">g</span></div><div class="bm-segbar bm-segbar--fill bm-segbar--weight" data-segbar="0/20"></div></div></section>
  <section class="bm-tile" style="width:412px"><div class="bm-tile__head"><h2 class="bm-sub">Shot results</h2><span class="bm-chip">30.2 s</span></div><div class="bm-grid2"><div class="bm-cell"><div class="bm-stat bm-stat--sm"><span class="bm-eyebrow">Yield</span><div class="bm-stat__row"><span class="bm-stat__value">36.1</span><span class="bm-stat__unit">g</span></div></div></div><div class="bm-cell"><div class="bm-stat bm-stat--sm"><span class="bm-eyebrow">Ratio</span><div class="bm-stat__row"><span class="bm-stat__value">1:2.0</span></div></div></div><div class="bm-cell"><div class="bm-stat bm-stat--sm"><span class="bm-eyebrow">Max pressure</span><div class="bm-stat__row"><span class="bm-stat__value">10.0</span><span class="bm-stat__unit">bar</span></div></div></div><div class="bm-cell"><div class="bm-stat bm-stat--sm"><span class="bm-eyebrow">Avg flow</span><div class="bm-stat__row"><span class="bm-stat__value">1.9</span><span class="bm-stat__unit">ml/s</span></div></div></div></div></section>
</div>
  • Order is fixed: eyebrow, numeral, bar. Add / target after the numeral only when a target exists.
  • Give the bar the series tone (bm-segbar--heat, --primary, --flow, --weight); a plain level uses ink.
  • A tile turns bm-tile--heat only while that boiler is heating, and then carries a HEATING Chip.
  • Group small results as bm-stat--sm in cells inside one tile rather than as many small tiles.
  • Do not show a reading that is zero at rest in Simple view.

Anatomy

.bm-tile > .bm-stat with .bm-eyebrow, .bm-stat__row (.bm-stat__value in metric-lg, .bm-stat__unit in unit, .bm-stat__target in metric-sm) and .bm-segbar. bm-stat--sm sets the numeral in metric and the target in data.

States

StateWhat changes
LiveDigits snap as telemetry arrives; segments recolour in duration-fast.
No reading yet, or offlineThe numeral is —, the unit stays, every segment is unlit. No shimmer and no spinner.
HeatingThe tile takes heat-soft and a HEATING Chip. Nothing else is ever tinted.
Off targetThe numeral stays ink. Say it in a Chip or on the Dial, not by colouring the number.

Content

  • Label: one or two words, at most 14 characters; it may wrap to a second line in a narrow tile.
  • Numeral: at most 5 characters (100.0, 1:2.0). Decimals follow the Content section: one for pressure, flow, weight and seconds; none for temperature and percent.
  • At 320 px a two-column tile is 144 px wide; the target wraps under the numeral there instead of clipping it.

Screen reader

The tile is not interactive. Mark the label and value up so they read together ("Pressure 9.0 bar, target 9.0"): put the tile in a role="group" with aria-label, or use a dl. Never make a live numeral an aria-live region; it changes four times a second. State changes go to the page's status region.

Markup: .bm-tile > .bm-stat with .bm-eyebrow, .bm-stat__row (.bm-stat__value, .bm-stat__unit, .bm-stat__target) and .bm-segbar.