Progress Bar
<wa-progress-bar>
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
Labels
Use the label attribute to label the progress bar and tell assistive devices how to announce it.
Custom Height
Use the --track-height custom property to set the progress bar's height.
Showing Values
Use the default slot to show a value.
Indeterminate
The indeterminate attribute can be used to inform the user that the operation is pending, but its status cannot currently be determined. In this state, value is ignored and the label, if present, will not be shown.
Importing
If you're using the autoloader or a hosted project, components load on demand — no manual import needed. To cherry-pick a component manually, use one of the following snippets.
Import this component directly from the CDN:
import 'https://ka-f.webawesome.com/[email protected]/components/progress-bar/progress-bar.js';
After installing Web Awesome via npm, import this component:
import '@awesome.me/webawesome/dist/components/progress-bar/progress-bar.js';
If you're self-hosting Web Awesome, import this component from your server:
import './webawesome/dist/components/progress-bar/progress-bar.js';
To import this component for React 18 or below, use the following code:
import WaProgressBar from '@awesome.me/webawesome/dist/react/progress-bar/index.js';
Slots
Learn more about using slots.
| Name | Description |
|---|---|
| (default) | A label to show inside the progress indicator. |
Attributes & Properties
Learn more about attributes and properties.
| Name | Description | Reflects | |
|---|---|---|---|
css |
One or more CSSResultGroup to include in the component's shadow root. Host styles are automatically prepended.
Type
CSSResultGroup | undefinedDefault
styles |
||
indeterminateindeterminate |
When true, percentage is ignored, the label is hidden, and the progress bar is drawn in an indeterminate state.
Type
booleanDefault
false |
|
|
labellabel |
A custom label for assistive devices.
Type
stringDefault
'' |
||
valuevalue |
The current progress as a percentage, 0 to 100.
Type
numberDefault
0 |
|
CSS custom properties
Learn more about CSS custom properties.
| Name | Description |
|---|---|
--indicator-color |
The color of the indicator.
Default
var(--wa-color-brand-fill-loud)
|
--track-color |
The color of the track.
Default
var(--wa-color-neutral-fill-normal)
|
--track-height |
The color of the track.
Default
1rem
|
CSS parts
Learn more about CSS parts.
| Name | Description | CSS selector |
|---|---|---|
base |
The component's base wrapper. |
::part(base)
|
indicator |
The progress bar's indicator. |
::part(indicator)
|
label |
The progress bar's label. |
::part(label)
|