The value is a 0-based step index. Put each StepperItem straight in StepperList, and check a step in onValueChange (call eventDetails.cancel() to stay).
checkout-steps.tsx
Stepper
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "horizontal""vertical" | "horizontal" | |
| size | "default""sm" | "default" | |
| variant | "dot""number" | "number" | |
| value | number | — | The current step, a 0-based index (controlled). |
| default | number | 0 | The first step when the Stepper is not controlled. Default 0. |
| on | — | Runs before a step change, with the new index and the Base UI event details. Validate here: eventDetails.cancel keeps the step (and the focus) where they are. In a controlled Stepper, set value here. | |
| non | boolean | false | Lets every step be a button, so people can jump ahead. Off by default: a step after the furthest one reached is locked, so a checkout cannot skip a required step. |
| focus | boolean | true | Moves focus to the new StepperContent after a change by a trigger, Next, or Previous (default true). Turn it off only when the app moves focus itself. |
| read | boolean | false | Read-only progress (an order, a deploy): each StepperTrigger renders a plain <div> with the same layout, so there are no buttons, no hover, and no tab stops, and the current item has aria-current="step". |
| locale | string | — | A BCP 47 locale for the step numbers ("ar-EG" gives Arabic-Indic digits). Default: the DisplayLocaleProvider locale, else "en-US". |
| labels | Partial<StepperLabels> | — | The words of the step place ("Step 2 of 4"). |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
StepperList
<ol>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <ol> attributes | — | Every other attribute goes to the <ol>, with a ref. |
StepperItem
<li>| Prop | Type | Default | Description |
|---|---|---|---|
| status | "current""done""error""upcoming" | — | Where the step is. Derived from the value when not set: before it done, at it current, after it upcoming. Set error after a failed check (on the current step it keeps the current ring, in destructive), or done for a step that is done out of order. |
| disabled | boolean | false | A step that does not apply: 50%, a disabled button, and Next and Previous skip it. |
| busy | boolean | false | The step waits for the app (an async check): the mark shows a spinner, the content is aria-busy. |
| ...props | <li> attributes | — | Every other attribute goes to the <li>, with a ref. |
StepperTrigger
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
StepperIndicator
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
StepperTitle
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
StepperDescription
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
StepperSeparator
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
StepperContent
<section>| Prop | Type | Default | Description |
|---|---|---|---|
| index | number | — | The step of this content. Default: the step of the StepperItem it sits in (vertical). |
| keep | boolean | false | Keeps the content in the DOM (hidden) when its step is not current, so form input survives. |
| ...props | <section> attributes | — | Every other attribute goes to the <section>, with a ref. |
StepperCount
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
StepperPrevious
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | "outline" | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
StepperNext
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| keep | boolean | false | Keeps the button (disabled) on the last step. By default it renders nothing there, so the app's submit Button takes its place and no dead button sits next to a live one. | ||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| Tab | Moves to the next step that you can go to. Locked and disabled steps are skipped. |
|---|---|
| Enter | Goes to the focused step. |
| Space | Goes to the focused step. |
Built with
Installs with Stepper







