Sean Hello

Stepper

Component 23

About

A step-by-step process for users to navigate through a series of steps.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Stepper to your project and fits it to your theme.

Code

How Stepper is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
  Stepper,
  StepperContent,
  StepperIndicator,
  StepperItem,
  StepperNav,
  StepperPanel,
  StepperSeparator,
  StepperTrigger,
} from '@/components/ui/stepper';

const steps = [1, 2, 3, 4];

export default function Component() {
  return (
    <div className="flex flex-col gap-5 p-10 w-full mx-auto max-w-[600px] h-screen justify-center items-center">
        <Stepper defaultValue={2} className="space-y-8">
        <StepperNav>
            {steps.map((step) => (
            <StepperItem key={step} step={step}>
                <StepperTrigger>
                <StepperIndicator className="data-[state=completed]:bg-green-500 data-[state=completed]:text-white data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=inactive]:text-gray-500">
                    {step}
                </StepperIndicator>
                </StepperTrigger>
                {steps.length > step && <StepperSeparator className="group-data-[state=completed]/step:bg-green-500" />}
            </StepperItem>
            ))}
        </StepperNav>

        <StepperPanel className="text-sm">
            {steps.map((step) => (
            <StepperContent className="w-full flex items-center justify-center" key={step} value={step}>
                Step {step} content
            </StepperContent>
            ))}
        </StepperPanel>
        </Stepper>
    </div>
  );
}

More by Sean Hello

View all
  • 3D Testimonails

    3D Testimonails

    3.3K
  • Line Charts 9

    Line Charts 9

    637
  • Alert

    Alert

    492
  • Area Charts 1

    Area Charts 1

    385
  • Line Charts 6

    Line Charts 6

    384
  • Scroll Area

    Scroll Area

    376
  • Area Charts 2

    Area Charts 2

    317
  • Navigation Menu

    Navigation Menu

    305