"use client"
import {pnpm dlx shadcn@latest add @blitz-ui/stepper
import {
Stepper,
StepperContent,
StepperIndicator,
StepperItem,
StepperNav,
StepperPanel,
StepperSeparator,
StepperTrigger,
} from "@/components/blitz-ui/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>"use client"
import {"use client"
import {"use client"
import { useState } from "react""use client"
import {"use client"
import {"use client"
import { useState } from "react""use client"
import {"use client"
import {"use client"
import {"use client"
import {"use client"
import { useState } from "react""use client"
import {"use client"
import {The root component that manages the active step and configuration.
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | number | 1 | The step index to start with (uncontrolled). |
value | number | - | 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. |
indicators | StepIndicators | - | Custom icons or elements for different step states. |
A container for the stepper items, usually displayed as a progress bar or navigation trail.
Represents a single step in the process.
| Prop | Type | Default | Description |
|---|---|---|---|
step | number | - | Required. The unique index of this step. |
completed | boolean | false | Manually mark the step as completed. |
disabled | boolean | false | Disable interactions for this step. |
loading | boolean | false | Show the loading indicator for this step. |
The interactive element used to navigate between steps.
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Whether to merge props onto the child element. |
Displays the status of the step (e.g., number, checkmark, or custom icon).
A visual line between steps.
The label for the step.
Additional supporting text for the step.
A container for step content panels.
The actual content associated with a specific step.
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | - | Required. The step index this content belongs to. |
forceMount | boolean | false | Whether to keep the content in the DOM when not active. |
type StepIndicators = {
active?: React.ReactNode
completed?: React.ReactNode
inactive?: React.ReactNode
loading?: React.ReactNode
}On This Page