Meter

A meter represents a quantity within a known range, or a fractional value.

Theme 
Storage25%
 
25
formatOptions 
 
Example
Meter.tsx
Meter.css
import {Meter} from './Meter';

<Meter label="Storage" value={25} />

Value

By default, the value prop is a percentage between 0 and 100. Use the minValue, and maxValue props to set a custom value scale.

Data usage250 MB
 
 
<Meter
  label="Data usage"
  maxValue={500}
  value={250}
  formatOptions={{style: "unit", unit: "megabyte"}} />

API

Shows a meter with labels pointing to its parts, including the label, fill, track, and value label elements.ValueLabelTasks completed4 of 5TrackFill
<Meter>
  <Label />
</Meter>

Meter

A meter represents a quantity within a known range, or a fractional value.

NameTypeDefault
valueLabelReactNodeDefault:
The content to display as the value's label (e.g. 1 of 4).
valuenumberDefault: 0
The current value (controlled).
children<>Default:
The children of the component. A function may be provided to alter the children based on component state.
formatOptionsIntl.NumberFormatOptionsDefault: {style: 'percent'}
The display format of the value label.

Default className: react-aria-Meter

Render PropCSS Selector
percentageCSS Selector:
The value as a percentage between the minimum and maximum.
valueTextCSS Selector: [aria-valuetext]
A formatted version of the value.