Stepperize v8Explore the changes
v8Typed navigation results, shared flows

The type-safe way to build multi-step flows in React.

Define your steps once. Stepperize infers every id, guards every move, and tells you exactly why a navigation failed, while your markup, forms, and design system stay yours.

Package manager
$ npm i @stepperize/react
checkout.tsxLive preview
const checkout = defineStepper([
{ id: "account", title: "Account" },
{ id: "shipping", title: "Shipping" },
{ id: "review", title: "Review" },
{ id: "done", title: "Done" },
]);
function Checkout() {
const stepper = checkout.useStepper({
async beforeStepChange({ from, direction }) {
if (direction === "prev") return true;
if (from.id === "account") return isEmail(email);
if (from.id === "review") await placeOrder();
},
});
return stepper.match({
account: () => <Account />,
shipping: () => <Shipping />,
review: () => <Review />,
done: () => <Done />,
});
}

Account

Where we send the receipt

1 / 4

The guard blocks Continue until this is a valid email.

stepper.id"account"index0isPendingfalse
result →press Continue

Live: type an email, step through, then place the order. Every line on the left is what drives the panel on the right.

Why Stepperize

Stop hand-rolling step state.

Every multi-step flow starts with an index, a switch, and clamping logic, then quietly rots as steps and rules pile up. Stepperize replaces all of it with one typed instance.

Compare code
  • Manual index and clamping on every move
  • Stringly-typed switch: a typo still compiles
  • Miss a case and nothing warns you
  • Validation gating wired by hand, per step
checkout.tsx
Compiles. Broken.
const steps = ["shipping", "payment", "review"];
const [step, setStep] = useState(0);

// clamp by hand, every time
const next = () => setStep((s) =>
  Math.min(s + 1, steps.length - 1));

// stringly-typed — typo still compiles
switch (steps[step]) {
  case "shiping": return <Shipping />;  // 💥
  case "payment": return <Payment />;
  // forgot review? no warning.
}

More than a stepper

Real flow logic, not just step tracking.

Most stepper libraries stop at "which step is active". Stepperize handles the hard parts too: guards that block, computed branching, and async transitions with retry. These demos are live.

Where should we ship?
See every flow-logic block

Built for production

Small API. Every edge covered.

One typed definition powers navigation, rendering, validation and state, without dictating a single line of your markup.

stepper.goTo("")
  • ab"shipping"
  • ab"payment"
  • ab"review"
stepper.goTo("paymnt");
ts(2345) Argument of type "paymnt" is not assignable to parameter of type "shipping" | "payment" | "review".

Your step ids are a type

Ids become a literal union the moment you call defineStepper. Typos and missing cases fail in your editor, not in production. No generics to wire up.

Learn more
const result = await stepper.next();
if (!result.accepted) {
result.reason
// "guard""policy""boundary""pending"
}

Every move has a result

New in v8

Navigation resolves to a typed result. Check accepted, then handle the exact reason a move was refused.

Learn more
checkout.useStepper()
<checkout.Provider>
useStepperContext(s => s.id)

Local or shared, your call

New in v8

Each useStepper() is its own flow. A Provider shares one, and selectors keep re-renders focused.

Learn more
2
3
status=previousstatus=activestatus=upcoming

Accessible primitives

Unstyled Stepper.* components ship roles, ARIA and keyboard navigation. Style them through data attributes.

Learn more
  • React Hook Form
  • TanStack Form
  • Conform
  • Zod
  • Valibot
  • ArkType

Bring your form library

Attach a Standard Schema per step and keep fields in React Hook Form, TanStack Form, Conform, or plain state.

Learn more

Own your UI

28 blocks. Copy, paste, own every line.

Headless core, optional unstyled primitives, and production-ready blocks built with Tailwind and shadcn/ui. Install one from the registry and it is your code, with nothing to eject.

Expense #2043

$1,250 · Travel

Requester
Approval TimelineAsync & StatusView code
Plan PickerCommerceView code
Copy Assistant

What should I write?

AI WorkflowFlow LogicView code

Choose a method

Two-Factor SetupAuth & VerificationView code
pipeline#1024 · main
  1. Build

    Compile & bundle

  2. Test

    Run the suite

  3. Deploy

    Push to production

  4. Verify

    Smoke checks

CI/CD PipelineAsync & StatusView code

Ship your first flow in minutes.

Install the package, define your steps, render. The flat, typed API gets out of your way.

Package manager
$ npm i @stepperize/react