Progress bars
A component that visually communicates the completion of a task or operation. It shows the task’s progress and remainder.
These are the various classes and parameters used within progress bars.
Classes | Description |
---|---|
.s-progress |
The parent class for all progress bars. |
.s-progress--bar |
A child element of .s-progress . It shows the user’s current progress to accomplishing a goal with a background color. |
.s-progress--label |
A child element of .s-progress . It’s used to describe what progress bar is tracking. |
.s-progress__brand |
A modifying class applied to .s-progress , it changes the bar color from green to orange. |
.s-progress__info |
A modifying class applied to .s-progress , it changes the bar color from green to blue. |
.s-progress__privilege |
A modifying class applied to .s-progress , it changes the bar color from green to a lighter green (for legibility reasons). |
.s-progress__badge |
A modifying class applied to .s-progress , it is applied when a badge progress bar is desired. |
.s-progress__gold |
A modifying class applied to .s-progress__badge , it is used when a gold badge progress bar is desired. |
.s-progress__silver |
A modifying class applied to .s-progress__badge , it is used when a silver badge progress bar is desired. |
.s-progress__bronze |
A modifying class applied to .s-progress__badge , it is used when a bronze badge progress bar is desired. |
.s-progress__stepped |
A modifying class applied to .s-progress for a stepped progress bar |
.s-progress--step |
A child of .s-progress__stepped that’s a wrapper for each individual step |
.is-active |
A modifier .s-progress__step that adds visual styling to the active step. |
.is-completed |
A modifier .s-progress__step that adds visual styling to a completed step. |
.s-progress--stop |
A child of .s-progress__step , the circle that might contain a checkmark if the step’s been completed. |
.s-progress--bar__left |
A modifier of .s-progress__bar that draws a line on the left side of a step. |
.s-progress--bar__right |
A modifier of .s-progress__bar that draws a line on the right side of a step. |
Parameter | Description |
---|---|
role="progressbar" |
Applied to .s-progress--bar , this parameter communicates that element is displaying progress status that takes a long time or consists of several steps. (Source) |
aria-valuemin |
Applied to .s-progress--bar , this parameter defines the minimum allowed value for the progress bar. (Source) |
aria-valuemax |
Applied to .s-progress--bar , this parameter defines the maximum allowed value for the progress bar. (Source) |
aria-valuenow |
Applied to .s-progress--bar , this parameter defines the current value for the progress bar. (Source) |
style="width: [value]%" |
Applied to .s-progress--bar , this is the aria-valuenow value displayed as a percentage. |
Since most progress bars are used to show successful completion of a task, the default fill color is green.
In addition to the standard progress bar, there is also a brand (orange) and info (blue) progress bar color variation.
Taller progress bars used within Profiles to help users understand how close they are to achieving their next privilege.
Taller progress bars used within Profiles to help users understand how close they are to achieving their next gold, silver, or bonze badge.
If your experience has a small number of discrete steps, it might be appropriate to use a stepped progress bar.