Stepper
The <x-wirekit::stepper> component shows progress through a multi-step flow. Each step is automatically styled based on its position relative to the current step: completed (filled), current (outlined), or upcoming (muted).
Usage
-
Completed:Cart
-
Shipping
-
Payment
-
Confirm
Steps before current show a checkmark. The current step is outlined with the accent color. Upcoming steps are muted.
With Descriptions
-
Completed:CartReview items
-
Completed:ShippingAddress details
-
PaymentCard info
-
ConfirmFinal review
Vertical Orientation
-
Completed:AccountCreate your account
-
ProfileTell us about you
-
PlanChoose a plan
Props
| Prop | Type | Default | Description |
|---|---|---|---|
steps |
array |
[] |
Array of step labels (strings) or ['label' => .., 'description' => ..] arrays |
current |
int |
1 |
1-based index of the current step |
orientation |
string |
'horizontal' |
'horizontal' or 'vertical' |
scope |
string|null |
null |
Scoped personalization key |
Accessibility
- Outer
<ol aria-label="Progress">— semantic ordered list - Current step marked with
aria-current="step"on its<li> - Completed steps include a visually hidden "Completed:" label for screen readers
- Step numbers and icons are
aria-hidden="true"(state conveyed viaaria-current) - Connector lines are
aria-hidden="true"(decorative)
Keyboard Interaction
The stepper is a purely presentational progress indicator — a semantic <ol> of steps with no focusable or clickable controls of its own. There is no step to activate: the current position is conveyed with aria-current, and the numbers, icons and connector lines are aria-hidden. Nothing to tab to, nothing to press.
If your flow needs the user to navigate between steps, use <x-wirekit::wizard>: it holds the step, gates advancing on a per-step condition, announces the change to a screen reader, and renders this stepper inside itself. The stepper reflects state either way — it does not own the navigation, and the wizard does not change that.
Driving current from your own controls stays perfectly valid and is the right answer when the flow's state already lives somewhere else.
Pitfalls
- The stepper does not make steps clickable. It shows where the user is; it is not a nav. If you want jump-back, add your own buttons/links and update
current— and only allow non-linear jumps when the flow genuinely is non-linear (a clickable jump-back in a checkout undermines progress validation).<x-wirekit::wizard>keeps the same position: it adds Back and Next around the stepper and leaves the indicator presentational.
Design Tokens
| Token | Used for |
|---|---|
--font-wk-heading-weight |
Step number font weight |
--text-wk-xs / --text-wk-sm |
Step number / label font size |
--color-wk-text |
Active + completed step label |
--color-wk-text-muted |
Pending step label |
--color-wk-accent |
Active + completed circle background |
--color-wk-accent-fg |
Active + completed circle text |
--color-wk-bg |
Pending circle background |
--color-wk-border |
Pending circle border + connector line |
--border-wk-width |
Circle + connector border width |
--padding-wk-x-sm / --padding-wk-y-xs / --padding-wk-y-md |
Step item padding |
--transition-wk-duration |
State transition |
Customization
Accent Color
The step indicator circles use --color-wk-accent for the current and completed states. Override it to match your brand:
-
Completed:Cart
-
Completed:Shipping
-
Payment
-
Confirm
-
Completed:Cart
-
Shipping
-
Payment
-
Confirm
Completed Step at End
-
Completed:Cart
-
Completed:Shipping
-
Completed:Payment
-
Completed:Confirm
Vertical with Custom Color
-
Completed:Order PlacedApril 1, 2026
-
Completed:ProcessingApril 2, 2026
-
ShippedEstimated April 5
-
DeliveredPending
Design Tokens
| Element | Token |
|---|---|
| Circle completed bg | --color-wk-accent |
| Circle completed text | --color-wk-accent-fg |
| Circle current border | --color-wk-accent |
| Circle current text | --color-wk-accent |
| Circle upcoming border | --color-wk-border |
| Circle upcoming text | --color-wk-text-muted |
| Connector line | --color-wk-border |
| Label text | --color-wk-text |
| Description text | --color-wk-text-muted |
| Circle size | w-8 h-8 (2rem) — override via scoped personalization |
| Font weight (circle) | --font-wk-heading-weight |
| Transition | --transition-wk-duration |
To change the circle size globally, use scoped personalization:
// config/wirekit.php
'personalizations' => [
'stepper' => [
'my-scope' => [
'circle' => 'w-10 h-10 text-base', // larger circles
],
],
],
<x-wirekit::stepper scope="my-scope" :steps="['A', 'B', 'C']" :current="2" />
Config Defaults
The defaults live in config/wirekit.php under components.stepper. Override them globally:
'components' => [
'stepper' => ['orientation' => 'vertical'], // default to vertical
],
Further Reading
- MDN:
aria-current— used with value"step"to mark the active step - MDN:
<ol>element — semantic ordered list - WAI-ARIA: step indicator patterns