Skip to content
nexubDesign System
v11.9.0

Components · Navigation

Stepper

BetaAdded v6.4.0

Progress through a multi-step flow, with clickable steps that follow the order you allow.

import { Stepper } from '@nexub/react';
View as Markdown

Playground

Props

orientation
TSX
<Stepper aria-label="Sign-up steps" steps={steps} current={current} onStepChange={setCurrent} />

Examples

Wizard with a form per step

Statuses and actions

`current={-1}` for "all done" is deprecated in 11.4 (removed in 12.0): use `status`. `nexub-migrate --rules deprecated-in-11` finds it.

Props

Props
PropTypeDefaultDescription
stepsrequiredStepperStep[]—The steps in order.
currentrequirednumber—Deprecated. Index of the step being shown.
completednumber[]every step before `current`Finished steps. Defaults to every step before current.
onStepChange((index: number) => void)—Makes reachable steps buttons: finished ones and the first unfinished one.
nonLinearbooleanfalseEvery step is reachable.
orientation'horizontal' | 'vertical''horizontal'Vertical suits side columns and narrow screens.
aria-labelstring—Names the navigation landmark, e.g. "Setup steps".
steps[].status'complete' | 'current' | 'upcoming' | 'error' | 'warning' | 'skipped' | 'cancelled'—11.4: the step's state, named as in StatusSteps; read after the label. Wins over current and completed.
steps[].descriptionReactNode—11.4: any content (a date, a link).
steps[].actionsReactNode—11.4: actions under the step, e.g. Retry.

Accessibility

Notes

  • A `nav` with an ordered list; the current step has `aria-current="step"`.

  • Each step reads "Step 2 of 4: Billing", plus "completed" when finished.

  • Validate each step with a Form and move `current` on its submit.