A headless, type-safe wizard engine for multi-step forms. You describe steps and transitions — WizardKit handles branching, validation and history.
$npm i @wizardkit/core Runs on React · Vue · Svelte · Solid
.addStep({ id: "account", next: { type: "conditional", branches: [ { when: (d) => d.type === "team", to: "company" }, { when: () => true, to: "profile" }, ], },})
import { useWizard } from "@wizardkit/react";
const { state, navigation } = useWizard({
definition: signup,
initialData,
});
// state.currentStepId → "account"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.
Static, conditional or async transitions. The next step is computed from your data, not from a tangle of handlers.
Sync or async validators on every step, with Standard Schema support for Valibot, ArkType and friends.
Back returns to the step the user actually came from, even after the route has branched.
Load a step only when the user reaches it. Ship the first screen, not the whole flow.
Persistence, analytics and your own hooks plug into the same lifecycle events.
The same definition runs in React, Vue, Svelte and Solid. Switch frameworks, keep the wizard.
Install the core package:
npm install @wizardkit/coreFor React, Vue, Svelte or Solid integration:
npm install @wizardkit/react
# or
npm install @wizardkit/vue
# or
npm install @wizardkit/svelte
# or
npm install @wizardkit/solidimport { 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();