Stepper

A stepper component is used to indicate progress through a multi-step process.

Import#

Chakra UI exports the followings components:

import {
Step,
StepDescription,
StepIcon,
StepIndicator,
StepNumber,
StepSeparator,
StepStatus,
StepTitle,
Stepper,
useSteps,
} from '@chakra-ui/react'

Usage#

Use the step indicator component to show the user’s position in and progress through a multi-step process. Step indicators are often used on application forms or workflow screens.

The useSteps hook is exported to help manage the state of stepper and the active step index.

Here's a basic example of a horizontal stepper:

Changing the orientation#

Changing the size#

To change the size of the step indicator, you can pass the size prop to the Stepper component, setting it to either sm, md or lg.

Changing the color scheme#

The stepper uses a blue color scheme by default. To change the colorScheme, you can pass the colorScheme prop to Stepper component to any color in the theme.

Changing the step indicator's content#

In some cases you might want to render custom icons or elements within the StepIndicator component.

To do this, you can leverage the StepStatus component to show custom React elements based on the step's status.

Setting the active step with click#

Adding a progress bar#

You can replace the StepSeparator component with a custom progress indicator, e.g. the Progress component for more custom experience.

Showing step summary#

A step summary can be shown when labels are hidden. The step summary allows the user to see the label of the current step directly below the step group and is recommended for smaller screens and responsive mobile views.

Proudly made inNigeria by Segun Adebayo

Deployed by β–² Vercel