Unified UI

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 steps
pnpm dlx @work-rjkashyap/unified-ui add steps
npx @work-rjkashyap/unified-ui add steps
bunx @work-rjkashyap/unified-ui add steps

If 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-ui
pnpm add @work-rjkashyap/unified-ui
yarn add @work-rjkashyap/unified-ui
bun add @work-rjkashyap/unified-ui

Anatomy

import {
	Steps,
	Step,
} from "@work-rjkashyap/unified-ui";

Examples

Basic

  1. 2
  2. 3

Completed State

Vertical Orientation

  1. 2
  2. 3
  3. 4

Variants

Default

  1. 2
  2. 3

Outline

  1. 1
  2. 2
  3. 3

Dots

Clickable Steps

Minimal (No Labels)


Props

Steps

PropTypeDefaultDescription
currentStepnumber—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).
classNamestring—Additional CSS classes on the <ol> element.
childrenReactNode—Required. Must be Step elements.

Step

PropTypeDefaultDescription
titlestring—Label displayed beneath/beside the indicator.
descriptionstring—Optional secondary text beneath the title.
iconReactNode—Custom icon to override the default number/check indicator.
classNamestring—Additional CSS classes on the <li> element.

Step Status

Each Step automatically derives its visual state from the parent currentStep prop:

StatusConditionVisual
completeindex < currentStepFilled indicator with a check mark.
activeindex === currentStepBordered indicator with step number.
upcomingindex > currentStepMuted 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 the Steps container and role="listitem" on each Step.
  • aria-current="step" applied to the currently active step.
  • Clickable steps render as <button> elements with descriptive aria-label.
  • The connector lines are aria-hidden="true".

On this page