Component docs
Loading
"use client";
import { Wizard } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
steps (required) | readonly WizardStep[] | — | — |
onValueChange | (value: string) => void | — | Called with the new value (only when it changes). |
value | string | — | Current value (controlled); null where it means "nothing selected". |
backLabel | ReactNode | — | — |
completeLabel | ReactNode | — | — |
defaultValue | string | — | Initial value when uncontrolled. |
nextLabel | ReactNode | — | — |
onComplete | () => void | — | — |
orientation | "horizontal" | "vertical" | — | Layout and arrow-key axis. |
stepsrequiredreadonly WizardStep[]
onValueChange(value: string) => void
Called with the new value (only when it changes).
valuestring
Current value (controlled); null where it means "nothing selected".
backLabelReactNode
completeLabelReactNode
defaultValuestring
Initial value when uncontrolled.
nextLabelReactNode
onComplete() => void
orientation"horizontal" | "vertical"
Layout and arrow-key axis.
Other props are passed to the root element (HTMLAttributes<HTMLDivElement>), including className, style, id and aria-* attributes.
Import source.
const steps = [
{ id: "account", label: "Account", content: "Account details" },
{ id: "plan", label: "Plan", content: "Choose a plan" },
];
const [step, setStep] = useState("account");
<Wizard steps={steps} value={step} onValueChange={setStep} />