Skip to content
NewLazy steps are here →

Declare the steps. Skip the if-else maze.

A headless, type-safe wizard engine for multi-step forms. You describe steps and transitions — WizardKit handles branching, validation and history.

Get startednpm i @wizardkit/core

Runs on React · Vue · Svelte · Solid

accountprofilecompanyssoplanreview
Step 1 · account

Who is this for?

Fig 0.1 — current stepsignup.wizard.ts
.addStep({  id: "account",  next: {    type: "conditional",    branches: [      { when: (d) => d.type === "team", to: "company" },      { when: () => true, to: "profile" },    ],  },})
Fig 0.2 — same engine, your framework
import { useWizard } from "@wizardkit/react";

const { state, navigation } = useWizard({
  definition: signup,
  initialData,
});
// state.currentStepId → "account"
History01accountprofileplanreviewnavigation.stepHistory

A wizard is a state machine in disguise. WizardKit makes the machine explicit: every step, branch and guard is plain data you can read, test and draw.

Fig 1.1

Branching

Static, conditional or async transitions. The next step is computed from your data, not from a tangle of handlers.

Fig 1.2

Validation

Sync or async validators on every step, with Standard Schema support for Valibot, ArkType and friends.

Fig 1.3

History

Back returns to the step the user actually came from, even after the route has branched.

Fig 1.4

Lazy steps

Load a step only when the user reaches it. Ship the first screen, not the whole flow.

Fig 1.5

Plugins

Persistence, analytics and your own hooks plug into the same lifecycle events.

Fig 1.6

One core, four bindings

The same definition runs in React, Vue, Svelte and Solid. Switch frameworks, keep the wizard.

Quick Start ​

Install the core package:

bash
npm install @wizardkit/core

For React, Vue, Svelte or Solid integration:

bash
npm install @wizardkit/react
# or
npm install @wizardkit/vue
# or
npm install @wizardkit/svelte
# or
npm install @wizardkit/solid

Define Your First Wizard ​

typescript
import { createWizard } from "@wizardkit/core";

type FormData = { name: string; email: string };

const wizard = createWizard<FormData>("signup")
  .initialStep("personal-info")
  .addStep({
    id: "personal-info",
    next: { type: "static", to: "contact-info" },
    validate: (data) => ({
      valid: Boolean(data.name),
      errors: data.name ? undefined : { name: "Name is required" },
    }),
  })
  .addStep({
    id: "contact-info",
    previous: { type: "static", to: "personal-info" },
    validate: (data) => ({
      valid: Boolean(data.email),
      errors: data.email ? undefined : { email: "Email is required" },
    }),
  })
  .build();

Next Steps ​

Fig 2.0 — your turn

Start with one step. Add the branches when you need them.

Released under the MIT License.