Skip to content

Meter

Free

A bar that shows one measured value in a known range, such as used storage. It changes color when the value reaches a low or high level.

  • Base UI
  • React 19
  • Tailwind CSS 4

Added Nov 8, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

A meter shows a value in a known range; for a task that moves, use a Progress. Set low, high, and optimum to color the levels.

storage-meter.tsx

Meter

<div>
PropTypeDefaultDescription
classNamestring—
lownumber—The top of the low region, as on the native <meter>. Set it or high to get levels.
highnumber—The bottom of the high region, as on the native <meter>.
optimumnumber—The best value. Under low: low is good. Over high: high is good. Between: the middle.
glowboolean—A soft halo in the fill color (glow, @gelatin-ui/glow). Default: false.
From Base UIMeter.RootBase UI docs
aria-valuetextstring—A string value that provides a user-friendly name for aria-valuenow, the current value of the meter.
formatNumberFormatOptions—Options to format the value.
getAriaValueText—A function that returns a string value that provides a human-readable text alternative for aria-valuenow, the current value of the meter.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

MeterLabel

<div>
PropTypeDefaultDescription
classNamestring—
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

MeterValue

<span>
PropTypeDefaultDescription
classNamestring—
From Base UIMeter.ValueBase UI docs
children—
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

MeterTrack

<div>
PropTypeDefaultDescription
thickness"thick""thin""thick"
rounded"default""full"—
size"default""lg""sm""xs"—
classNamestring—
variant"bar""dots""segments""steps""ticks""bar"bar (default): one fill. The others draw a row of segments.
segmentsnumber—The segment count of a segmented look. Default: ticks 30, segments 10, steps 5, dots 20.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

MeterIndicator

<div>
PropTypeDefaultDescription
classNamestring—
variant"default""muted""default"default: the ink fill (and the level colors). muted: a quiet gray fill (muted-foreground at 50%) with no level color, for the bars of a comparison where only the one that leads takes the ink: the results of a Poll before its winner. The color is never the only signal: the value text says which one leads.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for a value at rest in a known range.
  • Use low, high, and optimum to turn on the warning and critical colors.
  • Use variant ticks, segments, steps, or dots on MeterTrack for a row of cells.
  • Use thickness="thin" in a table cell.

It is a Base UI Meter with the meter role. MeterLabel names it; with no label, pass aria-label.

Say the level in text too, with MeterValue, the label, or getAriaValueText.

Pass locale on a server-rendered page, so the digits match after hydration.

Value
none · the fill takes each new width at once
  1. AddedMeter.
Open the release