Stepper
A stepper component empowering developers to build complex, multi-step processes with ease.
Made by damianricobelliPowered by
Installation
Loading component...
When to use
Steppers guide users through multi-step processes. Use this decision tree:
Usage
const { Stepper } = defineStepper(
{
id: 'step-1',
title: 'Step 1',
},
{
id: 'step-2',
title: 'Step 2',
},
{
id: 'step-3',
title: 'Step 3',
},
);<Stepper.Provider className="space-y-4" variant="horizontal">
{({ methods }) => (
<React.Fragment>
<Stepper.Navigation>
{methods.all.map((step) => (
<Stepper.Step key={step.id} of={step.id} onClick={() => methods.goTo(step.id)}>
<Stepper.Title>{step.title}</Stepper.Title>
</Stepper.Step>
))}
</Stepper.Navigation>
{methods.switch({
'step-1': (step) => <Content id={step.id} />,
'step-2': (step) => <Content id={step.id} />,
'step-3': (step) => <Content id={step.id} />,
})}
<Stepper.Controls>
{!methods.isLast && (
<Button variant="secondary" onClick={methods.prev} disabled={methods.isFirst}>
Previous
</Button>
)}
<Button onClick={methods.isLast ? methods.reset : methods.next}>
{methods.isLast ? 'Reset' : 'Next'}
</Button>
</Stepper.Controls>
</React.Fragment>
)}
</Stepper.Provider>Examples
With description
Loading component...
With icon
Loading component...
With label orientation
Loading component...
Responsive
Loading component...
With tracking
Loading component...
With variants
Loading component...
With progress bar
Loading component...
With per-step status
Loading component...
Props
Credits
- We take our inspiration from Stepperize for the stepper component and style.
Recent changes
- patchv1.2.0Pin shipped dependency floors to the version we develop against. Registry items now declare ranges like `^5.1.9` (the actual installed version) instead of collapsing to `^5.0.0`, so consumers start on the known-tested b…#133
- minorv1.1.0Theme docs refresh, readability pass on semantic foregrounds, and consumer-facing Base UI regression fixes.#121
- minorv1.0.0Post-Base-UI polish. Public API unchanged.#116
- majorv1.0.0Migrate every Radix-based primitive to `@base-ui/react@^1.4.0` (Base UI).#114
- minorv0.3.0Add theme-provider component to the registry with documentation and tests. Includes playground type improvements (export RegistryItem, remove as-const boilerplate) and docs site dark mode border color fix.#109
Built by malinskibeniamin. The source code is available on GitHub.