When to use
Section titled “When to use”Meter shows one value measured in a known range: storage used, a quota, a score, a fill level. The value can move either way; getting closer to or further from a limit is meaningful.
When not to use
Section titled “When not to use”- For the progress of a task: use Progress for work that starts and finishes (upload, install); Meter shows a measure, not progress.
- For an unknown wait: use Spinner or Skeleton when the duration is unknown.
- For several measures and trends: use Chart to compare or to show change over time.
- For a single number: use StatCard for a value and its change.
Anatomy
Section titled “Anatomy”- Label: what is measured; it names the meter.
- Value: the formatted value opposite the label; hidden from screen readers, which read
aria-valuetextinstead. - Track (
track): the whole range, insurface-sunken. - Fill (
indicator): the bar up to the value, in a status colour. - Description: optional helper text.
Behaviour
Section titled “Behaviour”- Meter is static: it does not change on hover and is not a tab stop.
- When the value changes, the fill scales to its new length over 150 ms; on first show it grows from zero. It never loops.
- A value outside the range is drawn at the nearest end;
aria-valuenowis clamped to it. - In right-to-left languages the fill grows from the right edge.
tone="auto"finds the region with this rule: a value belowlowis low, abovehighis high, and anything between them (ends included) is middle. The region that holdsoptimumis good (success), its neighbour is a warning and the region at the far end is danger. Whenoptimumis in the middle, both sides are warnings. A missinglowismin, a missinghighismax, and a missingoptimumis the middle of the range. With none of the three the colour is brand.
Guidelines
Section titled “Guidelines”Support colour with a word
Section titled “Support colour with a word”auto also tells screen readers the region. If you pass a fixed tone, give the meaning in text too.
Quota used
Quota used
Pick the format that fits the measure
Section titled “Pick the format that fits the measure”Show the real unit; the percent of the range is not always the best result.
Storage
Storage
Give context instead of removing the label
Section titled “Give context instead of removing the label”A label is always required. When the surrounding text already says it, use labelHidden; do not delete the label.
Score
Content
Section titled “Content”- Write the label as a noun phrase in sentence case: “Storage”, “Quota used”.
- Format the value with
Intl; attach the unit to the value. - Keep
descriptionto one sentence: when it was updated or what the limit is. - When you write
valueText, give a full phrase: “32 of 50 GB used”.