Stepper
Multi-step wizard progress with optional clickable steps.
Import
tsx
import { Stepper, StepperList, StepperItem, StepperIndicator, StepperSeparator, StepperTitle, StepperDescription } from "@cooud-ui/ui";
bash
npx cooud-ui add stepper
Examples
API Reference
Generated from the component's exported types.
StepperProps
Extends Omit<HTMLAttributes<HTMLDivElement>, "onChange">
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Controlled active step index. When provided the stepper is fully controlled. |
defaultValue | number | 0 | Initial active step index for the uncontrolled case. Defaults to `0`. |
onValueChange | (value: number) => void | — | Called whenever a step should become active (controlled or not). |
orientation | StepperOrientation | "horizontal" | Layout axis. Defaults to `"horizontal"`. |
StepperItemProps
Extends HTMLAttributes<HTMLLIElement>
| Prop | Type | Default | Description |
|---|---|---|---|
step* | number | — | This step's zero-based index. Required so the item can derive its state (completed / active / upcoming) from the stepper's active value. |
completed | boolean | — | Mark the step done explicitly. Overrides the index-derived "completed". |
disabled | boolean | false | Disable interaction + dim the step. |
StepperIndicatorProps
Extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof stepperIndicatorVariants>, "state">
| Prop | Type | Default | Description |
|---|---|---|---|
children | HTMLAttributes<HTMLSpanElement>["children"] | — | Override the auto-rendered content (step number / check). |
StepperTriggerProps
Extends ButtonHTMLAttributes<HTMLButtonElement>
No own props — see the extended type above for available props.