Dark Light
System
Default LBBW Jira Confluence Source Code
Share
Playground

Progress Bar

<afp-progress-bar> Since 1.0.0 stable This component uses the light DOM, so its markup and styles are part of the regular document flow.

A progress bar component to visually represent the completion of a task or process.

Examples #

Variants #

Use the variant attribute to set the progress bar's semantic variant.

Shapes #

Use the shape attribute to change a progress bar's shape.

Display Value #

Use the info attribute to display the progress value inside the bar.

Indeterminate #

Use the indeterminate attribute to make a progress bar busy. You can also customize the indeterminate animation duration using the CSS variable --afp-progress-bar-indeterminate.

Custom Value #

Use the default slot to set a custom value inside the progress bar.

Custom Value

Custom Height #

Use the CSS variable --afp-progress-bar-height to set a custom height for the progress bar.

Properties

Learn more about properties.

Name Description Reflects
indeterminate
enables loading style and disables the progress bar
Type boolean
Default false
value
value which is displayed in the progress bar
Type number
info
shows value in progress bar.
Type boolean
Default false
label
a label that describes the progress bar for assistive devices.
Type string
variant
variant of progress bar
Type
AfpVariant
Name Description
NEUTRAL
The main call-to-action.
BRAND
Less prominent than primary.
ACCENT
Secondary highlight for emphasis.
ERROR
Used for destructive or critical actions.
INFO
Conveys general information.
SUCCESS
Indicates a successful or positive action.
WARNING
Communicates cautionary actions.
AfpVariant
Default AfpVariant.NEUTRAL
shape
shape of the progress bar
Type
AfpShape
Name Description
PILL
Makes the component circular.
ROUNDED
Makes the component rounded.
SOFT
Makes the component have soft edges.
SQUARE
Makes the component square.
AfpShape
Default AfpShape.PILL

Events

Learn more about events.

Name Return Description
afp-value-changed number
Emitted when the progress bar's value changes.

Slots

Learn more about slots.

Name Description
default
Default slot used to customize the value display inside the progress bar.

Internationalization

Learn more about internationalization.

Key Description
progress-bar.aria-label
The default `aria-label` text for Progress bar

CSS Parts

Learn more about CSS Parts.

Name Description Selector
base
The component's base wrapper.
::part(base)
wrapper
The outer container that is enclosing the indicator
::part(wrapper)
indicator
The container for the indicator that represents the progress by filling the progress bar
::part(indicator)

CSS Custom Properties

Name Description Default
--afp-progress-bar-height
The height of the progress bar
--afp-size-xs
--afp-progress-bar-indeterminate
The indeterminate animation time for the progress bar
2.5s

Importing

Using the bundle is the recommended method to include components. If you’d rather handle imports manually, you can use the code examples below.

import '@afp-design-system/core/dist/components/progress-bar/progress-bar.js';
Share
Create a link with a predefined theme that is automatically applied when the generated link is opened. Default LBBW Presentation Mode
Abort Copy Link