Vanilla Breeze

progress-tracker

Multi-step progress bar for wizard / checkout / onboarding flows. Status per step (complete / current / upcoming / error). Distinct from (slide-to-confirm).

Overview

<progress-tracker> renders a horizontal multi-step progress indicator for wizards, checkout, onboarding, fulfillment status — anywhere a user moves through a sequence and may need to see where they are.

Author renders steps as <li data-step> children; the component decorates each with a numbered circle, connector line, and status (complete / current / upcoming / error). Step navigation is author-driven via the data-current attribute; with data-clickable, completed steps become clickable to navigate back.

When to use which primitive

Use thisWhen
<progress-tracker>Multi-step linear progress (wizard, checkout, onboarding, order tracking).
<slide-accept>Slide-to-confirm UX. Different shape (single action, not multi-step).
Native <progress>Continuous progress (download, processing). progress-tracker is for discrete labelled steps.

Author surface

data-current can be a 1-based index ("2") or a step id ("profile"). Step ids are stable strings — useful when steps may be added or removed conditionally.

Status states

StatusWhenVisual
completeStep is before data-currentFilled green circle with ✓; connector to next step is green.
currentStep matches data-currentOutlined accent circle with the step number; emphasized via ring.
upcomingStep is after data-currentOutlined muted circle with the step number; muted connector.
errorStep has data-error regardless of positionFilled red circle with ! and red label.

Clickable steps

Set data-clickable to allow users to click on completed steps to navigate back. Forward navigation requires the wizard to set data-current after validation (the component does not let users skip ahead).

Accessibility

  • Host: role="list" with aria-label="Progress" (override via the host's aria-label).
  • Each step: role="listitem"; the active step also gets aria-current="step".
  • Per-step aria-label: derived as Step N of M: <label> (<status>) so AT users hear position + status in one announcement.
  • Clickable mode: roving tabindex — only the current step is in the tab sequence; arrow keys move the visual focus indicator to other steps. Click activation handled at the step level.

Attributes

AttributeTypeDefaultDescription
data-currentstring1 (first step)1-based index OR step id of the active step.
data-clickablebooleanfalseAllow clicks on completed steps to navigate back.
aria-labelstringProgressList label.

Per-step attributes (on <li data-step>)

AttributeDescription
data-stepStable step id (typically a 1-based number; can be any string).
data-errorMarks this step as errored regardless of position.

Events

EventBubblesDetail
progress-tracker:stepyes{ step, previousStep, source: 'attr'|'click' }

CSS custom properties

PropertyDefaultPurpose
--pt-circle-size1.75remDiameter of the step circle.
--pt-line-thickness2pxConnector line thickness.
--pt-color-complete--color-successFill / connector color for completed steps.
--pt-color-current--color-interactiveOutline / ring color for the active step.
--pt-color-upcoming--color-borderOutline / connector color for upcoming steps.
--pt-color-error--color-errorFill color for errored steps.

See also