Skip to content

Stepper

Free

The steps of a fixed flow, such as a checkout or a setup wizard. It shows where you are, across or down, with numbers or dots.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · MIT + Commons Clause

Playground

Loading the preview

Props

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>
PropTypeDefaultDescription
orientation"horizontal""vertical""horizontal"
size"default""sm""default"
variant"dot""number""number"
valuenumber—The current step, a 0-based index (controlled).
defaultValuenumber0The first step when the Stepper is not controlled. Default 0.
onValueChange—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.
nonLinearbooleanfalseLets 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.
focusOnChangebooleantrueMoves 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.
readOnlybooleanfalseRead-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".
localestring—A BCP 47 locale for the step numbers ("ar-EG" gives Arabic-Indic digits). Default: the DisplayLocaleProvider locale, else "en-US".
labelsPartial<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>
PropTypeDefaultDescription
...props<ol> attributes—Every other attribute goes to the <ol>, with a ref.

StepperItem

<li>
PropTypeDefaultDescription
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.
disabledbooleanfalseA step that does not apply: 50%, a disabled button, and Next and Previous skip it.
busybooleanfalseThe 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>
PropTypeDefaultDescription
classNamestring—
From Base UIButtonBase UI docs
focusableWhenDisabledbooleanfalseWhether 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>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

StepperTitle

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

StepperDescription

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

StepperSeparator

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

StepperContent

<section>
PropTypeDefaultDescription
indexnumber—The step of this content. Default: the step of the StepperItem it sits in (vertical).
keepMountedbooleanfalseKeeps 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>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

StepperPrevious

<button>
PropTypeDefaultDescription
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"
classNamestring—
busyboolean—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.
spinnerPlacement"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
focusableWhenDisabledbooleanfalseWhether 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>
PropTypeDefaultDescription
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"—
classNamestring—
busyboolean—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.
spinnerPlacement"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.
keepOnLastbooleanfalseKeeps 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
focusableWhenDisabledbooleanfalseWhether 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.
  • Use it for a flow with a known number of steps in a fixed order.
  • Keep it linear (the default) when a step needs the one before it. Use nonLinear when people can jump to any step.
  • Use readOnly for progress that people cannot change, such as an order status.
  • Check a step in onValueChange and call eventDetails.cancel() to keep people on it.
  • For a task that loads with no steps, use a Spinner.
TabMoves to the next step that you can go to. Locked and disabled steps are skipped.
EnterGoes to the focused step.
SpaceGoes to the focused step.

The steps are an <ol>, so a screen reader says "list, 3 items". A step that you can go to is a Base UI Button. The current step has aria-current="step". There are no arrow keys: each step is one tab stop.

In a linear flow, a step after the furthest one reached is a disabled button, so Tab skips it. The mark is aria-hidden. When the list folds or uses dots, a hidden title still names its button (aria-labelledby).

StepperDescription is the aria-describedby of its trigger, so the name stays short. StepperContent is a <section> named by the step title, with tabIndex={-1}. After a change it takes focus, so a screen reader reads the new step. A loading step sets aria-busy on its content.

Each trigger has a 44px target on touch (hit-area). With readOnly, the triggers are plain <div> elements with no tab stops. With variant="dot", the title is hidden from view and shows in a Tooltip.

Line fill
indicator · 200ms · ease-panel (0.2, 0.4, 0.2, 1)
New mark and content
fade · 150ms · ease-out (0, 0, 0.2, 1)
Vertical content
panel · 260ms · ease-panel (0.2, 0.4, 0.2, 1)

Built with

Installs with Stepper

  1. AddedStepper, with Button, Dot, Spinner, Tooltip.
Open the release