Meter

A graphical display of a numeric value within a range.

Storage Used

API reference

Import the component and assemble its parts:

Anatomy
import { Meter } from '@base-ui-components/react/meter';

<Meter.Root>
  <Meter.Label />
  <Meter.Track>
    <Meter.Indicator />
  </Meter.Track>
  <Meter.Value />
</Meter.Root>

Root

Groups all parts of the meter and provides the value for screen readers. Renders a <div> element.

PropTypeDefault
value

number

undefined

getAriaValueText

(formattedValue, value) => string

undefined

locale

Intl.LocalesArgument

undefined

min

number

0

max

number

100

format

Intl.NumberFormatOptions

undefined

className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Track

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

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Indicator

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

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Value

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

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined

Label

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

PropTypeDefault
className

string | (state) => string

undefined

render

| React.ReactElement
| (props, state) => React.ReactElement

undefined