Skip to content

ProgressBar ​

A ProgressBar is a visual element used to indicate the progress of an action or process.

NameValue
Props
inline
aria-label
disabled
View
Reading direction

Overview ​

When to use ProgressBar ​

Use a ProgressBar when you want to provide real-time feedback on the progress of ongoing operations, such as file uploads or form submissions. There are different types of ProgressBars, depending on your intended use.

  1. Default ProgressBar indicates that the ongoing system process will affect an entire view or page area.
  2. Inline ProgressBar is available to indicate progress within other components, such as Menu or Dialog.

Avoid using a ProgressBar if the progress of a task is not crucial to user understanding or if the task is expected to complete quickly.

About ProgressBar ​

ProgressBar includes the following elements.

Progress element ​

Visual representation of the progress displayed as a filled blue bar.

Bar container ​

Background container that holds the progress bar.

Examples ​

Basic usage ​

WARNING

Due to the lack of descriptive text, a default ProgressBar requires one of the following attributes: aria-label or aria-hidden.

The aria-label attribute must be applied to the ProgressBar to ensure it is accessible to assistive technology users. An exception is an inline ProgressBar used within another component, such as the Menu component, where they are excluded from the accessibility tree by adding aria-hidden attribute.

Inline ​

An inline version is available for use within other components. See Menu for sample usage.

Technical implementation ​

Vue usage ​

Props ​

Prop nameDescriptionTypeDefault
inlineWhether this is the smaller, inline variant.booleanfalse
disabledWhether the progress bar is disabled.booleanfalse

CSS-only version ​

Markup structure ​

Inline ​

For an inline ProgressBar, add the cdx-progress-bar--inline class to the root <div>.

Disabled ​

For a disabled ProgressBar, add the cdx-progress-bar--disabled class to the root <div>.