Weftv0.4.0
GitHubFigma
Blade AI
Display & Navigation · Stepperstable

Stepper

An ordered list of steps that shows where someone is in a multi-step flow, horizontally or vertically.

Preview

#preview

Switch orientation, the current step and an error. Show code opens the React and CSS below.

  1. Business details (Completed)Done
  2. KYC documents (Current step)
  3. Bank account (Upcoming)
  4. Review (Upcoming)
horizontal · 2 · none
stepper-example.tsx
import { Stepper } from "@blade-ai/weft/components/stepper";

const steps = [
  { title: "Business details", status: "complete" },
  { title: "KYC documents", status: "current" },
  { title: "Bank account", status: "upcoming" },
  { title: "Review", status: "upcoming" },
];

export function OnboardingSteps() {
  return <Stepper steps={steps} accessibilityLabel="Onboarding" />;
}

All states

#all-states

Each step status, and horizontal and vertical steppers with and without an error.

Stepper · 5 states · steps of status complete, current, upcoming and error
  1. Business (Completed)Done
  2. KYC documents (Current step)In progress
  3. Bank account (Upcoming)
  4. Review (Upcoming)
Horizontal
  1. Business (Completed)Done
  2. KYC documents (Error)Document rejected
  3. Bank account (Upcoming)
  4. Review (Upcoming)
Horizontal · error
  1. Business (Completed)
  2. KYC documents (Completed)
  3. Bank account (Completed)
Horizontal · all complete
  1. Business (Completed)Done
  2. KYC documents (Current step)In progress
  3. Bank account (Upcoming)
  4. Review (Upcoming)
Vertical
  1. Business (Completed)Done
  2. KYC documents (Error)Document rejected
  3. Bank account (Upcoming)
Vertical · error

Props

#props

Stepper takes a list of steps. Each step carries its own status.

Stepper
Prop
Type
Default
Description
steps
StepperStep[]
—
The steps in order. Required.
orientation
"horizontal" | "vertical"
"horizontal"
Horizontal for wide layouts; vertical for sidebars and narrow screens.
accessibilityLabel
string
"Progress"
Accessible name of the list.
className
string
—
Extra classes on the list.
StepperStep
Prop
Type
Default
Description
title
string
—
Step name, for example "KYC documents". Required.
description
ReactNode
—
Muted line under the title. Coloured red for an error step.
status
"complete" | "current" | "upcoming" | "error"
—
complete shows a check, current a ringed number, upcoming a muted number, error an exclamation. Required.

Usage

#usage

Short rules for choosing and writing steppers.

Do
Use it for flows of three to six steps people finish in order.
Keep titles to two or three words.
Add a description for status, date or estimate.
Switch to vertical when the steps do not fit in one row.
Don't
Do not use it for navigation between unrelated views; use Tabs.
Do not mark more than one step as current.
Do not hide an error; set the step to error and say what to fix.
Do not use it for a single-step action.

Accessibility

#accessibility

An ordered list. The current step carries aria-current and every status is announced as hidden text.

Keyboard
Key
Action
Tab
The stepper is not interactive; focus moves past it.
ARIA
Element
Role / attribute
When
Stepper
<ol> · aria-label
Always. Label comes from accessibilityLabel.
Current step
aria-current="step"
On the step whose status is current.
Step title
Hidden text "(Completed)" and similar
Always, so status is not conveyed by colour alone.
Indicator
aria-hidden
Always. Number, check and exclamation are decorative.