Stepper
NavigationTracks the current stage of a multi-step sequence and provides previous and next controls.
Try it
Add to your project
npx shadcn@latest add https://luv-jeri.github.io/cojeev-ui/r/stepper.jsonThe command includes the component’s shared dependencies. Your project keeps editable source files.
Using stepper
Set count and optional labels, then use one-based values for StepperItem parts.
Use onValueChange to switch your content and gate progression with your own validation before advancing.
StepperList orientation="horizontal" lays out connected milestones with native Previous/Next controls. The default remains vertical. Completed milestones use a native validation icon.
API
Compose the exported parts below. The prop types are read from the React source during the registry build.
Native element or underlying primitive props are inherited where declared, including accessible labels, event handlers and refs.
StepperProps
| Prop | Type | Required |
|---|---|---|
defaultValue | string | number | readonly string[] | undefined | No |
value | number | No |
count | number | Yes |
labels | string[] | No |
onValueChange | (value: number) => void | No |
StepperListProps
| Prop | Type | Required |
|---|---|---|
orientation | "vertical" | "horizontal" | No |
StepperItemProps
| Prop | Type | Required |
|---|---|---|
step | number | Yes |
StepperIndicatorProps
| Prop | Type | Required |
|---|---|---|
step | number | Yes |
StepperTitleProps
Accepts the native or primitive props declared by its exported TypeScript type.
StepperPreviousProps
Accepts the native or primitive props declared by its exported TypeScript type.
StepperNextProps
Accepts the native or primitive props declared by its exported TypeScript type.
StepperStatusProps
Accepts the native or primitive props declared by its exported TypeScript type.
Accessibility
The current item exposes aria-current="step"; use meaningful titles and include StepperStatus when a spoken progress update is useful.
States and appearance
For conditional content, keep a MotionPresence boundary around keyed MotionSurface children. The shared entrance and exit states work with native primitives and respect your motion preference.
Try pointer and keyboard interaction, and switch the appearance control in the navigation to compare light and dark mode. Motion respects reduced motion preferences.