DocsComponentsAdvanced
Wizard
React example follows below.
ts
import { Wizard } from "@grassroot/ui-react/advanced"; const steps = [ { label: "Account", content: <div>AccountForm</div> }, { label: "Workspace", content: <div>WorkspaceForm</div> }, { label: "Review", content: <div>ReviewSummary</div> },]; <Wizard steps={steps} />No translated snippet for this adapter yet.
No translated snippet for this adapter yet.
No translated snippet for this adapter yet.
ts
import { Wizard } from "@grassroot/ui-solid"; const steps = [ { label: "Account", content: <div>AccountForm</div> }, { label: "Workspace", content: <div>WorkspaceForm</div> }, { label: "Review", content: <div>ReviewSummary</div> },]; export function Example() { return ( <> <Wizard steps={steps} /> </> );}Installation
bash
pnpm dlx grassroot add ui/wizardbash
npx grassroot@latest add ui/wizardbash
yarn dlx grassroot add ui/wizardbash
bunx grassroot add ui/wizardAPI Reference
| Prop | Type | Default |
|---|---|---|
stepsrequired | WizardStep[] | — |
stepControlled current index. Pair with `onStepChange`. | number | undefined | — |
defaultStepUncontrolled initial index. | number | undefined | 0 |
onStepChangeFired with the new index when the step changes. | ((next: number) => void) | undefined | — |
onFinishFired when Next is pressed on the last step. | (() => void) | undefined | — |
backLabelBack button label. | string | undefined | "Back" |