Jone

Meter

A high-quality, unstyled React meter component that provides a graphical display of a numeric value.

A graphical display of a numeric value within a range.

Storage Used

Anatomy

Import the component and assemble its parts:

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

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

API reference

Root

NameTypeDefaultDescription
formatOptionalIntl.NumberFormatOptions | undefinedOptions to format the value.
getAriaValueTextOptional((formattedValue: string, value: number) => string) | undefinedA function that returns a string value that provides a human-readable text alternative for `aria-valuenow`, the current value of the meter.
localeOptionalIntl.LocalesArgument | undefinedThe locale used by `Intl.NumberFormat` when formatting the value. Defaults to the user's runtime locale.
maxOptionalnumber | undefined100The maximum value
minOptionalnumber | undefined0The minimum value
valueRequirednumberThe current value.

Value

NameTypeDefaultDescription
childrenOptionalnull | ((formattedValue: string, value: number) => React.ReactNode) | undefined

On this page