← All components
Interaction / component

Stepper

A responsive step-by-step flow with animated indicators, measured panels and keyboard navigation.

PLAYGROUND
Live preview
Preparing preview…

Take it with you.

SOURCE ACCESS

Preview freely. Unlock the files.

Enter the shared password to copy the complete source, download every file, and install components in your app.

Access lasts 24 hours. Your preview settings stay with you.

Component notes

  • Import Stepper and the named Step export from Stepper.tsx. Replace the three sample children with your own content. Demo.tsx contains the complete gallery composition.
  • Back navigation preserves input state: inactive panels remain mounted, inert and hidden from assistive technology. Pause any child-owned work using the selected step.
  • Native buttons support keyboard input and move focus to the selected panel. Paused or reduced-motion navigation remains functional and settles immediately. Hidden and offscreen animation time is excluded.
  • Content slides, measured height springs, the check path and purple connector timing follow the source. The outer wrapper fits its embedding container. Completion does not submit forms; handle it in your own callback.
  • initialStep sets the initial uncontrolled selection; change replayToken to restart. The gallery remounts when its Starting step control changes.
React 19.2ResizeObserver

React Bits · MIT with Commons Clause. Used with explicit project permission; see bundled notice.

Props

PropTypeDefaultDescription
initialStepnumber1Starting step
backButtonTextstring"Back"Back label
nextButtonTextstring"Continue"Next label
disableStepIndicatorsbooleanfalseLock indicator navigation
childrenReactNodethree example stepsEach child is one step. Import the named Step export for source padding; inactive children retain state.
currentStepnumber | undefinedundefinedControlled 1-based step. count + 1 is completed. Omit for internal state.
onStepChange(step: number) => voidundefinedCalled for navigation to an available step.
onFinalStepCompleted() => voidundefinedCalled when the final step completes.
completionContentReactNodeundefinedOptional content displayed after completion.
backButtonPropsButtonHTMLAttributes<HTMLButtonElement>{}Button props; preventDefault in onClick cancels navigation.
nextButtonPropsButtonHTMLAttributes<HTMLButtonElement>{}Button props; preventDefault in onClick cancels navigation.
renderStepIndicator(props: RenderStepIndicatorProps) => ReactNodeundefinedCustom indicator receives step, currentStep and guarded onStepClick.
stepCircleContainerClassNamestring''Additional classes for the corresponding surface.
stepContainerClassNamestring''Additional classes for the corresponding surface.
contentClassNamestring''Additional classes for the corresponding surface.
footerClassNamestring''Additional classes for the corresponding surface.
pausedbooleanfalseFreeze decorative motion.
replayTokennumber0Change to reset.
classNamestring''Additional outer classes.