Get Started
Install
Install the package via your package manager of choice.
Usage
To create a stepper, use the <Stepper>
component. The
only required prop is steps
, which is an array of React
components that represent each step.
Step Component
Steps are standard React components, they are isolated from the stepper and can contain anthything you want:
Step Navigation
The navigation may be controlled by the a common component, like the footer with directional arrow used in the above example or by the steps themselves. Or both.
By the stepper
Then place the footer component inside the <Stepper>
component,
this is very important because the footer uses React Context to
communicate with the stepper:
By the step
You can also control the navigation from the steps themselves, this is useful when you don’t want to use a common footer component or when you want to add custom navigation logic to a specific step.
In this case you don’t need any component inside the <Stepper>
,
just use the useStepper
hook inside the step component: