Meter

A graphical display of a numeric value within a range.

Storage Used

Anatomy

Import the component and assemble its parts:

Anatomy

API reference

Root

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

PropTypeDefault
value*

number

getAriaValueText

((formattedValue: string, value: number) => string)

undefined

locale

LocalesArgument

undefined

min

number

0

max

number

100

format

NumberFormatOptions

undefined

className

| string
| ((state: Meter.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Meter.Root.State) => ReactElement)

undefined

Track

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

PropTypeDefault
className

| string
| ((state: Meter.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Meter.Root.State) => ReactElement)

undefined

Indicator

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

PropTypeDefault
className

| string
| ((state: Meter.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Meter.Root.State) => ReactElement)

undefined

Value

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

PropTypeDefault
children

| ((formattedValue: string, value: number) => ReactNode)
| null

undefined

className

| string
| ((state: Meter.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Meter.Root.State) => ReactElement)

undefined

Label

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

PropTypeDefault
className

| string
| ((state: Meter.Root.State) => string)

undefined

render

| ReactElement
| ((props: HTMLProps, state: Meter.Root.State) => ReactElement)

undefined