Searching Puzzle Pieces

Type to search Puzzle Pieces.

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.

  1. Completed:
    Cart
  2. Details
  3. Payment
  4. 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

  1. Completed:
    Create account
    Your name and a password.
  2. Verify email
    Confirm the link we sent.
  3. Invite team
    Add teammates by email.
  4. Done
    Start 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

  1. Completed:
    Cart
  2. Details
  3. Payment
  4. 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

  1. Completed:
    Complete
  2. Completed:
    Complete
  3. Current
  4. 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.