New! Wizard is in beta, the API is subject to change. Feel free to test it out and let us know what you think!
Additional content to render inside the wizard.
node | element<Text>Additional wizard content</Text>
Initial form values for all steps in the wizard. This is of type TValue which defaults to Record<string, any>.
object{ email: '', name: '' }Custom messages for wizard labels and buttons.
object{
previous: "Previous",
next: "Next",
skip: "Skip",
cancel: "Cancel",
close: "Close",
complete: "Complete",
stepHeader: {
counter: "Step {step} of {total}"
},
progress: "Wizard progress",
validationError: "Please complete required fields."
}Callback function triggered when the wizard is cancelled. Receives an event object containing the current form value and the reason for cancellation.
function(event: { value: { name: "Alice", active: true }, reason: 'user' }) => handleCancel(event.value)Callback function triggered when form values change in any step. Receives an event object containing the updated form value.
function(event: { value: { name: "Alice", active: true } }) => setFormData(event.value)Callback function triggered when the wizard is completed successfully. Receives an event object containing the final form value and an array of completed step IDs.
function(event: { value: { name: "Alice", active: true }, completedSteps: string[] }) => submitForm(event.value)Callback function triggered when the active step changes. Receives a StepChangeEvent object with step change details.
function(event: StepChangeEvent) => console.log('Step changed:', event.stepId)Custom function to render step content instead of using the step's render property. Receives the current step and the wizard context API.
function(step: WizardStep, api: WizardContextValue) => <Box>{step.title}</Box>Display style for the progress indicator showing the wizard steps.
string'horizontal'
'vertical'
Array of WizardStep objects defining each step in the wizard. Each step includes id, title, description, and render function.
array[{ id: 'account', title: 'Account', description: 'Account info', render: () => null }]The padding for the wizard body area.
string"large"
object{ horizontal: "large", vertical: "large" }The gap between elements in the wizard body.
string"medium"
object{ row: "none", column: "medium" }The padding for the wizard header.
string"medium"
object{ horizontal: "large", vertical: "small" }The padding for the horizontal progress indicator.
string"medium"
object{ horizontal: "none", vertical: "none" }The padding for the vertical progress indicator.
string"medium"
objectundefined
The padding for the step header.
string"medium"
object{ horizontal: "none", vertical: "none" }The margin for the step title.
string"none"
object{ top: "small", bottom: "small" }The margin for the step description.
string"small"
object{ top: "xsmall", bottom: "none" }The padding for the step content area.
string"medium"
object{ vertical: "large", horizontal: "large" }