Skip to content
Halorav0.1.0

Components

Stat tile

Big numbers in the display face, with a plain label.

Example#

5Live sites
3Languages
100%AA contrast by test
HTML
<div class="ha-stat-grid" style="width:100%">
  <div class="ha-stat"><span class="ha-stat__value">5</span><span class="ha-stat__label">Live sites</span></div>
  <div class="ha-stat"><span class="ha-stat__value">3</span><span class="ha-stat__label">Languages</span></div>
  <div class="ha-stat"><span class="ha-stat__value">100%</span><span class="ha-stat__label">AA contrast by test</span></div>
</div>

The numeral uses --ha-font-display, which is Saira Condensed in the Origin brand and falls back to Inter. The grid is one column on phones and three from 640px. The number uses accent-text so it passes AA.

ClassPurpose
ha-stat-gridResponsive grid.
ha-stat, __value, __labelThe tile and its parts.

Accessibility#

  • Pair every number with a label that makes sense alone.
  • If the numeral counts up, set the final value in the HTML and respect reduced motion.

Edit this page on GitHub

Type to search.