Skip to content

Meter

A bar that shows a measured value within a known range.

Message credits
x
hero.tsx

Usage guidelines

  • Use Meter for a measurement, not a task: A meter shows where a value sits in a known range, such as quota usage, storage or a score, and that value can rise or fall at any time. A value that only moves toward done, such as an upload or an indexing run, uses Progress. Both draw the same bar, but assistive technology announces them as meter and progressbar, so choose by meaning, not by look.
  • Name the meter: Use MeterLabel for a visible label; it names the root. Without one, give Meter an aria-label.
  • Set the real range: Pass min and max in the unit being measured instead of converting to a percentage. The value text defaults to a percentage of the range; pass format to show the number itself, and getAriaValueText when the number alone does not say what is counted.
  • Choose the tone from the value: MeterIndicator takes tone="warning" or tone="error". The caller decides the thresholds, and the visible text still states the value.

Anatomy

tsx
tsx

Meter renders no layout of its own, so the caller places the label and value around the track.

Examples

Tones

neutral (the default), warning and error color the indicator. This example switches at 80% and at the limit.

Apps
x
Documents
x
Team members
x
tones.tsx

Formatted value

format takes Intl.NumberFormat options for both MeterValue and aria-valuetext. Without it, MeterValue displays a percentage of the range (84% here); passing style: 'unit' formats the measured value directly, and locale keeps the unit and decimal separator consistent across browsers.

Vector storage (5 GB)
x
format.tsx

API reference

Meter

Displays a numeric value within a known range, such as quota usage, capacity, or a score. Renders a <div> element.

Use Progress instead for task completion; role="meter" and role="progressbar" are not interchangeable.

Base UI Meter.Root docs

MeterIndicator

Visualizes the position of the value along the range. Renders a <div> element.

Base UI Meter.Indicator docs

Props
PropTypeDefaultDetails
tone'error' | 'neutral' | 'warning''neutral'
Base UI Meter.Indicator docs

MeterLabel

An accessible label for the meter. Renders a <span> element.

Base UI Meter.Label docs

MeterTrack

Contains the meter indicator and represents the entire range of the meter. Renders a <div> element.

Base UI Meter.Track docs

MeterValue

A text element displaying the current value. Renders a <span> element.

Base UI Meter.Value docs