Skip to content
Drivn logoDrivn

Stepper

Multi-step progress indicator with connecting lines and dot notation.

Preview

Installation

npx drivn add stepper

Usage

1import * as React from "react"
2import { Stepper } from "@/components/ui/stepper"
3
4export default function Page() {
5 const [step, setStep] = React.useState(1)
6
7 return (
8 <Stepper step={step} onStepChange={setStep}>
9 <Stepper.Item />
10 <Stepper.Item />
11 <Stepper.Item />
12 <Stepper.Item />
13 </Stepper>
14 )
15}
Drivn Feature

Text Labels

Use label prop for text inside indicators.

With Icons

Replace numbers with icons.

Vertical

Stack steps vertically.

Without Line

Remove the connecting line between steps.

API Reference

Stepper

PropTypeDefaultDescription
stepnumber0Current active step (0-indexed).
onStepChange(step: number) => voidCallback when a step is clicked.
orientation'horizontal' | 'vertical''horizontal'Layout direction of the stepper.
linebooleantrueShow connecting line between steps.
classNamestringAdditional CSS classes.
childrenReactNodeStepper.Item sub-components.

Stepper.Item

PropTypeDefaultDescription
labelstringText inside the indicator. Omit for auto-number.
iconComponentType | ReactElementIcon replacing the number or label.
disabledbooleanfalsePrevents clicking this step.
classNamestringAdditional CSS classes.