Skip to content
Fleetline

Progress bar

Usage

Use a progress bar for tasks that take more than a couple of seconds and whose progress you can measure: uploading inspection photos, importing a vehicle CSV, generating a monthly cost report. Use the indeterminate state when the total is unknown.

Anatomy

  1. Label — <label class="progress__label" for> naming the task
  2. Value — .progress__value, percentage in tabular numerals
  3. Track and fill — native <progress class="progress__bar">
  4. Hint — .progress__hint, counts or the outcome, with an icon on complete/error

Examples

Progress bar

60%

12 of 20 photos

Importing…

Checking VINs. This can take a minute.

100%

Report ready — September 2026, 42 vehicles

35%
40%

Thin bar for page-top loading; needs an aria-label because it has no visible label.

<div class="progress">
  <div class="progress__header">
    <label class="progress__label" for="pb-photos">Uploading inspection photos</label>
    <span class="progress__value" aria-hidden="true">60%</span>
  </div>
  <progress id="pb-photos" class="progress__bar" max="100" value="60" aria-describedby="pb-photos-hint">60%</progress>
  <p class="progress__hint" id="pb-photos-hint">12 of 20 photos</p>
</div>

<!-- Indeterminate: omit value -->
<progress class="progress__bar" max="100">Importing…</progress>

<!-- Outcome: tone + text; announce once -->
<div class="progress" data-state="complete | error">… <p class="progress__hint" role="status | alert">…</p></div>

API

HookValuesPurpose
.progressblockWrapper for label, bar and hint
progress.progress__bar value / maxnative attributesDeterminate; omit value for indeterminate
data-state="complete | error"attributeOutcome tone (success / danger)
.progress--thinmodifier4px track for page-top loading
.progress__header | __label | __value | __hintpartsSee anatomy

Do and don't

"Uploading inspection photos — 12 of 20 photos"

Do name the task and give a count people can trust.

A bar that jumps to 99% and waits there.

Don't fake progress. If you can't measure it, use the indeterminate state.

Accessibility

Tokens

Custom propertyPurpose
--color-bg-mutedTrack
--color-action-primary-bgFill (in progress)
--color-feedback-success-icon | -fgComplete fill and hint
--color-feedback-danger-icon | -fgError fill and hint
--space-2 | -1, --radius-fullTrack height (default / thin) and shape
--motion-duration-base | -slowerValue change, indeterminate sweep