Stepper
A numbered step-progress indicator for wizards and checkouts. It renders from a steps array and marks each step complete, current, or upcoming — horizontally or vertically, with optionally clickable steps.
- Completed:Cart
- Details
- Payment
- Review
Installation
Copy the piece into your app — it compiles with your build and the code is yours:
puzzle add piece stepper
Requires the pieces.css tokens merged into your app styles (see Introduction).
Usage
import Stepper from '@/components/ui/Stepper.pzl';
<Stepper steps={ checkout } value={ 1 } />Vertical orientation
- Completed:Create accountYour name and a password.
- Verify emailConfirm the link we sent.
- Invite teamAdd teammates by email.
- DoneStart using the workspace.
Pass an optional description on any step and it renders beneath the label. Vertical is the natural fit when steps carry longer descriptions.
Clickable steps
- Completed:Cart
- Details
- Payment
- Review
In clickable mode every reachable step (completed or current) is a real <button> and activating one fires @stepChange(index). Upcoming steps stay non-interactive — advance them from your own controls, like the Back / Next buttons here.
States
- Completed:Complete
- Completed:Complete
- Current
- Upcoming
Each step is derived from value: steps before it are complete (filled, with a check), the step at value is current (ringed, carrying aria-current="step"), and later steps are upcoming (muted). value is optional-controlled: omit it and a clickable Stepper tracks the current step itself.