# Installation

> Add Stepperize to a Lit project.

Framework: Lit (`@stepperize/lit`), Stepperize v9.
Source: https://stepperize.com/docs/v9/lit/installation

**pnpm**
```bash
pnpm add @stepperize/lit
```

**npm**
```bash
npm install @stepperize/lit
```

**yarn**
```bash
yarn add @stepperize/lit
```

**bun**
```bash
bun add @stepperize/lit
```

## Requirements

- 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](https://stepperize.com/docs/v9/core).

## Validation libraries

Step schemas use [Standard Schema](https://standardschema.dev), 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:

```ts
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`](https://stepperize.com/docs/v9/core) directly: `flow.subscribe` in
`connectedCallback`, and its return value in `disconnectedCallback`.
