Registry / Client component

Stepper

Controlled step progress with completed, active, upcoming and error states in horizontal or vertical layouts.

Installation

Preview

Preview style
  1. Details

    Name your workspace

  2. Team

    Choose collaborators

  3. Review

    Ready to create

  1. Details saved

  2. Verify email

    Check the address before continuing

  3. Finish setup

Usage

tsx
"use client"

import { useState } from "react"
import { Stepper } from "@/components/ui/stepper"

export function Steps() {
  const [step, setStep] = useState(1)
  return <Stepper value={step} onValueChange={setStep} steps={[
    { id: "details", title: "Details" },
    { id: "team", title: "Team" },
    { id: "finish", title: "Finish" },
  ]} />
}

API reference

PropTypeDefaultDescription
stepsStepperStep[]—Stable ID, title, optional description and error for each step.
valuenumber—Zero-based active step index.
onValueChange(step: number) => void—Allows returning to the current or earlier steps. Validate forward movement in the parent form.
orientation"horizontal" | "vertical""horizontal"Layout direction.