Skip to content

Progress

A progress bar: a storage quota, an upload, a task completion rate.

The label is visually hidden: show the value next to the bar yourself, as above.

For work of unknown length, indeterminate animates the bar and ignores value:

striped draws diagonal stripes on the bar, animated also moves them:

Put several Progress:Bar in one track to split it into segments. The children replace the single bar the props render:

separated adds a gap between the bars:

Progress:Stacked follows Bootstrap 5.3’s stacked markup (progress-stacked): each Progress:Segment is its own track, sized to its share, with its own role="progressbar" and aria-label; the fill inside it has no role. Use it when each segment needs a name, such as the share of each file type in a storage quota. separated adds a gap between the segments (progress-separated):

Prop Type Default Description
value int? null 0 to 100: renders a single Progress:Bar; no bar when null
variant string 'primary' Color of the single bar, see Progress:Bar
size string 'md' sm md lg xl (progress-*)
label string? null Visually-hidden text of the single bar (not rendered with indeterminate)
indeterminate bool false Renders a single indeterminate bar
striped bool false Stripes on the single bar, see Progress:Bar
animated bool false Animated stripes on the single bar, see Progress:Bar
separated bool false Gap between stacked bars (progress-separated)

Other attributes go to the root <div class="progress">.

Component Renders
Progress:Bar <div class="progress-bar" role="progressbar">, with its width and aria-value* attributes
Progress:Stacked <div class="progress-stacked">: a row of Progress:Segments; separated (default false) adds a gap
Progress:Segment <div class="progress" role="progressbar"> sized to its share, holding a <div class="progress-bar">
Prop Type Default Description
value int? null 0 to 100: sets the width and aria-valuenow
variant string 'primary' primary secondary success danger warning info dark light (bg-*)
label string? null Visually-hidden text (<span class="visually-hidden">)
indeterminate bool false Animated bar (progress-bar-indeterminate); ignores value
striped bool false Diagonal stripes (progress-bar-striped)
animated bool false Animated stripes (progress-bar-striped progress-bar-animated); implies striped

Other attributes go to the bar <div>. A style is added after the width, so it can override it.

Prop Type Default Description
value int 0 Share of the whole, in percent: sets the width and aria-valuenow
variant string 'primary' Bar color, as for Progress:Bar
label string? null aria-label of the segment; defaults to “value% of total”
striped bool false Diagonal stripes (progress-bar-striped)
animated bool false Animated stripes (progress-bar-animated)

Other attributes go to the <div class="progress">. A style attribute is merged after the width.

Block Default
bar A Progress:Bar from value, variant, label, striped and animated, or an indeterminate one
content bar: replace it (with children) to stack bars
content (Progress:Bar) The visually-hidden label, when it is set

Progress:Stacked has an empty content block for its segments. Progress:Segment has no block.