One step in an <orb-wizard>.

Usage

<orb-wi> is one step in an <orb-wizard>. Its content is the label. Add active to the current step and completed to finished ones. See Wizard for examples.

Account Profile Optional Team Notifications
<orb-wizard>
  <orb-wi completed>Account</orb-wi>
  <orb-wi active>
    Profile
    <span slot="note">Optional</span>
  </orb-wi>
  <orb-wi disabled>Team</orb-wi>
  <orb-wi error="Email not verified">Notifications</orb-wi>
</orb-wizard>

Only one step is active at a time. Setting active on a step makes the others inactive.

The wizard sets these data attributes on each step, for styling. Don’t set them yourself.

Attribute Meaning
data-index The step’s position, starting at 0
data-locked The wizard is linear and the step can’t be reached yet
data-clickable The wizard is clickable
data-stacked The steps are laid out vertically
data-previous-completed The step before this one is completed
data-previous-variant The step before this one’s variant, or danger if it has an error

Each step also has the active, completed, locked, and error custom states, so orb-wi:state(completed)::part(marker) targets a completed step’s marker.

Properties

active

Description The current step. Setting it on one step makes the others inactive.
Attribute active
Type boolean
Default false

attention

Description Animates the marker to draw attention to the step. Disabled when the user prefers reduced motion.
Attribute attention
Type "bounce" | "pulse"
Default undefined

completed

Description Marks the step as finished. The wizard never sets this itself.
Attribute completed
Type boolean
Default false

disabled

Description Keeps the step visible but unreachable
Attribute disabled
Type boolean
Default false

error

Description Marks the step as failed and shows this message under the label
Attribute error
Type string
Default undefined

loading

Description Shows a spinner in the marker and sets aria-busy
Attribute loading
Type boolean
Default false

variant

Description Colors the marker. Color alone doesn’t carry meaning, so explain the reason in the label, note, or error.
Attribute variant
Type "danger" | "primary" | "success" | "warning"
Default "primary"

Slots

Slot Description
The step’s label
"icon" Replaces the number, checkmark, or spinner in the marker
"note" Supporting text under the label

Shadow Parts

Part Description
"button" The button wrapping the step when the wizard is clickable
"connector" The line between markers
"error" The error message
"label" The label
"labels" The wrapper around the label, note, and error
"marker" The circle with the number, checkmark, or icon
"note" The note

CSS Custom Properties

Name Description
--pulse-color Color of the attention="pulse" ring

Dependencies

Depends on

Graph

graph TD; orb-wi --> orb-loading style orb-wi fill:#f9f,stroke:#333,stroke-width:4px