Ruixen Pro is now live.30+ premium components, templates, blocks, and lifetime updates.

Command Palette

Search for a command to run...

Docs
Step Indicator

Step Indicator

A clean step indicator component showing numbered circles with checkmarks for completed steps. Supports horizontal and vertical orientations.

Installation

Usage

import {
  StepIndicator,
  StepItem,
  StepCircle,
  StepConnector,
} from "@/components/ruixen/step-indicator";
const steps = [1, 2, 3, 4, 5];
 
<StepIndicator defaultStep={3}>
  {steps.map((step, index) => (
    <StepItem key={step} step={step} className="flex-1">
      <StepCircle />
      {index < steps.length - 1 && <StepConnector />}
    </StepItem>
  ))}
</StepIndicator>;

Examples

Horizontal Layout

<StepIndicator defaultStep={3}>
  {steps.map((step, index) => (
    <StepItem key={step} step={step} className="flex-1">
      <StepCircle />
      {index < steps.length - 1 && <StepConnector />}
    </StepItem>
  ))}
</StepIndicator>

Vertical Layout

<StepIndicator defaultStep={2} orientation="vertical">
  {steps.map((step, index) => (
    <StepItem key={step} step={step}>
      <StepCircle />
      {index < steps.length - 1 && <StepConnector />}
    </StepItem>
  ))}
</StepIndicator>

Numbers Only (No Checkmarks)

<StepIndicator defaultStep={3}>
  {steps.map((step, index) => (
    <StepItem key={step} step={step} className="flex-1">
      <StepCircle showCheck={false} />
      {index < steps.length - 1 && <StepConnector />}
    </StepItem>
  ))}
</StepIndicator>

Props

StepIndicator

PropTypeDefaultDescription
defaultStepnumber1Default active step
currentStepnumber-Controlled active step
onStepChange(step: number) => void-Callback when step changes
orientation"horizontal" | "vertical""horizontal"Layout orientation

StepItem

PropTypeDefaultDescription
stepnumberRequiredStep number
completedbooleanfalseForce completed state
disabledbooleanfalseDisable the step
loadingbooleanfalseShow loading spinner

StepCircle

PropTypeDefaultDescription
showCheckbooleantrueShow checkmark for completed steps

StepConnector

Standard div props for styling the connector line.