# Onboarding Form

A shadcn/ui onboarding form for SaaS sign-up: five animated steps with a step ticker, radio, dropdown, multi-select and text fields, and a summary.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available for the docs, pricing and about pages: append `.md` to the URL or send an `Accept: text/markdown` header (the home page answers the header too). An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).

## At a glance

- **Good for:** SaaS sign-up and onboarding flows; Collecting a new user's role, team size and goals; Welcome surveys after account creation; Multi-step forms with mixed question types
- **Category:** Forms · **Type:** Forms · **Style:** Motion, Minimal, Dark mode
- **See it:** [Live preview](https://www.craftui.space/docs/blocks/onboarding-form) · [Screenshot](https://www.craftui.space/llms.md/preview/onboarding-form.1f02bdc8.jpg)

![Onboarding Form](https://www.craftui.space/llms.md/preview/onboarding-form.1f02bdc8.jpg)

## Install

```bash
pnpm dlx shadcn@latest add https://www.craftui.space/r/onboarding-form.json
```

This is a paid item (BLK-2A1Z9X): the install needs a craftUI plan or a purchase of it. Signed in, the docs page gives your personal install command. Plans: https://www.craftui.space/pricing

## Usage

```tsx
import OnboardingForm from "@/components/blocks/onboarding-form/onboarding-form";

export default function Page() {
  return <OnboardingForm />;
}
```

With no props it renders with demo content; pass your own through the props below.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `steps` | `Step[]` | `DEFAULT_STEPS` | The steps, in order. Each is { label, question, type?, options?, placeholder?, optional? }; `type` is "radio" \| "select" \| "multi" \| "text" \| "textarea" and defaults to "radio"; `options` is required for radio, select and multi; `optional` lets the user skip the step and shows a Skip button. |
| `onComplete` | `(answers: Record<number, Answer>) => void` | — | Fires when the user submits the final step, with the answers keyed by step index: "multi" steps answer with string[], every other type with string. A skipped step has no key. |

### `Step`

| Field | Type | Description |
| --- | --- | --- |
| `label` (required) | `string` | Short name in the step ticker and on the completion screen, e.g. "Team Size". |
| `question` (required) | `string` | The question heading; it also names the step's field for screen readers. |
| `type` | `StepType` | Defaults to "radio", so a steps array written before this existed still works. |
| `options` | `string[]` | Required by radio, select and multi; ignored by text and textarea. |
| `placeholder` | `string` | Placeholder for select, text and textarea steps. Never the field's label. |
| `optional` | `boolean` | Lets the user move on without answering, and shows a Skip button. |

## Files

The install adds:

- `components/blocks/onboarding-form/onboarding-form.tsx`
- `components/blocks/onboarding-form/step-ticker.tsx`
- `components/blocks/onboarding-form/step-meter.tsx`
- `components/blocks/onboarding-form/question-slide.tsx`
- `components/blocks/onboarding-form/question-field.tsx`
- `components/blocks/onboarding-form/nav-buttons.tsx`
- `components/blocks/onboarding-form/completion-screen.tsx`
- `components/blocks/onboarding-form/steps.ts`
- `components/blocks/onboarding-form/motion.ts`
- `components/blocks/onboarding-form/styles.ts`
- `components/blocks/onboarding-form/DESIGN.md`

npm dependencies (installed for you): `@hugeicons/core-free-icons`, `@hugeicons/react`, `motion`.

shadcn/ui components it uses (the shadcn CLI adds any that are missing): `button`, `checkbox`, `input`, `radio-group`, `select`, `textarea`.