Stepper
Where someone is in a linear flow, and how much of it is left.
{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}
Where someone is in a linear flow, and how much of it is left.
Import
import { Stepper, StepperItem, StepperTrack, StepperIndicator, StepperSeparator, StepperContent, StepperTitle, StepperDescription } from "@ir/ui";Watch out
- Figma's indicator axis is
Type(Check | Number); here it isindicator, because the root is an<ol>andtypeis a real attribute on one — it sets list numbering. Fourth prop collision of the week. - At Complete both indicator types render the same check and differ only in fill: Check completes on bg/primary/emphasis, Number on bg/success/emphasis. One status, two colours, chosen by an axis that is about the indicator rather than the state. Built as drawn; raised.
Props
Stepper
| Prop | Type | Required | What it does |
|---|---|---|---|
value | number | Index of the step in progress. Everything before it is complete. | |
indicator | StepperIndicator | Figma's Type axis, renamed — type on an <ol> sets list numbering. | |
layout | StepperLayout | Where each step's text sits relative to its indicator. |
StepperItem
| Prop | Type | Required | What it does |
|---|---|---|---|
status | StepStatus | Override the derived status for a step that failed or was skipped. |
Do and don't
Use it when the steps genuinely run in sequence.
Don't — Use a stepper for a form people can fill in any order.
A stepper promises an order. On a flow that has none it makes people hunt for a next button that was never the point.
Keep it to three to five, and group the rest.
Don't — Show nine steps across the top of a page.
Past five the row stops reading as progress and starts reading as a warning about how long this will take.
Icons-minimal in tight space, icons-connected for short flows, text-with-line when each step needs describing.
Don't — Reach for the labelled layout inside a dialog.
The five layouts exist because the same five steps need different amounts of room. The labels are the first thing to lose.
Keep aria-current and the indicator's shape doing the work too.
Don't — Rely on the fill alone to say which step is current.
A completed step and a current one are both filled. The check, the dot and aria-current are what actually distinguish them.
Use Progress for continuous work; a stepper counts discrete stages.
Don't — Use a stepper to show a percentage.
Steps are places a person stands. A percentage is a machine's estimate, and they do not mean the same thing.
Accessibility
- The current step sets aria-current="step".
- The connectors and the state glyphs are aria-hidden — a completed step has to say "completed" in its text or its label, because a tick is a picture.
Where it is drawn
Figma — structure from figma, measurements from figma.