Stepperize is a type-safe toolkit for building step-by-step workflows in React.
Define steps once, consume a flat stepper everywhere. Steps are plain objects, custom fields stay typed, and the UI is fully yours.
npm install @stepperize/reactimport { defineStepper } from "@stepperize/react";
const checkout = defineStepper([
{ id: "shipping", title: "Shipping", description: "Enter your address" },
{ id: "payment", title: "Payment", description: "Payment details" },
{ id: "review", title: "Review", description: "Confirm your order" },
]);
function Checkout() {
const stepper = checkout.useStepper();
return (
<section>
<h2>{stepper.current.title}</h2>
<p>{stepper.current.description}</p>
{stepper.match({
shipping: () => <ShippingForm />,
payment: () => <PaymentForm />,
review: () => <ReviewOrder />,
})}
<button onClick={() => stepper.prev()} disabled={!stepper.canPrev}>
Back
</button>
<button onClick={() => stepper.next()} disabled={!stepper.canNext}>
Continue
</button>
</section>
);
}useStepper()for local or shared stepper state.Providerwhen multiple descendants need the same instance.Stepperprimitives for accessible, unstyled UI.- Flat state and navigation:
id,current,index,next,prev,goTo,reset. - Typed rendering with
matchandis. - Step-scoped drafts with
data, optionally validated via per-stepschema(Standard Schema). - Explicit completion with
setCompleteandisComplete.
This repository is a pnpm workspace managed with Turbo.
packages/core- framework-agnostic utilities and TypeScript types for step-based workflows.packages/react- React and React Native bindings, includingdefineStepperand unstyled primitives.apps/docs- the Stepperize documentation site, block gallery, changelog, and shadcn-compatible registry.
Use Node.js 18 or newer and pnpm 10.
pnpm install
pnpm devCommon workspace commands:
pnpm build
pnpm lint
pnpm format-and-lint
pnpm format-and-lint:fixTarget a single package or app with pnpm filters:
pnpm --filter @stepperize/react test
pnpm --filter @stepperize/core build
pnpm --filter docs devRead the full docs at stepperize.com.
The docs app lives in apps/docs and is built with TanStack Start, TanStack
Router, Fumadocs, MDX, Tailwind CSS, and a generated shadcn registry for the
example blocks.
We welcome contributions. Please see our Contributing Guide.
Stepperize is MIT licensed.