Stepper

A component that visually represents a sequence of steps in a process, allowing navigation between steps.

Usage

Default

Progress Stepper

const [activeStep, setActiveStep] = useState(0);
const steps = [
  { label: "Start", icon: FaClipboardList },
  { label: "Review", icon: FaFileAlt },
  { label: "Submit", icon: FaCheckCircle },
];

<Stepper
  steps={steps}
  activeStep={activeStep}
  onStepClick={setActiveStep}
/>

Props

Data table
TypeDescription
activeStepnumberThe index of the currently active step.
aria-describedbystringID of an element that describes the stepper container.
aria-labelstringAccessible label for the stepper container. Use this when there is no visible external label.
aria-labelledbystringID of an element that labels the stepper container. Takes precedence over aria-label when provided.
classNamestringAdditional class names for styling customization.
data-testidstringOptional test ID for testing purposes.
disableBackNavigationbooleanIf true, disables backward navigation (users cannot go to previous steps).
getStepAriaLabel((step: Step, index: number, stepCount: number, isActive: boolean, isCompleted: boolean) => string)Optional custom accessible label generator for each step button.
groupLabelstringFallback hidden label text when no aria-label or aria-labelledby is provided. Defaults to "Progress Stepper".
onStepClick((stepIndex: number) => void)Optional callback when a step is clicked.
orientationOrientationTypeOrientation of the stepper. "horizontal" | "vertical"
roundingRoundingTypeRounding of the stepper buttons. "none" | "small" | "medium" | "large" | "full"
shadowShadowTypeShadow style for the stepper buttons. "none" | "light" | "medium" | "strong" | "intense"
sizeSizeTypeSize of the stepper icons. "xs" | "small" | "medium" | "large" | "xl"
stateStateTypeState of the stepper. "success" | "error" | "warning" | "disabled" | ""
stepsStep[]An array of steps, each with a label and optional icon.
themeThemeTypeTheme style for the stepper. "primary" | "secondary" | "tertiary" | "quaternary" | "clear"