Stepper
A progress sequence with completed, current, upcoming, and error states.
StepperView sourceExample
The preview is interactive. The code below it is the docs demo source; demo-only layout classes can be omitted in application code.
- Configure, completed
- Build, completed
- Deploy, error, current step
- Verify, upcoming
import { Cell } from "retend";
import { Stepper } from "innate-ui";
import classes from "../docs.module.css";
export function StepperDemo() {
const currentStep = Cell.source(2);
return (
<div class={classes.stepperDemo}>
<Stepper
value={currentStep}
onChange={(step) => currentStep.set(step)}
ariaLabel="Account setup progress"
>
<Stepper.Item step={1}>Account</Stepper.Item>
<Stepper.Item step={2}>Profile</Stepper.Item>
<Stepper.Item step={3}>Security</Stepper.Item>
<Stepper.Item step={4}>Review</Stepper.Item>
</Stepper>
<Stepper value={3} orientation="vertical" ariaLabel="Deployment progress">
<Stepper.Item step={1}>Configure</Stepper.Item>
<Stepper.Item step={2}>Build</Stepper.Item>
<Stepper.Item step={3} state="error">
Deploy
</Stepper.Item>
<Stepper.Item step={4}>Verify</Stepper.Item>
</Stepper>
</div>
);
}API reference
This table is generated from Innate UI's exported TypeScript declarations and JSDoc. Native element attributes inherited by a prop type are not repeated here.
StepperProps
| Prop | Type | Default |
|---|---|---|
valuerequiredOne-based number of the current step. | JSX.ValueOrCell<number> | — |
childrenrequired`Stepper.Item` children. | JSX.Children | — |
orientationLayout direction of the step sequence. | JSX.ValueOrCell<StepperOrientation> | "horizontal" |
ariaLabelrequiredAccessible label describing the progress sequence. | JSX.ValueOrCell<string> | — |
onChangeCalled when an interactive step requests a different one-based step number. | (step: number) => void | — |
StepperItemProps
| Prop | Type | Default |
|---|---|---|
steprequiredOne-based number of this step in the enclosing sequence. | number | — |
childrenrequiredVisible step label or content. | JSX.Children | — |
stateOverrides the derived completed/upcoming state, most commonly with `"error"`. | JSX.ValueOrCell<StepperItemState | undefined> | — |
disabledWhether this step is unavailable for interaction. | JSX.ValueOrCell<boolean> | false |