Home/Blocks/Stat hero

Stat hero

The opener block on every portal overview: one large brand-tinted lead number, then a row of secondary stats. Parent uses it for "Total due", Owner for "Today's revenue", Gold for "Pours today", Student for "Grade average".

Stable .b-stat-hero Canonical hero stat

Canonical hero-with-one-lead.

Per audit-reuse D-3, b-stat-hero is the canonical "one lead + N secondary tiles" surface. For individual KPI tiles, use b-stat-card. The legacy b-kpi-grid wrapper is deprecated.

Default

One lead, three secondaries. The lead reads first by colour and size; the secondaries sit on the system canvas.

Total due
$ 1,840.50
Term 2 fees · 3 invoices · auto-pay armed for Mon 15
Paid this term
$ 4,200
2 of 5 invoices
Next debit
Mon 15
auto · $ 920
Balance
$ 1,840
arrears 0
Hero + 3 secondaries.b-stat-hero

Parts

PropertyValueNotes
lead backgroundlinear-gradient(135°, --brand → --brand-deeper)Portal can override --brand to tint to its own theme
lead value700 32 / 1.05, tabular-numsLetter-spacing -0.02 em for headline density
secondary value700 20 / 1, tabular-numsHalf the size of the lead, white-on-surface
lead glowradial overlay top-rightWhite at 18% opacity — adds depth without a shadow
row gap12 pxLead → row · same as card-to-card gap
columns3 desktop, 2 phoneDrops to 2 below 600 px

Do & don't

Do

Pick the lead number deliberately. It's the answer to "what should the operator know in the first second?".

Don't

Use two lead cards. The whole point is one focal stat — competing lead cards cancel each other out.

Do

Tint the lead to the portal brand. Owner is dark ink, Gold is amber, Parent is brand blue — same parts, different palette.

Don't

Stack more than 4 secondaries. Past four the eye loses the grid and the lead loses its weight.

Accessibility

  • The lead value is the page's focal stat but not its <h1>. The H1 is the page title; the hero is a labelled stat block beneath it.
  • Tabular numbers must use font-variant-numeric: tabular-nums. Operators scan columns of numbers; proportional digits jitter.
  • Gradient backgrounds need fallback contrast — the white text on brand-on-brand-deeper passes WCAG AA at the brand-token defaults; verify when extending to a new portal palette.