Copy to clipboard
Installation
Copy to clipboard
npx bearnie add stepper
npx bearnie add stepper
bunx bearnie add stepper
bunx bearnie add stepper
pnpm dlx bearnie add stepper
pnpm dlx bearnie add stepper
yarn dlx bearnie add stepper
yarn dlx bearnie add stepper
Copy to clipboard
import Stepper from "@/components/ui/stepper/Stepper.astro";
import StepperItem from "@/components/ui/stepper/StepperItem.astro";
import StepperTrigger from "@/components/ui/stepper/StepperTrigger.astro";
import StepperTitle from "@/components/ui/stepper/StepperTitle.astro";
import StepperDescription from "@/components/ui/stepper/StepperDescription.astro";
import StepperSeparator from "@/components/ui/stepper/StepperSeparator.astro";
Usage
import {
Stepper,
StepperItem,
StepperTrigger,
StepperTitle,
StepperDescription,
StepperSeparator,
} from "@/components/ui/stepper"
<Stepper activeStep={0}>
<StepperItem step={0}>
<StepperTrigger>1</StepperTrigger>
<StepperTitle>Step One</StepperTitle>
</StepperItem>
<StepperSeparator />
<StepperItem step={1}>
<StepperTrigger>2</StepperTrigger>
<StepperTitle>Step Two</StepperTitle>
</StepperItem>
</Stepper>
Examples
Simple stepper
Copy to clipboard
Vertical orientation
Copy to clipboard
Props
Stepper
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | ”horizontal” | “vertical" | "horizontal” | Layout direction |
| activeStep | number | 0 | Current active step (0-indexed) |
| class | string | - | Additional CSS classes |
StepperItem
| Prop | Type | Default | Description |
|---|---|---|---|
| step | number | required | Step index (0-indexed) |
| class | string | - | Additional CSS classes |
StepperTrigger
Renders as a button. Clicking navigates to that step.
StepperTitle, StepperDescription
Style components for step labels.
StepperSeparator
Visual connector between steps. Place between StepperItem components. Automatically adapts to orientation.