shadcn.io is not affiliated with official shadcn/ui
Framework
UI library
Radix UI does not include this primitive, so this page uses the Ark UI component. The visuals match the Ark UI version.
Step 1
Step 2
Step 3
All steps completed. You're all set!
Installation
bunx --bun shadcn@latest add https://kit.dev/r/radix/steps.jsonAnatomy
Steps
├── StepsList
├── StepsItem
├── StepsTrigger
├── StepsIndicator
├── StepsSeparator
├── StepsContent
├── StepsNext
├── StepsPrevious
└── StepsProgressUsage
import { ChevronLeftIcon, ChevronRight } from "lucide-react";
import { Button } from "@/components/ui/button";
import {
Steps,
StepsCompletedContent,
StepsContent,
StepsIndicator,
StepsItem,
StepsList,
StepsNext,
StepsPrevious,
StepsSeparator,
StepsTrigger,
} from "@/components/ui/steps";const steps = Array.from({ length: 3 }, (_, index) => index + 1);
const StepsDemo = () => (
<Steps className="size-full max-w-md" count={steps.length}>
<StepsList>
{steps.map((step) => (
<StepsItem index={step - 1} key={step}>
<StepsTrigger>
<StepsIndicator>{step}</StepsIndicator>
</StepsTrigger>
<StepsSeparator />
</StepsItem>
))}
</StepsList>
{steps.map((step) => (
<StepsContent
className="flex h-full items-center justify-center rounded-md border"
index={step - 1}
key={step}
>
<p className="text-muted-foreground text-sm">Step {step}</p>
</StepsContent>
))}
<StepsCompletedContent className="flex h-full items-center justify-center rounded-md border">
<p className="text-muted-foreground text-sm">
All steps completed. You're all set!
</p>
</StepsCompletedContent>
<div className="flex flex-row-reverse gap-2">
<StepsNext asChild>
<Button>
Next
<ChevronRight />
</Button>
</StepsNext>
<StepsPrevious asChild>
<Button variant="outline">
<ChevronLeftIcon />
Back
</Button>
</StepsPrevious>
</div>
</Steps>
);
Accessibility
| Key | Description |
|---|---|
Enter | Activate the focused control. |
Space | Activate the focused control. |
Demos
Controlled
Description
Icon
Loading
Title
Vertical
API Reference
Steps
div
PropType
AttributeType
CSS variableType
--percentstringStepsList
div
PropType
AttributeType
StepsItem
div
PropType
indexnumberAttributeType
StepsTrigger
button
PropType
AttributeType
StepsIndicator
div
PropType
AttributeType
CSS variableType
--steps-icon-sizestring--steps-sizestringStepsSeparator
div
PropType
AttributeType
CSS variableType
--steps-gutterstring--steps-sizestringStepsContent
div
PropType
indexnumberAttributeType
StepsNext
button
PropType
AttributeType
StepsPrevious
button
PropType
AttributeType
StepsTitle
span
PropType
AttributeType
StepsDescription
span
PropType
AttributeType
StepsCompletedContent
div
PropType
AttributeType
useSteps
PropType