Skip to content
OAIT Design System

Design system / Components

Stat tile

A filled card that shows one key number with its label: a count, a total, a KPI, a counter.

When to use

  • Key numbers at the top of a console or a summary: an import's counts, people on campus, KPIs on an organizer's dashboard (D-CSN-37, canonical §10.27).
  • A few numbers that people compare at a glance, two to five in a row.
  • A count that is itself a status ("To fix", "Invited", "Active"), drawn in its status tone.

When not to use

Situation Use instead
Many numbers, or numbers people sort and scan by row A data table with tabular figures at the inline end
A number inside a card, or a rank or a score in a list text-numeral-md tabular-nums inside that card or row (Game tiles, C-9)
Progress toward a goal A progress bar with the value in words
A live state ("Ready to scan", "Live now") A status indicator
A key–value fact in a record ("Global ID number") Key–value rows (List)
Games' passport score and the stage Product components at display size (Game tiles, Stage)
A number on marketing art It belongs to the art, aria-hidden, with a hidden sentence

Anatomy

  1. Grid: <dl class="oa-stat-grid">, one <dl> for the set.
  2. Tile: <div class="oa-stat">, a filled card holding one group of the list.
  3. Label (.oa-stat__label): the <dt>, above the value.
  4. Icon (optional, .oa-stat__icon): 24px, at the inline end of the label row, aria-hidden.
  5. Value (.oa-stat__value): a <dd> in numeral-lg with tabular figures.
  6. Note (optional, .oa-stat__note): a second <dd>, one supporting line.

Variants

Variant Use for Key tokens
Filled (default) Any count that is not a status --color-surface-container-low, --color-on-surface, --color-on-surface-variant
Success (--success) A count of things in a good state ("Active") --color-success-container, --color-on-success-container, a filled check_circle
Warning (--warning) A count of things waiting ("Invited", "Pending") --color-warning-container, --color-on-warning-container, a filled mail or schedule
Error (--error) A count of problems ("To fix", "Suspended") --color-error-container, --color-on-error-container, a filled error or block
With icon and note A count with a source or a time ("Counted in and out", "Seen in the last 2 hours") .oa-stat__icon, .oa-stat__note

A tile is tonal only when its number is itself a status, and then it always has its status icon and its word (D-CSN-37, canonical §13: never by color alone).

Sizes

Size Height Padding Type style Icon size
One size at least 112px (min-h-28) 20px, 24px from 640px (p-card sm:p-card-medium) label body-md at weight 500; value numeral-lg (40/48 700) with tabular-nums; note body-md 24px (--size-icon-lg), its box held to the 20px label line

The grid has 2 columns below 640px, 3 from 640px, and one column per tile from 1024px: five tiles at most in a set. Tiles are 16px apart (gap-grid) at every width (canonical §10.27, D-LAY-07). Canonical gives only "2 columns below 640px, up to 5 above"; three columns between 640 and 1023px is this system's choice, because five tiles there would leave about 60px for a value such as "1,016" at 40px.

Tokens

Part Property Token
Tile background, text --color-surface-container-low, --color-on-surface
Tile corner, edge --radius-card; a transparent 1px border for forced colors
Tile padding --space-card, from 640px --space-card-medium
Tile height min-h-28 (112px, --space-28)
Tile inner gap --space-1 (4px)
Label type, color --text-body-md at --font-weight-medium, --color-on-surface-variant
Icon color --color-on-surface-variant; the on-container color in a tonal tile
Value type --text-numeral-lg with tabular figures (tabular-nums)
Note type, color --text-body-md, --color-on-surface-variant
Tonal tiles background, text --color-success-container / --color-on-success-container; --color-warning-container / --color-on-warning-container; --color-error-container / --color-on-error-container
Grid gap --space-grid (16px)

States

A stat tile is not interactive: no hover, press, focus, or disabled state. It has two data states:

State What changes
Loading Skeleton blocks in the tile's final layout (a 16px label line, a 48px value block), aria-hidden; the region aria-busy="true" with one hidden "Loading {thing}…" (Skeleton)
Updated live When values refresh (Global ID's presence counts every 10 seconds), the value changes in place with no animation; say when in a note ("Updated 15:05"), and announce only significant changes in the page's status region
No data Write "0", never an empty tile; when a set has no data at all, show an empty state instead of five zeros (Empty state)

To link a number to its detail, add a standalone link under the grid or in the note ("See who’s here"); never make the whole tile a link.

Behavior

  • Below 640px two tiles share a row; from 640px three; from 1024px all the tiles of the set share one row (five at most).
  • Values never wrap inside the number: in a tile narrower than its value (the two-column grid at 320px gives "1,016" 94px) the numeral shrinks to 38% of the tile's content width, about 36px there, and is the full 40px again from 360px (.oa-stat is an inline-size container; font-size: min(var(--text-numeral-lg), 38cqi)). Keep values to five characters ("1,016", "99+"); a longer value uses numeral-md or a short form ("12k"), and larger numbers move to a table.
  • No count-up animation: values appear as they are.

Accessibility

  • Element. One <dl> for the set; each tile is a <div> holding one <dt> (the label) and one or two <dd> (the value, then the note). Screen readers announce "To fix, 3" and the list size.
  • Icon. Decorative and aria-hidden="true"; the label carries the meaning, and the tonal color is never the only cue.
  • Contrast. Value on-surface and label on-surface-variant on surface-container-low (7.2:1 or more light, 5.4:1 or more dark); tonal tiles use their on-container role (13:1 or more light, 7.2:1 or more dark).
  • Numbers. Western digits in every language (Intl.NumberFormat with -u-nu-latn); grouping commas as each language writes them ("1,016" in English and Arabic, "1 016" in French) (canonical §14.3).

RTL and languages

  • Labels, values, and notes start at the inline start (the right in Arabic); the icon sits at the inline end of the label row.
  • A plain count needs no isolation; a signed number or a value with a unit sits in <bdi dir="ltr"> ("+2", "08 / 2030") (canonical §14.2).
  • Arabic labels keep their size at line height 1.75; French labels run up to 32% longer (D-TYP-15) and wrap.

Content

  • Label: what is counted, in a few words, sentence case, no full stop: "New people", "Updates", "No change", "To fix" (Global ID import); "Main gate", "Library" (Global ID presence); "Active", "Invited", "Suspended" (Global ID statuses).
  • Value: the number alone, formatted for the language; no unit inside the value unless it is part of the number ("34%").
  • Note: one short line that qualifies the number: "Counted in and out", "Seen in the last 2 hours", "These lines are left out.", "Updated 15:05" (24-hour, canonical §14.3).
  • Arabic (Global ID): "أشخاص جدد" · "تحديثات" · "بلا تغيير" · "تحتاج إلى تصحيح" · "داخل الحرم" · "موجودون الآن".
  • French (Global ID): "Nouvelles personnes" · "Mises à jour" · "Sans changement" · "À corriger" · "Sur le campus" · "Entrées et sorties comptées".

Do and don't

Do Don't
Label above the value The value above its label (Global ID's import counts today)
numeral-lg with tabular-nums A 56px or 850-weight number, or proportional figures that jump as they change
A tonal tile only for a status, with its icon and word Pastel tiles by position ("stat card 1 peach, 2 mint, 3 lilac")
Filled tiles on the page or a white card Filled tiles inside a tonal panel, where they disappear
Five tiles at most in a set A wall of tiles; use a table

Code

HTML (reference CSS)

Counts with one status (Global ID import):

<dl class="oa-stat-grid">
  <div class="oa-stat">
    <dt class="oa-stat__label">New people</dt>
    <dd class="oa-stat__value">128</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">Updates</dt>
    <dd class="oa-stat__value">42</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">New types</dt>
    <dd class="oa-stat__value">3</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">No change</dt>
    <dd class="oa-stat__value">1,016</dd>
  </div>
  <div class="oa-stat oa-stat--error">
    <dt class="oa-stat__label">To fix<span class="oa-icon oa-icon--filled oa-stat__icon" aria-hidden="true" translate="no">error</span></dt>
    <dd class="oa-stat__value">3</dd>
    <dd class="oa-stat__note">These lines are left out.</dd>
  </div>
</dl>

Icon and note (Global ID presence):

<dl class="oa-stat-grid">
  <div class="oa-stat">
    <dt class="oa-stat__label">Main gate<span class="oa-icon oa-stat__icon" aria-hidden="true" translate="no">sync_alt</span></dt>
    <dd class="oa-stat__value">214</dd>
    <dd class="oa-stat__note">Counted in and out</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">Library<span class="oa-icon oa-stat__icon" aria-hidden="true" translate="no">schedule</span></dt>
    <dd class="oa-stat__value">86</dd>
    <dd class="oa-stat__note">Seen in the last 2 hours</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">Assembly hall<span class="oa-icon oa-stat__icon" aria-hidden="true" translate="no">sync_alt</span></dt>
    <dd class="oa-stat__value">31</dd>
    <dd class="oa-stat__note">Counted in and out</dd>
  </div>
</dl>

Status tones:

<dl class="oa-stat-grid">
  <div class="oa-stat oa-stat--success">
    <dt class="oa-stat__label">Active<span class="oa-icon oa-icon--filled oa-stat__icon" aria-hidden="true" translate="no">check_circle</span></dt>
    <dd class="oa-stat__value">1,204</dd>
  </div>
  <div class="oa-stat oa-stat--warning">
    <dt class="oa-stat__label">Invited<span class="oa-icon oa-icon--filled oa-stat__icon" aria-hidden="true" translate="no">mail</span></dt>
    <dd class="oa-stat__value">12</dd>
  </div>
  <div class="oa-stat oa-stat--error">
    <dt class="oa-stat__label">Suspended<span class="oa-icon oa-icon--filled oa-stat__icon" aria-hidden="true" translate="no">block</span></dt>
    <dd class="oa-stat__value">2</dd>
  </div>
</dl>

Arabic, in a page with <html lang="ar" dir="rtl">:

<dl class="oa-stat-grid">
  <div class="oa-stat">
    <dt class="oa-stat__label">أشخاص جدد</dt>
    <dd class="oa-stat__value">128</dd>
  </div>
  <div class="oa-stat">
    <dt class="oa-stat__label">تحديثات</dt>
    <dd class="oa-stat__value">42</dd>
  </div>
  <div class="oa-stat oa-stat--error">
    <dt class="oa-stat__label">تحتاج إلى تصحيح<span class="oa-icon oa-icon--filled oa-stat__icon" aria-hidden="true" translate="no">error</span></dt>
    <dd class="oa-stat__value">3</dd>
  </div>
</dl>

Every variant is in reference/snippets/marketing.html; the CSS is reference/css/marketing.css.

Tailwind CSS v4

<dl className="grid grid-cols-2 gap-grid sm:grid-cols-3 lg:grid-flow-col lg:grid-cols-none lg:auto-cols-fr">
  <div className="flex min-h-28 min-w-0 flex-col gap-1 rounded-card border border-transparent bg-surface-container-low p-card text-on-surface sm:p-card-medium">
    <dt className="flex items-start justify-between gap-2 text-body-md font-medium text-on-surface-variant">
      Main gate
      <Icon name="sync_alt" size={24} className="-my-0.5 shrink-0" />
    </dt>
    <dd className="text-numeral-lg tabular-nums wrap-anywhere">214</dd>
    <dd className="text-body-md text-on-surface-variant">Counted in and out</dd>
  </div>
  <div className="flex min-h-28 min-w-0 flex-col gap-1 rounded-card border border-transparent bg-error-container p-card text-on-error-container sm:p-card-medium">
    <dt className="flex items-start justify-between gap-2 text-body-md font-medium">
      To fix
      <Icon name="error" size={24} filled className="-my-0.5 shrink-0" />
    </dt>
    <dd className="text-numeral-lg tabular-nums wrap-anywhere">3</dd>
  </div>
</dl>

The other tones swap bg-error-container text-on-error-container for bg-success-container text-on-success-container or bg-warning-container text-on-warning-container.

React

Prop Type Default Description
label string — What is counted.
value number — Formatted with Intl.NumberFormat(locale-u-nu-latn).
note ReactNode — One supporting line.
icon string — A 24px Material Symbols name; status tones draw it filled.
tone "neutral" | "success" | "warning" | "error" "neutral" Tonal only when the number is a status; then icon is required.

StatGrid renders the <dl> and accepts two to five Stat children.

<StatGrid>
  <Stat label={t("import.counts.create")} value={counts.create} />
  <Stat label={t("import.counts.update")} value={counts.update} />
  <Stat label={t("import.counts.unchanged")} value={counts.unchanged} />
  {counts.error > 0 ? (
    <Stat label={t("import.counts.error")} value={counts.error} tone="error" icon="error" note={t("import.preview.leftOut")} />
  ) : (
    <Stat label={t("import.counts.error")} value={0} />
  )}
</StatGrid>