Docs
Stepper

Stepper

Shows progress through a sequence of steps.

1
Account Details

Create your account

2
Personal Information

Add your personal info

3
Review and Submit

Review your information

Fill in your account details to get started.

A stepper displays progress through a sequence of logical and numbered steps. They may also be used for navigation.

Examples

Horizontal (Default)

Vertical

1
Account Details

Create your account

Fill in your account details to get started.

2
Personal Information

Add your personal info

3
Review and Submit

Review your information

Installation

Usage

import { Stepper } from "@/components/ui/stepper";
import {
  Stepper,
  Step,
  StepIndicator,
  StepLabel,
  StepDescription,
  StepContent,
} from "@/components/ui/stepper";
 
export function StepperExample() {
  const [activeStep, setActiveStep] = React.useState(0);
 
  return (
    <Stepper activeStep={activeStep}>
      <Step>
        <StepIndicator>1</StepIndicator>
        <div className="ml-3">
          <StepLabel>Step 1</StepLabel>
          <StepDescription>Description for step 1</StepDescription>
        </div>
      </Step>
      <Step>
        <StepIndicator>2</StepIndicator>
        <div className="ml-3">
          <StepLabel>Step 2</StepLabel>
          <StepDescription>Description for step 2</StepDescription>
        </div>
      </Step>
      <Step>
        <StepIndicator>3</StepIndicator>
        <div className="ml-3">
          <StepLabel>Step 3</StepLabel>
          <StepDescription>Description for step 3</StepDescription>
        </div>
      </Step>
    </Stepper>
  );
}

Props

Stepper

PropTypeDefaultDescription
activeStepnumberrequiredThe active step index (zero-based).
orientationhorizontal | verticalhorizontalThe orientation of the stepper.
classNamestring-The class name to apply to the component.
childrenReactNode-The Step components to display.

Step

PropTypeDefaultDescription
orientationhorizontal | verticalhorizontalThe orientation of the step (inherited from Stepper).
isLastboolean-Whether this is the last step (auto-set by Stepper).
classNamestring-The class name to apply to the component.
childrenReactNode-The content to display in the step.

StepIndicator

PropTypeDefaultDescription
activeboolean-Whether this step is active (auto-set by Stepper).
completedboolean-Whether this step is completed (auto-set by Stepper).
classNamestring-The class name to apply to the component.
childrenReactNode-The content to display in the indicator.

StepLabel

PropTypeDefaultDescription
classNamestring-The class name to apply to the component.
childrenReactNode-The content to display in the label.

StepDescription

PropTypeDefaultDescription
classNamestring-The class name to apply to the component.
childrenReactNode-The content to display in the description.

StepContent

PropTypeDefaultDescription
classNamestring-The class name to apply to the component.
childrenReactNode-The content to display in the step content.