ProgressBar
ProgressBar shows how far a task with a known percentage has progressed. progress runs from 0 to 100; values
outside that range are clamped for the fill, the label and aria-valuenow.Feedback & Loading
When to use
Usage
loading<ProgressBar progress={42} />
<ProgressBar progress={75} color="success" showProgressLabel />
<ProgressBar progress={100} size="large" border aria-label="Upload" />color and size share the Button palette and size scale. border rounds the corners; showProgressLabel
prints the percentage next to the bar.
Accessibility
- Renders
role="progressbar"witharia-valuemin={0},aria-valuemax={100}and the clampedaria-valuenow. - Native attributes pass through to the container: give the bar an
aria-labelthat names the task.
Properties
Name
Type
Default
Description
borderbooleanfalseRounds the overlay's corners. Without it, the bar has square corners.
color"primary""secondary""tertiary""success""warning""danger""neutral"'primary'Bar color. Uses the theme's semantic palette.
progress *numbernoneCurrent value as a percentage (0–100). Values outside the range are
clamped (fill, label and `aria-valuenow`).
showProgressLabelbooleanfalseDisplays the `progress` value as text next to the bar.
size"small""medium""large""extraSmall"'medium'Bar size (height).