components

Stepper

A component that displays a series of steps and allows users to navigate between them

Shipping

Step 2 of 4

Ship to 24 Market Street with standard weekday delivery.

Installation

pnpm dlx radianui@latest add stepper

Usage

Imports

/components/ui/stepper.tsx
import {
	Stepper,
	StepperContent,
	StepperDescription,
	StepperIndicator,
	StepperItem,
	StepperNav,
	StepperPanel,
	StepperSeparator,
	StepperTitle,
	StepperTrigger,
} from "@/components/ui/stepper"

Code

stepper-demo.tsx
const steps = [
	{ step: 1, title: "Cart", description: "Review items" },
	{ step: 2, title: "Shipping", description: "Address details" },
	{ step: 3, title: "Payment", description: "Billing method" },
]
 
<Stepper defaultValue={1} className="space-y-6">
	<StepperNav>
		{steps.map((item, index) => (
			<StepperItem key={item.step} step={item.step}>
				<StepperTrigger>
					<StepperIndicator>{item.step}</StepperIndicator>
					<span className="text-left">
						<StepperTitle>{item.title}</StepperTitle>
						<StepperDescription>{item.description}</StepperDescription>
					</span>
				</StepperTrigger>
				{index < steps.length - 1 && <StepperSeparator />}
			</StepperItem>
		))}
	</StepperNav>
 
	<StepperPanel>
		{steps.map((item) => (
			<StepperContent key={item.step} value={item.step}>
				{item.title}
			</StepperContent>
		))}
	</StepperPanel>
</Stepper>

Examples

States

Review

Two reviewers are checking copy, pricing, and screenshots.

Controlled

Plan

Start with 12 editor seats and unlimited viewer access.

Vertical

Members

Invite designers, engineers, and operators with the right role.

Custom Indicators

Deploying

The release is being promoted across the production edge network.

Props

<Stepper>
NameDefaultValues
defaultValue1number
value-number
onValueChange-(value: number) => void
orientationhorizontalhorizontalvertical
indicators-StepIndicators
className-string
<StepperItem>
NameDefaultValues
step*-number
completedfalseboolean
disabledfalseboolean
loadingfalseboolean
className-string
<StepperTrigger>
NameDefaultValues
asChildfalseboolean
disabled-boolean
className-string
<StepperIndicator>
NameDefaultValues
children-ReactNode
className-string
<StepperSeparator>
NameDefaultValues
className-string
<StepperTitle>
NameDefaultValues
children-ReactNode
className-string
<StepperDescription>
NameDefaultValues
children-ReactNode
className-string
<StepperNav>
NameDefaultValues
className-string
<StepperPanel>
NameDefaultValues
className-string
<StepperContent>
NameDefaultValues
value*-number
forceMountfalseboolean
className-string