# Wizard

> Source: https://design.nanatec.co.ke/components/wizard/
> A form split into steps, with a progress trail, Back and Continue buttons, and a check on each step before moving on.

Use a wizard when a long form reads better in parts, such as a quote or an
onboarding flow. Each step is checked before the next opens, so mistakes are
caught where they were made. For a progress trail without the form around it,
use [Stepper](/components/stepper/).

## Preview

## Installation

Each `nana-wizard-step` holds one step's fields. Its `label` names the step in
the trail and to screen readers; `description` adds a line under it.

```html
<nana-wizard label="Motor cover">
  <nana-wizard-step label="Owner">…</nana-wizard-step>
  <nana-wizard-step label="Vehicle">…</nana-wizard-step>
  <nana-wizard-step label="Review">…</nana-wizard-step>
</nana-wizard>

<script type="module">
  const wizard = document.querySelector('nana-wizard');
  wizard.addEventListener('nana-wizard-finish', () => submitQuote());
</script>
```

`steps`, each with a `label` and an optional `description`, and the `children`
snippet are required. `label` names the progress trail. `labels` replaces the
button text. `validate`, `onStepChange` and `onFinish` are described above.
