Skip to content

Overlays & navigation

Stepper

A stepper shows progress through a multi-step flow: onboarding, checkout, an import. Steps are complete, current, upcoming or in error, derived from a single current index unless you set a status yourself. It lays out horizontally for short flows and vertically when steps carry their own content, and it renders on the server.

On this page
  1. Account (Completed)
  2. Workspace (Current step)
  3. Invite team (Not started)
  4. Billing (Not started)
Step 2 of 4

Usage

components/ui/stepper.tsx
import { Stepper } from "@/components/ui/stepper"; <Stepper  current={1}  steps={[    { title: "Account" },    { title: "Workspace" },    { title: "Billing" },  ]}/>

Examples

Horizontal

Drive current from your flow's state. Descriptions are hidden on phones to keep every step on one line.

  1. Account (Completed)
  2. Workspace (Current step)
  3. Invite team (Not started)
  4. Billing (Not started)
Step 2 of 4

Vertical with an error

Vertical steps can hold content under the title. A step with status="error" stays red until it is fixed.

  1. Upload file (Completed)clients-2024.csv · 214 rows
  2. Match columns (Completed)8 of 8 columns matched
  3. Check data (Needs attention)3 rows have no email address.
    Rows 18, 52 and 140: email is required
  4. Import (Not started)Create 214 clients

States

Complete steps show a check on the accent, the current step a ring, upcoming steps a quiet outline and errors a cross. Each state is also spelled out for screen readers.

  1. Cart (Completed)
  2. Shipping (Completed)
  3. Payment (Needs attention)
  4. Review (Not started)

Props

Stepper

  • stepsrequiredStep[]default: —{ title, description?, status?, content? }[] in order.
  • currentnumberdefault: 0Index of the current step. Earlier steps are complete, later ones upcoming. Use steps.length when all are done.
  • orientation"horizontal" | "vertical"default: "horizontal"Row of steps, or a column with room for content.
  • labelstringdefault: "Progress"Accessible name of the list.
  • classNamestringdefault: —Classes for the list element.

Step

  • titlerequiredstringdefault: —Short name of the step.
  • descriptionstringdefault: —Second line. Hidden on phones in the horizontal layout.
  • status"complete" | "current" | "upcoming" | "error"default: —Overrides the status derived from current.
  • contentReactNodedefault: —Extra content under the step (vertical only).

Accessibility

  • Rendered as an ordered list with an accessible name, so screen readers announce the number of steps.
  • The current step has aria-current="step".
  • Each step's state is written out in visually hidden text (“Completed”, “Current step”, “Needs attention”), so it never relies on color or icons alone.
  • The step indicators and connecting lines are decorative and hidden from assistive tech.

Suggested