Progress Bar is a determinate indicator that informs the user of the percentage of completion of a system operation.
Usage
Accessibility
The component leverages semantic HTML elements like <progress>
and <output>
to provide inherent accessibility features. However, a consumer must provide an appropriate localized label, ensuring that the progress bar component is usable by all individuals, including those relying on assistive technologies. It can be provided in any of the below-mentioned ways:
1. If there’s no visible text to describe the progress bar, you can add an aria-label
directly to the ProgressBar
/ Progress
(in case using composed components)
2. Use a <label>
tag linked with the ProgressBar
/ Progress
(in case using composed components) or any other element like span
or a div
to describe the progress bar via aria-labelledby
.
Convenience Component
ProgressBar
ProgressBar
has no props of its own
All props are forwarded to the element specified in the as
prop (default: <progress/>
)
The React ProgressBar
is a convenience component made of these sub-components:
Note that if you use this API, ProgressBarContainer
uses the className
prop instead of Progress
.