ReUIReUI
2.5kX

Stepper

A step-by-step process for users to navigate through a series of steps.

"use client"

import {

Installation

pnpm dlx shadcn@latest add @reui/stepper

Usage

import {
  Stepper,
  StepperContent,
  StepperIndicator,
  StepperItem,
  StepperNav,
  StepperPanel,
  StepperSeparator,
  StepperTrigger,
} from "@/components/reui/stepper"
<Stepper defaultValue={1}>
  <StepperNav>
    <StepperItem step={1}>
      <StepperTrigger>
        <StepperIndicator>1</StepperIndicator>
      </StepperTrigger>
      <StepperSeparator />
    </StepperItem>
    <StepperItem step={2}>
      <StepperTrigger>
        <StepperIndicator>2</StepperIndicator>
      </StepperTrigger>
    </StepperItem>
  </StepperNav>
  <StepperPanel>
    <StepperContent value={1}>Content 1</StepperContent>
    <StepperContent value={2}>Content 2</StepperContent>
  </StepperPanel>
</Stepper>

Examples

States

"use client"

import {

Indicators

"use client"

import {

Controlled

"use client"

import { useState } from "react"

Progress

"use client"

import {

Title

"use client"

import {

Title & Bar

"use client"

import { useState } from "react"

Title & Status

"use client"

import {

Title & Description

"use client"

import {

Inline Title

"use client"

import {

Inline Title & Description

"use client"

import {

Vertical

"use client"

import { useState } from "react"

Vertical Title

"use client"

import {

Vertical Title & Description

"use client"

import {

API Reference

Stepper

The root component that manages the active step and configuration.

PropTypeDefaultDescription
defaultValuenumber1The step index to start with (uncontrolled).
valuenumber-The current active step index (controlled).
onValueChange(value: number) => void-Callback fired when the active step changes.
orientation"horizontal" | "vertical""horizontal"The layout direction of the stepper.
indicatorsStepIndicators-Custom icons or elements for different step states.

StepperNav

A container for the stepper items, usually displayed as a progress bar or navigation trail.


StepperItem

Represents a single step in the process.

PropTypeDefaultDescription
stepnumber-Required. The unique index of this step.
completedbooleanfalseManually mark the step as completed.
disabledbooleanfalseDisable interactions for this step.
loadingbooleanfalseShow the loading indicator for this step.

StepperTrigger

The interactive element used to navigate between steps.

PropTypeDefaultDescription
asChildbooleanfalseWhether to merge props onto the child element.

StepperIndicator

Displays the status of the step (e.g., number, checkmark, or custom icon).


StepperSeparator

A visual line between steps.


StepperTitle

The label for the step.


StepperDescription

Additional supporting text for the step.


StepperPanel

A container for step content panels.


StepperContent

The actual content associated with a specific step.

PropTypeDefaultDescription
valuenumber-Required. The step index this content belongs to.
forceMountbooleanfalseWhether to keep the content in the DOM when not active.

Types

StepIndicators

type StepIndicators = {
  active?: React.ReactNode
  completed?: React.ReactNode
  inactive?: React.ReactNode
  loading?: React.ReactNode
}