ui-kit0.0

Navigation

Stepper

Progress through a multi-step flow.

Usage

Steps before value are complete (the number turns into a check that draws in and the line to the next step fills), value is the current step and the rest are upcoming. Passing onValueChange makes the steps buttons.

Shipping: Address and delivery

When to use

  • Flows with a known, short sequence of steps: checkout, onboarding, setup.
  • Showing where something is in a process it moves through by itself, such as order tracking.

Not for: switching between views (use tabs), or more than about six steps (group them).

Vertical

orientation="vertical" stacks the steps and draws the line downwards. Without onValueChange the steps are plain text, not buttons.

  1. Order placed (completed)Nov 18, 09:42
  2. Packed (completed)Nov 18, 15:10 at the Rotterdam warehouse
  3. Out for deliveryNov 20, courier is 6 stops away
  4. DeliveredEstimated Nov 20, before 18:00

API

Stepper

PropTypeDefaultDescription
valuenumber—Current step, 1-based. Controlled.
defaultValuenumber1Initial step when uncontrolled.
onValueChange(value: number) => void—Called when a step is chosen. Makes the steps clickable.
orientation'horizontal' | 'vertical''horizontal'Layout direction.
clickableboolean—Force steps to be buttons (default: true when onValueChange is set).

StepperItem

PropTypeDefaultDescription
stepnumber—This step’s number, 1-based.
state'complete' | 'current' | 'upcoming'—Override the state worked out from value.
disabledbooleanfalseNot selectable (clickable steppers only).

Parts: StepperTrigger (the pressable area), StepperIndicator, StepperContent, StepperTitle, StepperDescription and StepperSeparator. Leave the separator off the last step.

Keyboard

KeyAction
TabMoves to the steps that can be selected.
← →Between steps (↑ ↓ when vertical).
Home / EndFirst / last selectable step.
Enter / SpaceGoes to the focused step.

Accessibility

  • An ordered list; the current step has aria-current="step".
  • Completed steps add a hidden “(completed)” to their title; the indicator itself is decorative.
  • Upcoming steps in a checkout should be disabled so people cannot skip ahead.

Motion

  • The check draws in over 320ms; the indicator fills with colour.
  • The line between steps fills on the smooth spring (no overshoot).
  • Reduced motion keeps the state change and drops the movement.