# Docs Steps

> Numbered quickstart steps for docs: a rail of steps, each with prose and a code sample under a filename header with highlighted lines and a copy button that confirms. npm, pnpm, yarn and bun tabs stay in sync across every step and are remembered. Ticking a step off fills the rail and the progress bar, and the step you're reading lights up as you scroll.

- Slug: `docs-steps`
- Category: [Code](https://www.assembli.design/category/code.md)
- Type: component
- Tags: docs, steps, quickstart, code, install, package-manager, tabs, copy, progress
- npm dependencies: motion, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/docs-steps
- Page: https://www.assembli.design/components/docs-steps

![Docs Steps preview](https://www.assembli.design/thumbnails/docs-steps-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `steps` (required) | `DocsStep[]` |  |  |
| `variants` | `string[]` | `["npm", "pnpm", "yarn", "bun"]` | Variant tab order. The choice is shared by every step and remembered in localStorage. |
| `storageKey` | `string` | `"docs-steps:variant"` | localStorage key for the chosen variant. Instances with the same key stay in sync. |
| `completed` | `string[]` |  |  |
| `defaultCompleted` | `string[]` | `[]` |  |
| `onCompletedChange` | `(ids: string[]) => void` |  |  |
| `showProgress` | `boolean` | `true` | Show the "n of m complete" bar above the steps. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/docs-steps/docs-steps.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/docs-steps
```

Registry item JSON: https://www.assembli.design/r/docs-steps.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
