Progress
Usage
Progress component has one required prop value
– filled bar width in %.
You can change bar color by passing color
prop, by default theme.primaryColor
will be used.
If you set striped
prop to true bar will have stripes.
Multiple sections
You can display multiple sections instead of a single progress bar.
Note that in this case value
prop will be ignored:
Colors
In previous examples colors from theme.colors
were used, but any other css colors can be used instead:
Example
Password strength meter example with Progress component:
Size
Size controls progress bar height. Progress has predefined sizes: xs, sm, md, lg, xl. Alternatively, you can use a number to set height in px:
Radius
Radius controls border-radius of body and filled part. xs, sm, md, lg, xl radius values are defined in theme.radius. Alternatively, you can use a number to set radius in px:
With label
Accessibility
- Progress bar element has
role="progressbar"
attribute - Progress bar element has
aria-valuenow
attribute with current value aria-valuemin
andaria-valuemax
attributes are always set to 0 and 100 as component does not support other values
Provide aria-label attribute to label progress: