Installation
Add Stepperize to a Lit project.
pnpm add @stepperize/litRequirements
- Lit 3.
- TypeScript 5.0 or newer for the typed ids. Nothing needs to be configured, and decorators are not required.
@stepperize/core is installed with it. You only import from it directly to
run a flow without Lit.
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 controller without the primitives
The default entry includes the primitives. If you write all the markup and
ARIA yourself, import from /headless to leave them out of your bundle:
import { defineStepper } from "@stepperize/lit/headless";The definition is the same; its controller has flow, steps, value and
destroy(), and no directives.
Other web component libraries
The controller only needs a ReactiveControllerHost (addController,
removeController, requestUpdate, updateComplete), so it works with
anything that implements that interface. For plain custom elements with no library, use
@stepperize/core directly: flow.subscribe in
connectedCallback, and its return value in disconnectedCallback.
Last updated on