UIComponentsReact
The steps of a process, each with a number, a title and a panel, moved through with Back and Continue buttons.
Built on the headless Stepper.See its API in Docs
Rendered by React 19.3.1
Installation
npx shadcn@4.23.0 add https://hamur.dev/r/react/stepper.jsonIt also adds utils, button. The app needs its setup first: Installation.
Usage
Put one StepperItem per step inside a StepperList, each holding a StepperTrigger with a StepperIndicator, a StepperTitle and an optional StepperDescription, then a StepperSeparator up to the last step. Give each step a StepperPanel with the same value, after the list or, in a vertical stepper, inside its Item. StepperPrevious and StepperNext move one step and StepperValue reads "Step 2 of 3". Name the list with aria-label or aria-labelledby. The validation of each step's fields, the completed steps, the focus and the announcements come from the headless Stepper.
import {
Stepper,
StepperDescription,
StepperIndicator,
StepperItem,
StepperList,
StepperNext,
StepperPanel,
StepperPrevious,
StepperSeparator,
StepperTitle,
StepperTrigger,
StepperValue,
} from '@/components/ui/stepper'Examples
Default
A checkout in a row of three steps, the first completed, with Back and Continue.
Vertical
The same steps stacked, each panel under its title and the line beside the panels.
Rendered by React 19.3.1
The indicator is a circle with the step's number: outlined and ringed while current, filled with a check once completed and with an X while invalid, so a state is told by its icon and not only by its color. The number comes from a CSS counter of the list, so a disabled step keeps its place in the count. Under orientation="vertical" the separator is a line from the indicator down to the next step, and a Panel inside its Item is indented to the title. Previous is the Button's outline variant and Next its default; at their bound they stay focusable and are dimmed. This item takes Base UI's component ID as its slug and one name per Base UI part.
API reference
The styled parts pass every prop to the headless part they wrap and add classes. The props, data attributes and keyboard are on Stepper's API reference.