Stepper

Multi-step flow indicator with linear or non-linear navigation. Horizontal and vertical orientations.

Account
Sign up
2
Plan
Pick a tier
3
Payment
Add billing
4
Done
You're all set

Usage

import { Stepper, Step, StepConnector } from '@bwo-ui/react';

<Stepper activeStep={1}>
  <Step index={0} label="Account" description="Sign up" />
  <StepConnector />
  <Step index={1} label="Plan" description="Pick a tier" />
  <StepConnector />
  <Step index={2} label="Payment" description="Add billing" />
</Stepper>

Props — Stepper

PropTypeDefaultDescription
activeStepnumberZero-based index of the active step.
orientation'horizontal' | 'vertical''horizontal'Layout direction.
linearbooleantrueWhen true, future (pending) steps can't be jumped to via a clickable indicator.

Props — Step

PropTypeDefaultDescription
indexnumberZero-based index of this step.
labelReactNodeTitle shown next to the indicator.
descriptionReactNodeSupporting text under the label.
iconReactNodeCustom indicator content.
status'completed' | 'active' | 'pending' | 'error'Force a status; otherwise derived from activeStep.
clickablebooleanRender the indicator as a button. Calls onActivate when pressed.
onActivate(index: number) => voidCalled when a clickable indicator is activated.