Version 5.0.0

Progress bar

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

Example of a progress bar in action, with 'Load Data' label, filling track to value of 100%.

Anatomy#


Diagram of the anatomy of a progress bar, including label, track, value, and fill.

Options#


Example of the progress bar default variant with blue fill and gray track, label Loading data at 33%.

Default variant#

Progress bars are used to visually show the progression of a system operation such as downloading, uploading, processing, etc. By default, progress bars have a blue fill that shows the progress.

Example of the progress bar 'over background' variant.

Over background variant#

When a progress bar needs to be placed on top of a colored background, use the over background variant. This progress bar uses a static white color regardless of the color theme. Make sure the background offers enough contrast for the progress bar to be legible.

Example of progress bar with everything grayed out, except for label Loading data, positioned above the track left-aligned.

Label#

Progress bars should have a label that gives context about the operation being performed. In rare cases where context is sufficient and an accessibility expert has reviewed the design, the label could be undefined. These progress bars should still include an aria-label in HTML (depending on the context, “aria-label” or “aria-labelledby”). The label is always placed above the track.

Example of progress bar with everything grayed out, except for value label 33%, positioned above the track right-aligned.

Value label#

Progress bars can have a value label that gives detailed information about the progress (e.g. "60%" or "2 of 8"). This value label works alongside the label and should not be displayed if the label itself is not displayed. It should also not be displayed if the progress is indeterminate. Similar to the label, the value label is always placed above the track.

Example of 2 progress bars at different widths.

Width#

The width of a progress bar can be customized appropriately for its context. The default width is size-2400 (192 px on desktop and 240 px on mobile).

Example of two progress bars, large and small.

Size#

Progress bars come in 2 sizes: large (default) and small. Use the large size when there is a single operation displayed prominently on the page. Use the small size when there are multiple operations happening at the same time in a more confined space (e.g., tables, cards, etc.)

Example of two progress bars, comparing indeterminate with determinate.

Indeterminate#

A progress bar can be either determinate or indeterminate. By default, progress bars are determinate. Use a determinate progress bar when progress can be calculated against a specific goal (e.g., downloading a file of a known size). Use an indeterminate progress bar when progress is happening but the time or effort to completion can’t be determined (e.g., attempting to reconnect to a server).

Example showing 2 determinate progress bars, with values 0.25 and 1.00.

Value#

The value shows the progress of a system operation, from 0 to 1, such as downloading, uploading, processing, etc. This is not applicable when a progress bar is indeterminate.

Table of options#

From the design point of view, each component has a number of options. These options and their names are platform agnostic, and each implementation should adapt these to fit into their framework.

PropertyValuesDefault Value
variant
default / over background
default
label
text / nothing
value label
text / nothing
width
number
size-2400
size
small / large
large
is indeterminate
yes / no
no
value
number (0 to 1)
Not applicable when indeterminate.
0

Behaviors#


Example of progress bar with a label text that wraps to a second line.

Text overflow#

When the label is too long for the available horizontal space, it wraps to form another line. The value is always shown in full and never wraps or truncates.

Usage guidelines#


Progress bar or progress circle?#

Both progress bars and circles can show either determinate or indeterminate progress. The given area should help determine if a progress bar or circle is best for that space. Progress bars are preferred in vertically narrow areas (tables, cards, etc.) Use a progress circle for full page loading or in very small areas. Use a progress bar in a loader dialog.

Illustration of progress bar in context of preferred use in vertically narrow design.

Labels#

Use the built-in style for showing a label associated with the operation. The built-in style always has a left aligned label and a right aligned percentage value above the track. The label should be in sentence case.

Illustration of a progress bar implemented with the preferred built-in label.

Do use the built-in label style.

Illustration of a progress bar implemented with a non-preferred custom label center-aligned.

Internationalization#


Key example of indeterminate and determinate progress bar using a mirrored RTL layout.

RTL#

For RTL (right-to-left) languages, the layout of the progress bar is mirrored for both determinate and indeterminate options. The label is right-aligned, the value is left-aligned, and the fill progresses from right to left. Keep in mind that the placement of the percent sign differs depending on the locale.

Changelog#


DateNumberNotes
Apr 23, 20206.0.0
  • "Bar loader" has been renamed to "progress bar"
Dec 11, 20195.1.1
  • Updated RTL internationalization guideline to include the indeterminate option
Aug 21, 20195.1.0
  • Added text overflow behavior
Apr 18, 20195.0.0
  • This component is now individually versioned (individual versions of existing components start at 5.0.0)
  • Added an indeterminate variant
  • Added RTL (right-to-left) guidelines

Design checklist#


N/A

All interactive states

Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).

Multiple options

Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)

All color themes

Works properly across all four color themes (lightest, light, dark, darkest).

All platform scales

Includes a desktop scale (UWP, macOS, web desktop) and a mobile scale (iOS, Android, web mobile).

Defined behaviors

Includes guidelines for layout (wrapping, truncation, overflow), animation, interactions, etc.

Usage guidelines

Includes a list of dos and don’ts that highlight best practices and common mistakes.

Accessible contrast

Follows WCAG 2.0 standards for contrast (AA).

Internationalization guidelines

Works properly across various locales and includes guidelines for bi-directionality (RTL).

N/A

Keyboard interactions

Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.

Generated UI kit

Includes a downloadable XD file that has been generated by code and shows multiple variations, states, color themes, and scales.

Design tokens

All design attributes (color, typography, layout, animation, etc.) are included in Spectrum DNA.