useStep
Zero-based step state for wizards and multi-page forms.
The current step with next, previous, goTo and reset, clamped to the step count, controlled or uncontrolled. Pairs with Stepper and Progress.
Usage
Examples
Wizard with progress
API
3 options
3 return values
Accessibility
Move focus to the new step heading after Next or Back, and state the position in text ("Step 2 of 4").
Notes
- Validate the current step before calling next; the hook does not know your rules.
Related
StepperShow progress through a sequence of labelled steps.6 examplesProgressDeterminate and indeterminate progress with a readable task label.4 examplesuseBooleanGeneric boolean state with stable toggle, enable and disable actions.useControllableStateState that works controlled or uncontrolled, like native inputs.useCountdownA pausable countdown or count-up that stops at its target.useCounterA number with increment, decrement, set and reset actions.