Skip to content

StatTile ​

One number that matters, in a small Card, with how it's changed.

Open in Storybook to try every prop.

When to use ​

Use a StatTile forUse instead
Headline numbers at the top of a dashboard or app pageSeveral figures inside one card (SummaryList, compact)
A number with a trend ("+12% on last year")A number over time (a chart)

Anatomy ​

PartRequiredNotes
containerYesA Card with padding="sm".
iconNo16px, before the label. Decorative.
labelYesWhat the number is.
valueYesThe number. Shows "—" if missing.
changeNoArrow, the change in bold, then what it's against, coloured by sentiment.
descriptionNoA sentence under the value.
footerNoe.g. a "View all" link.

Properties ​

PropertyTypeDefaultDescription
labelstring—Required.
valuestring | number—Already formatted ("1,204", "96%"). Slot value for a unit in smaller text.
iconComponent—
changestring—Already formatted, with its sign ("+12%", "−3").
changeLabelstring—e.g. "on last year".
trendup | down | flat—Sets the arrow.
sentimentpositive | negative | neutralfrom trendSets the colour. Up is positive and down negative by default; set it when down is good (absences).
descriptionstring—

Sizes ​

PartValue
Padding16px
Label14px / 20px, black 65%; icon 16px, 8px gap
Value24px / 32px, bold, tabular figures
Change14px; 16px arrow, 2px gap; 8px after the value, wraps under it when narrow
Gap between rows4px; footer 8px more

States ​

SentimentColourContrast on white
positivegreen #007A165.2:1
negativered #D2042D5.0:1
neutralblack 65%6.5:1

Accessibility ​

PartAnnounced as
Label, valueText, in reading order (label first)
ArrowHidden; the direction is read as "Up", "Down" or "No change" before the change
ColourNever the only signal: the sign and the arrow say it too

Layout ​

RuleValue
In a rowA grid: 1 column on phones, 2–4 as space allows, 16px gap
How many3–4 per row; more and none stands out

Platform adaptation ​

PlatformImplementationDifferences
Web / desktop (Vue)StatTile.vue—
iOS (SwiftUI)—A GroupBox with LabeledContent; a Gauge for percentages.
Android (Compose)—An OutlinedCard with the same parts.

Tokens used ​

TokenUsed for
color greenpositive change
color rednegative change
color black (65%)label, neutral change, description

Do / Don't ​

DoDon't
Say what the change is against ("on last year")Show a percentage with no comparison
Set sentiment when down is goodLet a fall in absences show red
Format numbers before passing themShow "1204.0000"

Released under the PolyForm Noncommercial License 1.0.0.