Registry / Client component
Stepper
Controlled step progress with completed, active, upcoming and error states in horizontal or vertical layouts.
Installation
Preview
Details
Name your workspace
Team
Choose collaborators
Review
Ready to create
Details saved
Verify email
Check the address before continuing
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
| Prop | Type | Default | Description |
|---|---|---|---|
steps | StepperStep[] | — | Stable ID, title, optional description and error for each step. |
value | number | — | 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. |