components

Stepper

A linear progress indicator for multi-step flows — markers connected by a line that fills in as steps complete. This renders the indicator (and, with showControls, Back/Next buttons that drive it) only; which content shows for the active step is your own step/onStepChange-driven render, the same split of responsibility as Pagination and whatever list it pages through.

tsx
  1. AccountCreate your login
  2. ProfileTell us about you
  3. ConfirmReview and finish
<Stepper defaultStep={1} showControls />
defaultStep

Examples

Uncontrolled, starting on the first step — clicking a marker only ever jumps to an already-visited step, never ahead of where you've reached:

tsx
  1. AccountCreate your login
  2. ProfileTell us about you
  3. ConfirmReview and finish
<Stepper
  steps={[
    { label: "Account", description: "Create your login" },
    { label: "Profile", description: "Tell us about you" },
    { label: "Confirm", description: "Review and finish" },
  ]}
/>

showControls adds Back/Next buttons wired to the same step state — Next becomes Finish on the last step:

tsx
  1. Cart
  2. Shipping
  3. Payment
<Stepper
  showControls
  defaultStep={1}
  steps={[
    { label: "Cart" },
    { label: "Shipping" },
    { label: "Payment" },
  ]}
/>

orientation="vertical" stacks steps down the page instead — a better fit for a sidebar than a form header:

tsx
  1. Cart
  2. Shipping
  3. Payment
<Stepper
  orientation="vertical"
  defaultStep={1}
  steps={[
    { label: "Cart" },
    { label: "Shipping" },
    { label: "Payment" },
  ]}
/>

Props

PropTypeDefaultDescription
allowNavigationbooleantrueLets clicking an already-visited step jump back to it — never forward, past what's been reached.
backLabeltext——
classNametext——
defaultStepnumber——
disabledboolean——
finishLabeltext——
nextLabeltext——
onFinishreadonly——
onStepChangereadonly——
orientationhorizontal | vertical"horizontal"—
showControlsbooleanfalseRenders Back/Next (Finish on the last step) controls below the indicator.
stepnumber—0-based index of the active step.
steps *readonly——