Installation
Add Stepperize to a Svelte project.
pnpm add @stepperize/svelteRequirements
- Svelte 5.33.5 or newer, with runes. Svelte 4 is not supported.
- TypeScript 5.0 or newer for the typed ids. Nothing needs to be configured;
svelte-checkand the Svelte language tools check step ids in markup.
The package ships Svelte source, like every Svelte library, so your bundler
needs the Svelte plugin it already has (@sveltejs/vite-plugin-svelte, or
SvelteKit).
@stepperize/core is installed with it. You only import from it directly to
run a flow without Svelte.
Validation libraries
Step schemas use Standard Schema, so Zod, Valibot, ArkType and any other compliant library work without an adapter. Stepperize does not depend on any of them.
The stepper without the components
The default entry includes the Stepper primitives. If you render your own
markup, import from /headless to leave them out of your bundle:
import { defineStepper } from "@stepperize/svelte/headless";The definition is the same, without the Stepper property.
SvelteKit
Nothing to configure. See Server rendering.
The examples use SvelteKit 3, which imports from src/lib with the #lib
subpath import. On SvelteKit 2, write $lib/checkout where they write
#lib/checkout.js.
Last updated on