- Prop
steps- Type
WizardStep[]- Default
- —
- Requirement
- required
- Description
- —
Docs Components Advanced
Wizard
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** * Wizard's pinned demo state (CSP-D3). * * `step: 1` of four pins the rail *mid-flow* so all three step states render * in one shot — step 0 "done" (filled tile + check glyph), step 1 "active" * (outlined tile), steps 2-3 "upcoming" (muted) — and the footer shows both * controls at once (Back visible rather than `invisible`, Next still reading * "Next" rather than the near-the-end "Confirm"/"Finish" labels). * * `content` is a plain string on purpose: React and Solid type it as a node, * Vue/Angular/Svelte as a string, so the one shape every adapter renders * identically is text. Rich per-step markup is each framework's own seam and * would make the five demos diverge. */const wizardFixture = { id: "wizard", step: 1, backLabel: "Back", steps: [ { eyebrow: "Step 01", label: "Account", content: "Your workspace owner and billing contact.", }, { eyebrow: "Step 02", label: "Workspace", content: "Name the workspace and pick its region.", }, { eyebrow: "Step 03", label: "Team", content: "Invite the people who need access on day one.", }, { eyebrow: "Step 04", label: "Review", content: "Check everything over, then create the workspace.", }, ],} satisfies { id: string; step: number; backLabel: string; steps: { eyebrow: string; label: string; content: string }[];}; import { Wizard } from "@grassroot/ui-react/advanced"; export default function WizardDemo() { return ( <div> <Wizard steps={wizardFixture.steps} defaultStep={wizardFixture.step} backLabel={wizardFixture.backLabel} /> </div> );}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">import { ref } from "vue";/** * Wizard's pinned demo state (CSP-D3). * * `step: 1` of four pins the rail *mid-flow* so all three step states render * in one shot — step 0 "done" (filled tile + check glyph), step 1 "active" * (outlined tile), steps 2-3 "upcoming" (muted) — and the footer shows both * controls at once (Back visible rather than `invisible`, Next still reading * "Next" rather than the near-the-end "Confirm"/"Finish" labels). * * `content` is a plain string on purpose: React and Solid type it as a node, * Vue/Angular/Svelte as a string, so the one shape every adapter renders * identically is text. Rich per-step markup is each framework's own seam and * would make the five demos diverge. */const wizardFixture = { id: "wizard", step: 1, backLabel: "Back", steps: [ { eyebrow: "Step 01", label: "Account", content: "Your workspace owner and billing contact.", }, { eyebrow: "Step 02", label: "Workspace", content: "Name the workspace and pick its region.", }, { eyebrow: "Step 03", label: "Team", content: "Invite the people who need access on day one.", }, { eyebrow: "Step 04", label: "Review", content: "Check everything over, then create the workspace.", }, ],} satisfies { id: string; step: number; backLabel: string; steps: { eyebrow: string; label: string; content: string }[];}; import { Wizard } from "@grassroot/ui-vue";// `v-model:step` is Vue's unified controlled/initial seam — React's// `defaultStep` folds into the same prop (see contracts/divergences.json),// so the fixture's pinned step seeds this ref.const step = ref(wizardFixture.step);</script> <template> <div> <Wizard v-model:step="step" :steps="wizardFixture.steps" :back-label="wizardFixture.backLabel" /> </div></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { Component } from "@angular/core";/** * Wizard's pinned demo state (CSP-D3). * * `step: 1` of four pins the rail *mid-flow* so all three step states render * in one shot — step 0 "done" (filled tile + check glyph), step 1 "active" * (outlined tile), steps 2-3 "upcoming" (muted) — and the footer shows both * controls at once (Back visible rather than `invisible`, Next still reading * "Next" rather than the near-the-end "Confirm"/"Finish" labels). * * `content` is a plain string on purpose: React and Solid type it as a node, * Vue/Angular/Svelte as a string, so the one shape every adapter renders * identically is text. Rich per-step markup is each framework's own seam and * would make the five demos diverge. */const wizardFixture = { id: "wizard", step: 1, backLabel: "Back", steps: [ { eyebrow: "Step 01", label: "Account", content: "Your workspace owner and billing contact.", }, { eyebrow: "Step 02", label: "Workspace", content: "Name the workspace and pick its region.", }, { eyebrow: "Step 03", label: "Team", content: "Invite the people who need access on day one.", }, { eyebrow: "Step 04", label: "Review", content: "Check everything over, then create the workspace.", }, ],} satisfies { id: string; step: number; backLabel: string; steps: { eyebrow: string; label: string; content: string }[];}; import { GrassrootWizard } from "@grassroot/ui-angular"; // Every input is a `[property]` binding, never a static attribute — Angular// leaves static template attributes on the host element in the rendered DOM,// where the other four frameworks have nothing.@Component({ selector: "app-wizard-demo", standalone: true, imports: [GrassrootWizard], template: ` <div> <grassroot-wizard [steps]="steps" [(step)]="step" [backLabel]="backLabel" /> </div> `,})export class WizardDemoComponent { protected readonly steps = wizardFixture.steps; // `step` is a two-way `model()` — Angular's unified controlled/initial // seam for React's `step`/`defaultStep` pair, seeded from the fixture. protected step = wizardFixture.step; protected readonly backLabel = wizardFixture.backLabel;} export default WizardDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> /** * Wizard's pinned demo state (CSP-D3). * * `step: 1` of four pins the rail *mid-flow* so all three step states render * in one shot — step 0 "done" (filled tile + check glyph), step 1 "active" * (outlined tile), steps 2-3 "upcoming" (muted) — and the footer shows both * controls at once (Back visible rather than `invisible`, Next still reading * "Next" rather than the near-the-end "Confirm"/"Finish" labels). * * `content` is a plain string on purpose: React and Solid type it as a node, * Vue/Angular/Svelte as a string, so the one shape every adapter renders * identically is text. Rich per-step markup is each framework's own seam and * would make the five demos diverge. */ const wizardFixture = { id: "wizard", step: 1, backLabel: "Back", steps: [ { eyebrow: "Step 01", label: "Account", content: "Your workspace owner and billing contact.", }, { eyebrow: "Step 02", label: "Workspace", content: "Name the workspace and pick its region.", }, { eyebrow: "Step 03", label: "Team", content: "Invite the people who need access on day one.", }, { eyebrow: "Step 04", label: "Review", content: "Check everything over, then create the workspace.", }, ], } satisfies { id: string; step: number; backLabel: string; steps: { eyebrow: string; label: string; content: string }[]; }; import { Wizard } from "@grassroot/ui-svelte";</script> <div> <Wizard steps={wizardFixture.steps} defaultStep={wizardFixture.step} backLabel={wizardFixture.backLabel} /></div>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js *//** * Wizard's pinned demo state (CSP-D3). * * `step: 1` of four pins the rail *mid-flow* so all three step states render * in one shot — step 0 "done" (filled tile + check glyph), step 1 "active" * (outlined tile), steps 2-3 "upcoming" (muted) — and the footer shows both * controls at once (Back visible rather than `invisible`, Next still reading * "Next" rather than the near-the-end "Confirm"/"Finish" labels). * * `content` is a plain string on purpose: React and Solid type it as a node, * Vue/Angular/Svelte as a string, so the one shape every adapter renders * identically is text. Rich per-step markup is each framework's own seam and * would make the five demos diverge. */const wizardFixture = { id: "wizard", step: 1, backLabel: "Back", steps: [ { eyebrow: "Step 01", label: "Account", content: "Your workspace owner and billing contact.", }, { eyebrow: "Step 02", label: "Workspace", content: "Name the workspace and pick its region.", }, { eyebrow: "Step 03", label: "Team", content: "Invite the people who need access on day one.", }, { eyebrow: "Step 04", label: "Review", content: "Check everything over, then create the workspace.", }, ],} satisfies { id: string; step: number; backLabel: string; steps: { eyebrow: string; label: string; content: string }[];}; import { Wizard } from "@grassroot/ui-solid"; export default function WizardDemo() { return ( <div> <Wizard steps={wizardFixture.steps} defaultStep={wizardFixture.step} backLabel={wizardFixture.backLabel} /> </div> );}Installation
API Reference
Import
import { Wizard } from "@grassroot/ui-react/advanced";
Props
Prop
Type
Default
Requirement
Description
stepsWizardStep[]—
required
—
stepnumber | undefined—
optional
Controlled current index.
defaultStepnumber | undefined0optional
Uncontrolled initial index.
onStepChange((next: number) => void) | undefined—
optional
Fired with the new index when the step changes.
onFinish(() => void) | undefined—
optional
Fired when Next is pressed on the last step.
backLabelstring | undefined"Back"optional
Back button label.
- Prop
step- Type
number | undefined- Default
- —
- Requirement
- optional
- Description
- Controlled current index.
- Prop
defaultStep- Type
number | undefined- Default
0- Requirement
- optional
- Description
- Uncontrolled initial index.
- Prop
onStepChange- Type
((next: number) => void) | undefined- Default
- —
- Requirement
- optional
- Description
- Fired with the new index when the step changes.
- Prop
onFinish- Type
(() => void) | undefined- Default
- —
- Requirement
- optional
- Description
- Fired when Next is pressed on the last step.
- Prop
backLabel- Type
string | undefined- Default
"Back"- Requirement
- optional
- Description
- Back button label.
Events
| Event | Payload |
|---|---|
onStepChange | ((next: number) => void) | undefined |
onFinish | (() => void) | undefined |
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { ref } from "vue";
import { Wizard } from "@grassroot/ui-vue";
Props
Prop
Type
Default
Requirement
stepsWizardStepItem[]—
required
stepnumber | undefined—
optional
backLabelstring | undefined"Back"optional
- Prop
steps- Type
WizardStepItem[]- Default
- —
- Requirement
- required
- Prop
step- Type
number | undefined- Default
- —
- Requirement
- optional
- Prop
backLabel- Type
string | undefined- Default
"Back"- Requirement
- optional
Events
| Event | Payload |
|---|---|
update:step | [step: number] |
finish | [] |
Content regions
step
Import
import { Component } from "@angular/core";
import { GrassrootWizard } from "@grassroot/ui-angular";
Props
Prop
Type
Default
Requirement
stepsreadonly WizardStepItem[]—
required
stepnumber0optional
backLabelstring"Back"optional
- Prop
steps- Type
readonly WizardStepItem[]- Default
- —
- Requirement
- required
- Prop
step- Type
number- Default
0- Requirement
- optional
- Prop
backLabel- Type
string- Default
"Back"- Requirement
- optional
Events
| Event | Payload |
|---|---|
stepChange | number |
finish | void |
Import
import { Wizard } from "@grassroot/ui-svelte";
Props
Prop
Type
Default
Requirement
stepsWizardStepItem[]—
required
stepnumber—
optional
defaultStepnumber0optional
backLabelstring"Back"optional
onStepChange(step: number) => void—
optional
onFinish() => void—
optional
classNamestring—
optional
- Prop
steps- Type
WizardStepItem[]- Default
- —
- Requirement
- required
- Prop
step- Type
number- Default
- —
- Requirement
- optional
- Prop
defaultStep- Type
number- Default
0- Requirement
- optional
- Prop
backLabel- Type
string- Default
"Back"- Requirement
- optional
- Prop
onStepChange- Type
(step: number) => void- Default
- —
- Requirement
- optional
- Prop
onFinish- Type
() => void- Default
- —
- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onStepChange | (step: number) => void |
onFinish | () => void |
Content regions
children
Import
import { Wizard } from "@grassroot/ui-solid";
Props
Prop
Type
Default
Requirement
stepsWizardStep[]—
required
stepnumber—
optional
defaultStepnumber0optional
onStepChange(next: number) => void—
optional
onFinish() => void—
optional
backLabelstring"Back"optional
classNamestring—
optional
- Prop
steps- Type
WizardStep[]- Default
- —
- Requirement
- required
- Prop
step- Type
number- Default
- —
- Requirement
- optional
- Prop
defaultStep- Type
number- Default
0- Requirement
- optional
- Prop
onStepChange- Type
(next: number) => void- Default
- —
- Requirement
- optional
- Prop
onFinish- Type
() => void- Default
- —
- Requirement
- optional
- Prop
backLabel- Type
string- Default
"Back"- Requirement
- optional
- Prop
className- Type
string- Default
- —
- Requirement
- optional
Events
| Event | Payload |
|---|---|
onStepChange | (next: number) => void |
onFinish | () => void |