Skip to content

Stepper

A Stepper component is used to show a list of steps in a linear manner. Use the interactive preview below to click “Next Step” or “Previous” to see the state transitions.

Loading Code Block...

A vertical stepper with three labelled steps. Use the buttons below to advance through them; the default arrangement is 'vertical' in both frameworks.

Loading Code Block...

Use the `arrangement` prop to toggle between a vertical or horizontal layout. You can try this out using the dropdown below.

Loading Code Block...

The vertical arrangement supports replacing the default title/subtext block with arbitrary content on a per-step basis. The horizontal arrangement only renders step.title and ignores any custom-content escape hatch in either framework.

Loading Code Block...

PropsDefaultTypeDescription
steps*-BaseStep[] | VerticalStep[]Array of step objects (see `BaseStep` / `VerticalStep` below). The horizontal arrangement uses `BaseStep[]`; the vertical arrangement also accepts `VerticalStep[]` so each step can render custom content.
currentStep*-number1-based index of the active step. Steps before it render as completed, the matching step renders as current, and the rest render as upcoming.
arrangement'vertical''vertical' | 'horizontal'Layout orientation. Omitting the prop renders a vertical stepper in both frameworks.
size'default''default' | 'sm'Controls the step circle/text scale. Applies to both vertical and horizontal arrangements.
variant'default''default' | 'dot'Visual style for the active step indicator. `'dot'` replaces the step number with a small filled circle; completed steps still render the check icon.
PropsDefaultTypeDescription
id*-stringStable identifier used as the React `key` for the step (and, in Vue, as the prefix for the per-step `${id}-content` named slot). Must be unique within `steps`.
title*-stringStep label rendered next to the circle (vertical) or beneath it (horizontal).
subtext-stringSupporting line shown below the title in the vertical arrangement. Ignored on the horizontal arrangement.
status-'error' | 'warning' | 'alert'Status badge applied when the step is the current or a completed step. Drives both the circle styling and the trailing connector colour.
onClick-() => voidOptional click handler wired to the per-step container.
slot-ReactNodeCustom content that replaces the default title/subtext block on a vertical step. Not part of `BaseStep`, so the horizontal arrangement does not accept it.
  • The stepper uses semantically appropriate roles (list and listitem) to help screen readers announce the number of steps and the current position.
  • Progress indicators use visually hidden text or robust ARIA traits so visually impaired users can differentiate between ‘completed’, ‘current’, and ‘upcoming’ steps.
  • Color contrast is carefully maintained between active states and faded out future steps so they are clearly determinable.