Skip to content
Thrum

Stepper

The steps of a flow that is done in order: a checkout, a setup, an import. It shows which steps are done, which one is current and which are still to come, and can mark a step that failed. For views a reader may open in any order, use tabs.

Install

npx shadcn@latest add @thrum-pro/stepper

This is a Pro component. The command works once your project has a licence key: set up Pro or see pricing.

Automatically installs icon check from the icon set.

Props

PropTypeDefaultDescription
Stepper: valuenumber–The position of the current step, counted from 0, when the parent holds it. Steps before it are complete. A value equal to the number of steps completes them all.
Stepper: defaultValuenumberDefault 0The current step at first, when the stepper holds it itself.
Stepper: onValueChange(value: number) => void–Called with a step's position when the reader presses a completed step. Only a clickable stepper calls it.
Stepper: orientation"horizontal" | "vertical"Default "horizontal"horizontal puts the steps side by side with their titles underneath. vertical stacks them with their titles beside them, which suits long titles and narrow containers.
Stepper: clickablebooleanDefault falseMake every completed step a button that goes back to it. The current step and later ones stay plain text.
Stepper: soundbooleanDefault truePlay a tick when the reader goes back to a step, if the visitor has sound on.
Stepper: classNamestring–Extra classes for the list, merged last. It fills the width it is given.
Stepper: ...propsComponentProps<"ol">–Every other attribute of the list. Give it an aria-label.
StepperItem: titleReactNodeRequiredThe step's name.
StepperItem: descriptionReactNode–A line under the title, in the muted text colour.
StepperItem: errorbooleanDefault falseThe step failed or needs a correction. It shows a warning mark in the destructive colour in place of its number or tick.
StepperItem: classNamestring–Extra classes for the step's list item.

Motion and sound

Motion

  • The line between two steps fills from the earlier step to the later one over 200 ms when the earlier one is completed, and empties the same way when the reader goes back.
  • A marker's fill, border and number change colour over 150 ms.
  • Reduced motion: lines and markers change at once.

Sound

  • A tick when the reader presses a completed step to go back to it. A change made by the parent, such as a Next button, is silent.

Sound is off until the visitor turns it on. Pass sound={false} to keep this component silent. How sound works

Accessibility

  • It is an ordered list, so a screen reader announces the number of steps and each step's position. Name it with an aria-label.
  • The current step carries aria-current="step". A completed step ends with the hidden word completed and a failed one with error.
  • Each state has its own mark: a tick on a filled marker, a number in a ring, a number in a faint ring, or a warning mark. Colour is never the only sign.
  • In a clickable stepper a completed step is a native button, at least 28 pixels tall, named by its title, its description and the word completed.
  • Titles and descriptions wrap. In a container under about 320 pixels, use the vertical orientation: side by side, four titles have too little room to read well.
KeysAction
TabIn a clickable stepper: move through the completed steps. The other steps are text and are skipped.
Enter / SpaceGo back to the focused step.

Source

SourcePro

The source comes with Pro

TypeScript source · Copy-paste ready · MIT-compatible for client projects · Includes all dependencies

Files and dependencies

Adds
components/ui/stepper.tsx
Packages
None
Brings along
Sound engine
Icons
check

Changelog

  1. 1.0.0 · 2026-12-03First release.

Loading index…

Keyboard shortcuts

/Ctrl KSearch components, docs and actions
?Show this list
AAppearance studio
SSound on or off
MFull or reduced motion
TTheme: auto, light, dark
GSurface: solid or frosted
BBackdrop photograph (under glass)
CCorner radius: square to round
RReplay the demo, on a component page
DDraw new data, on a component page
←→HomeEndMove the cursor in a focused chart
EscClose a dialog, or leave a chart cursor