Steps
A multi-step wizard progress indicator with horizontal and vertical orientations, clickable navigation, and status states.
Overview
Steps is a wizard progress indicator for multi-step flows like onboarding, checkout, and form wizards. It supports horizontal and vertical orientations, three visual variants, clickable step navigation, and optional titles and descriptions.
Installation
Install the component via the CLI in one command.
npx @work-rjkashyap/unified-ui add stepspnpm dlx @work-rjkashyap/unified-ui add stepsnpx @work-rjkashyap/unified-ui add stepsbunx @work-rjkashyap/unified-ui add stepsIf you haven't initialized your project yet, run npx @work-rjkashyap/unified-ui init first. See the CLI docs for details.
Or install the full package
Use this approach if you prefer to install the entire design system as a dependency instead of copying individual components.
npm install @work-rjkashyap/unified-uipnpm add @work-rjkashyap/unified-uiyarn add @work-rjkashyap/unified-uibun add @work-rjkashyap/unified-uiAnatomy
import {
Steps,
Step,
} from "@work-rjkashyap/unified-ui";Examples
Basic
- 2
- 3
Completed State
Vertical Orientation
- 2
- 3
- 4
Variants
Default
- 2
- 3
Outline
- 1
- 2
- 3
Dots
Clickable Steps
Minimal (No Labels)
Props
Steps
| Prop | Type | Default | Description |
|---|---|---|---|
currentStep | number | — | Required. The 0-based index of the currently active step. |
orientation | "horizontal" | "vertical" | "horizontal" | Layout orientation. |
variant | "default" | "outline" | "dots" | "default" | Visual style of step indicators. |
onStepClick | (index: number) => void | — | Called when a step is clicked (enables clickable wizards). |
className | string | — | Additional CSS classes on the <ol> element. |
children | ReactNode | — | Required. Must be Step elements. |
Step
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | Label displayed beneath/beside the indicator. |
description | string | — | Optional secondary text beneath the title. |
icon | ReactNode | — | Custom icon to override the default number/check indicator. |
className | string | — | Additional CSS classes on the <li> element. |
Step Status
Each Step automatically derives its visual state from the parent currentStep prop:
| Status | Condition | Visual |
|---|---|---|
complete | index < currentStep | Filled indicator with a check mark. |
active | index === currentStep | Bordered indicator with step number. |
upcoming | index > currentStep | Muted indicator with step number. |
Accessibility
Steps renders as role="list" with each Step as role="listitem". The
active step has aria-current="step" applied automatically.
role="list"on theStepscontainer androle="listitem"on eachStep.aria-current="step"applied to the currently active step.- Clickable steps render as
<button>elements with descriptivearia-label. - The connector lines are
aria-hidden="true".