Skip to content

Components

<Stepper>

The main container component.

Props

NameTypeDefaultDescription
onComplete() => voidRequiredCallback fired when the user completes the final step.
childrenReactNodeRequiredThe step components.
onCancel() => voidundefinedCallback fired when the user cancels (Escape on first step).
onStepChange(step: number) => voidundefinedCallback fired when the active step index changes.
onEnterStep(step: number) => voidundefinedCallback fired after entering a new step.
onExitStep(step: number) => void | boolean | Promise<boolean>undefinedCallback fired before leaving a step. Return false to prevent navigation.
stepnumberundefinedIf provided, puts the stepper in controlled mode.
initialStepnumber0The index of the step to show initially (uncontrolled mode).
keyboardNavbooleantrueWhether to enable built-in Enter/Escape navigation.
showProgressbooleantrueWhether to display the progress bar.
renderProgress(ctx: ProgressContext) => ReactNodeundefinedCustom renderer for the progress bar.
markersStepperMarkersundefinedCustom configuration for progress bar symbols.

<Step>

Represents a single step in the wizard.

Props

NameTypeDefaultDescription
namestringRequiredThe display name of the step (used in the progress bar).
childrenReactNode | (ctx: StepContext) => ReactNodeRequiredThe content of the step. Can be a function to access navigation controls.
canProceedboolean | (() => boolean | Promise<boolean>)truecondition to allow moving to the next step.

Example

tsx
<Step name="Verification" canProceed={isVerified}>
  <Text>Please verify your identity.</Text>
</Step>

Released under the MIT License.