ProgressBar

ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way. They can represent either determinate or indeterminate progress.

Loading…
50%
 
 
50
isIndeterminate 
size 
staticColor 
labelPosition 
formatOptions 
 
import {ProgressBar} from '@react-spectrum/s2';

<ProgressBar label="Loading…" value={50} />

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.

Progress
33%
 
 
<ProgressBar
  label="Progress"
  maxValue={150}
  value={50} />

API

NameTypeDefault
isIndeterminatebooleanDefault:

Whether presentation is indeterminate when progress isn't known.

valueLabelReactNodeDefault:

The content to display as the value's label (e.g. 1 of 4).

valuenumberDefault: 0

The current value (controlled).

size'S''M''L''XL'Default: 'M'

The size of the ProgressBar.

staticColor'white''black''auto'Default:

The static color style to apply. Useful when the button appears over a color background.

stylesDefault:

Spectrum-defined styles, returned by the style() macro.

formatOptionsIntl.NumberFormatOptionsDefault: {style: 'percent'}

The display format of the value label.