0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
Multi-step progress bar for wizard / checkout / onboarding flows. Status per step (complete / current / upcoming / error). Distinct from <slide-accept> (slide-to-confirm).
Overview
<progress-tracker> renders a 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.
Write the steps as a native <ol> inside the element. Without JavaScript it is a plain numbered list; once upgraded, the component decorates each <li> with a numbered circle, connector line and status (complete / current / upcoming / error). The author's label markup (links, <small> sub-labels, icons) is kept, not flattened. Step navigation is author-driven via data-current; with data-clickable, completed steps become buttons that go back.
When to use which primitive
Use this
When
<progress-tracker>
Multi-step linear progress driven by script (wizard, checkout, onboarding, order tracking): status per step, error state, step events.
data-current is matched against the steps' data-step ids first, then read as a 1-based index. Ids are stable strings, so they keep pointing at the right step when steps are added or removed conditionally — numeric ids such as "2024" are safe because an id match always wins. data-step is optional; without it a step's id is its position. Steps added to the list later are decorated automatically.
Status states
Status
When
Visual
complete
Step is before data-current
Filled green circle with ✓; connector to the next step is green.
current
Step matches data-current
Outlined accent circle with the step number; emphasized via ring.
upcoming
Step is after data-current
Outlined muted circle with the step number; muted connector.
error
Step has data-error regardless of position
Filled red circle with ! and red label; the connector leaving it is red.
Five or more steps squeeze their labels on a phone. data-direction="vertical" stacks the steps with a vertical connector, labels beside the circles.
Vertical order status
123456789
<progress-trackerdata-current="4"data-direction="vertical"data-label-list="Order status"><ol><li>Order placed</li><li>Packed</li><li>Shipped</li><li>Out for delivery</li><li>Delivered</li></ol></progress-tracker>
Clickable steps
Set data-clickable to let users go back to a completed step. Each completed step's label is rendered inside a native <button>, so it is in the tab order and works with Enter and Space as well as the pointer. The current and upcoming steps are not activatable: forward navigation requires the wizard to set data-current after validation. Activating a step fires one progress-tracker:step event with source: 'click'.
Wiring step clicks
12345678910111213141516
const tracker = document.querySelector('progress-tracker');tracker.addEventListener('progress-tracker:step', (e) => {const { step, previousStep, source } = e.detail;// source: 'click' (user activated a completed step) or 'attr' (programmatic)if (source === 'click') {showStep(step); // restore form state for that step }});// Programmatic forward navigation after validationfunctiongoToStep(stepId) {if (validateCurrentStep()) { tracker.setAttribute('data-current', stepId); }}
Accessibility
List: the steps are your native <ol>. The component names it from data-label-list on the host (default Progress) unless the <ol> already has aria-labelledby or aria-label. Prefer data-label-list or aria-labelledby pointing at a visible heading.
Current step: gets aria-current="step". When the current step changes after the page has loaded, the new step is announced politely to screen readers, for example Step 2 of 4: Profile (data-label-announce). The step shown on load is not announced.
Position and status: each step carries visually hidden text read with its label, for example Step 1 of 4: Account (completed). The circle glyphs (✓, !, numbers) are aria-hidden. All strings are attributes (below), so they can be translated.
Keyboard (clickable mode): completed steps are native buttons — Tab reaches them, Enter or Space activates. There are no arrow-key bindings; the current and upcoming steps are not focusable.
Forced colors: connectors are redrawn in CanvasText, complete and error circles use Highlight, and the current circle gets a solid outline ring.
Right-to-left: connectors use logical properties, so the tracker mirrors in RTL pages.
Stable step id (any string; defaults to the 1-based position).
data-error
Marks this step as errored regardless of position.
data-status
Set by the component (complete · current · upcoming · error); use it as a styling hook.
Events
Event
Bubbles
Detail
progress-tracker:step
yes
{ step, previousStep, source: 'attr'|'click' }. Fires when data-current changes after the element has upgraded, or once when a completed step is activated. Not fired on upgrade, nor when the current step is clicked.
CSS custom properties
Property
Default
Purpose
--pt-circle-size
1.75rem
Diameter of the step circle.
--pt-line-thickness
2px
Connector line thickness.
--pt-color-complete
--color-success
Fill / connector color for completed steps.
--pt-color-current
--color-interactive
Outline / ring color for the active step.
--pt-color-upcoming
--color-border
Outline / connector color for upcoming steps.
--pt-color-error
--color-error
Fill / connector color for errored steps.
--pt-color-text-on-fill
--color-text-on-interactive-auto
Glyph color on filled (complete / error) circles.
See also
data-wizard — the multi-step form behaviour. Point data-wizard-steps at a <progress-tracker> and the wizard sets data-current on every step change (one <li> per step fieldset, in order); with data-clickable, clicking a completed step moves the wizard back.