This page as markdown: /stepper.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

Stepper

Status: stable

Where the user is in a multi-step flow — an ordered list of numbered steps, horizontal or vertical, each complete, current, upcoming or in error, with aria-current="step" on the current one. indicator="dot" turns it into a timeline of events (an order's delivery) with dots instead of numbers.

Keywords: stepper, steps, wizard, multi-step form, checkout steps, onboarding progress, progress steps, timeline

Usage

Use Stepper above or beside a flow that is split into a known, small number of named steps — checkout, onboarding, an import wizard — so the user can see how far they have come and what is left. It reports position; the flow's own Back and Continue buttons move it.

Best practices

Anatomy

Part Required Description
Stepper yes The ordered list. Takes current and orientation, and an aria-label naming the flow.
StepperItem yes One step: a numbered disc (a check when complete, a warning mark on error) — or, with indicator="dot", a dot centred on the title's first line — a title, and an optional description.
Connector no The line to the next step, filled once this step is complete. Drawn automatically between items.

Subcomponents

Name Type Description
StepperItem { title: ReactNode; description?: ReactNode; status?: StepStatus; onSelect?: () => void } + li props One step. status overrides the derived state; onSelect makes the disc and title a button for returning to the step.

Props

Name Type Default Description
current number 0 Zero-based index of the current step. Earlier steps derive complete, later ones upcoming.
orientation "horizontal" | "vertical" "horizontal" Horizontal for a short flow across the top of a form; vertical for long flows, narrow columns or steps with descriptions. A horizontal stepper narrower than 28rem (a phone) compacts itself: every disc stays, only the current step's title shows, and the other titles stay for screen readers. No breakpoint code needed.
indicator "number" | "dot" "number" number for a flow the user moves through; dot for a timeline of events (delivery tracking, a document's history) where the position number adds nothing. The dot centres on the title's first line and scales with its type at every density.
statusLabels Partial<Record<StepStatus, string>> — Screen-reader status words appended to each title (Completed, Current step, Not started, Needs attention). Override to localize.
aria-label string — Names the flow ("Checkout progress"). Every Stepper needs one.

Variants

Tokens used

primary, primary-foreground, background, foreground, muted-foreground, border-strong, destructive, destructive-foreground, ring, destructive-mark

Motion

Accessibility

Related

Examples

Checkout

import { Stepper, StepperItem } from "@sableui/react"

<Stepper current={1} aria-label="Checkout progress">
	<StepperItem title="Cart" />
	<StepperItem title="Shipping" />
	<StepperItem title="Payment" />
	<StepperItem title="Review" />
</Stepper>

Vertical with descriptions

import { Stepper, StepperItem } from "@sableui/react"

<Stepper orientation="vertical" current={2} aria-label="Workspace setup">
	<StepperItem title="Create account" description="Email verified" />
	<StepperItem title="Invite team" description="3 people invited" />
	<StepperItem title="Connect data" description="Choose a source to import from" />
	<StepperItem title="Launch" />
</Stepper>

Delivery timeline (dots)

import { Stepper, StepperItem } from "@sableui/react"

<Stepper orientation="vertical" indicator="dot" current={2} aria-label="Delivery status">
	<StepperItem title="Order placed" description="Oct 9, 10:14 AM" />
	<StepperItem title="Printed and packed" description="Oct 10, 4:02 PM" />
	<StepperItem title="Out for delivery" description="Arriving today by 6 PM" />
	<StepperItem title="Delivered" />
</Stepper>

A completed step with an error

import { Stepper, StepperItem } from "@sableui/react"

<Stepper current={2} aria-label="Checkout progress">
	<StepperItem title="Cart" onSelect={() => console.log("cart")} />
	<StepperItem title="Shipping" status="error" description="Address needs a postcode" onSelect={() => console.log("shipping")} />
	<StepperItem title="Payment" />
</Stepper>