<cs-progress-bar>
StableFeedbackSince 0.1

Progress bars show how far along an ongoing operation is as a horizontal fill. Use them for file uploads, multi-step flows, or any task with measurable progress.

Examples

Label

Use the label attribute to tell assistive devices how to announce the progress bar.

Indeterminate

Add the indeterminate attribute when an operation is pending but its progress can’t be measured. In this state, value is ignored and the label, if present, isn’t shown.

Customizing

Set the --track-height custom property to change the bar’s thickness, and --track-color / --indicator-color to recolor it.

Showing Values

Use the default slot to show a value inside the bar.

50%

API

Importing

If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick this component, use one of the following snippets.

npm Self-Hosted React
import '@cruglobal/cornerstone-components/components/progress-bar/progress-bar.js';
import './cornerstone/components/progress-bar/progress-bar.js';
import CsProgressBar from '@cruglobal/cornerstone-components/react/progress-bar/index.js';

Slots

Learn more about using slots.

NameDescription
(default)A label to show inside the progress indicator.

Attributes & Properties

Learn more about attributes and properties.

PropertyAttributeDescriptionTypeDefaultReflects
indeterminateindeterminateWhen true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state.booleanfalseYes
labellabelA custom label for assistive devices.string''
valuevalueThe current progress as a percentage, 0 to 100.number0Yes

CSS Custom Properties

Learn more about CSS custom properties.

NameDescriptionDefault
--indicator-colorThe color of the indicator.var(--cs-color-brand-fill-loud)
--track-colorThe color of the track.var(--cs-color-neutral-fill-normal)
--track-heightThe height of the track.1rem

CSS Parts

Learn more about CSS parts.

NameDescriptionCSS selector
indicatorThe progress bar's indicator.::part(indicator)
labelThe progress bar's label.::part(label)
progress-barThe component's outer wrapper.::part(progress-bar)