We use cookies to ensure you get the best experience on our website. Read our privacy policy

Skip to main content

Directory

Stepper Component

The Stepper component provides a visual representation of progress through a sequence of steps, perfect for multi-step forms, wizards, and progress tracking.

  • Check Circle

    Multiple Layouts: Horizontal and vertical orientations

  • Check Circle

    Visual Variants: Numbers, checkmarks, or mixed indicators

  • Check Circle

    Interactive Navigation: Click-to-navigate between steps

  • Check Circle

    Accessibility: ARIA labels and keyboard navigation support

Create a simple horizontal stepper:

<Stepper steps={4} currentStep={2} />
Step 1
Step 2
Step 3
<Stepper steps={3} labels currentStep={2} mode="vertical" />
<Stepper steps={4} currentStep={3} variant="checkmarks" />

steps prop is not required if labels prop is an array. If labels is set to true, the labels will be generated as “Step 1”, “Step 2”, etc.

Introduction
Sign Up
Confirmation
<Stepper currentStep={2} labels={['Introduction', 'Sign Up', 'Confirmation']} />

overflow prop can be set to scroll or wrap. If scroll is set, the stepper will allow horizontal scrolling. If wrap is set, the stepper will allow wrapping to next line.

Introduction
Sign Up
More Steps
Another Step
Confirmation
<Stepper currentStep={2} labels={['Introduction', 'Sign Up', 'More Steps', 'Another Step', 'Confirmation']} overflow="scroll" />
Introduction
Sign Up
More Steps
Another Step
Confirmation
<Stepper currentStep={2} labels={['Introduction', 'Sign Up', 'More Steps', 'Another Step', 'Confirmation']} overflow="wrap" />

It is recommended to use either sequential or disabled navigation so that the user will not skip over any steps.

User can click any step to navigate to it.

<Stepper steps={3} currentStep={2} navigation="free" />

User can only navigate back to previous steps.

<Stepper steps={3} currentStep={2} navigation="sequential" />

User cannot navigate to any step.

<Stepper steps={3} currentStep={2} navigation="none" />
Stepper Component Props Extends <div> HTMLElement
Prop Type Default Description
steps number Total number of steps
currentStep number 1 Current active step
mode "horizontal" | "vertical" horizontal Layout orientation
variant "numbers" | "checkmarks" | "mixed" numbers Visual style of step indicators
labels boolean | string[] false Show step labels or custom labels
navigation "free" | "sequential" | "none" none Navigation mode: free allows clicking any step, sequential only allows previous steps, none disables clicking
overflow "scroll" | "wrap" wrap Overflow behavior: scroll allows horizontal scrolling, wrap allows wrapping to next line
Stepper Component Functions
Function Type Description
next() void Navigate to next step
previous() void Navigate to previous step
goToStep(step: number) void Navigate to specific step
get: currentStep number Current active step
get: totalSteps number Total number of steps
// Listen for step changes
stepper.addEventListener(StepperEventNames.StepChange, (event) => {
const { currentStep, totalSteps } = event.detail;
console.log('Current step:', currentStep);
});
Step 1
Step 2
Step 3
Step 4
Click on any step to see events…

Limited Time Launch Sale

Create intuitive multi-step processes with our AstroJS starter template. Get started now!

GET 60% OFF!
North Star Themes Logo

Subscribe to our newsletter

Get the latest AstroJS tips and tricks right to your inbox

Email: [email protected]

© 2025 North Star Themes

Web Kit Provided By North Star Themes