Component reference
Stepper
A controlled onboarding sequence with back and next actions.
Preview
Live previewOptional six-digit hex. Clear to restore the preset. Check contrast with your brand color.
Changes apply to this preview only.
Width adapts to the available space
"use client";
import { useState } from "react";
import { Badge, Button, Stepper, StepperItem } from "@pimolu/react";
function ControlledStepper() {
const [step, setStep] = useState(2);
return (
<div className="grid gap-5 min-w-0">
<div className="flex flex-wrap items-center gap-3 min-w-0">
<Badge variant="primary">step {step}</Badge>
<Button
size="sm"
appearance="outline"
disabled={step <= 1}
onClick={() => setStep((current) => current - 1)}
>
Back
</Button>
<Button
size="sm"
disabled={step >= 4}
onClick={() => setStep((current) => current + 1)}
>
Next
</Button>
</div>
<Stepper
aria-label="Onboarding"
activeStep={step}
onStepChange={setStep}
clickable
>
<StepperItem step={1} title="Account" description="Create an account" />
<StepperItem step={2} title="Workspace" description="Name your workspace" />
<StepperItem step={3} title="Team" description="Invite teammates" />
<StepperItem step={4} title="Billing" description="Choose a plan" />
</Stepper>
</div>
);
}
export function DemoExample() {
return (<ControlledStepper />);
}More examples
Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.
Read-only
A read-only composition using Stepper.
Vertical
A vertical composition using Stepper.
Disabled
A disabled step is skipped by the clickable navigation.
Usage
Keep completion validation in the application; a step change is not proof a form is valid.
API reference
Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.
PimoluStepperProps
Type source| Name | Type | Default | Description |
|---|---|---|---|
childrenRequired | ReactNode | — | Public Pimolu prop; see the source declaration for details. |
activeStep | number | undefined | — | Controlled active step, starting at 1. |
defaultActiveStep | number | undefined | 1 | Initial step when uncontrolled. Defaults to 1. |
onStepChange | ((step: number) => void) | undefined | — | Public Pimolu prop; see the source declaration for details. |
orientation | "horizontal" | "vertical" | undefined | "horizontal" | Layout of the steps. Defaults to "horizontal". |
clickable | boolean | undefined | false | Let the user jump to a step. Defaults to false. |
aria-label | string | undefined | — | Accessible name of the ordered list. |
className | string | undefined | — | Public Pimolu prop; see the source declaration for details. |
childrenRequiredReactNodeNo default extracted.
Public Pimolu prop; see the source declaration for details.
activeStepnumber | undefinedNo default extracted.
Controlled active step, starting at 1.
defaultActiveStepnumber | undefinedDefault: 1
Initial step when uncontrolled. Defaults to 1.
onStepChange((step: number) => void) | undefinedNo default extracted.
Public Pimolu prop; see the source declaration for details.
orientation"horizontal" | "vertical" | undefinedDefault: "horizontal"
Layout of the steps. Defaults to "horizontal".
clickableboolean | undefinedDefault: false
Let the user jump to a step. Defaults to false.
aria-labelstring | undefinedNo default extracted.
Accessible name of the ordered list.
classNamestring | undefinedNo default extracted.
Public Pimolu prop; see the source declaration for details.
PimoluStepperItemProps
Type source| Name | Type | Default | Description |
|---|---|---|---|
stepRequired | number | — | Step number, starting at 1. |
titleRequired | ReactNode | — | Public Pimolu prop; see the source declaration for details. |
description | ReactNode | — | Public Pimolu prop; see the source declaration for details. |
disabled | boolean | undefined | false | Public Pimolu prop; see the source declaration for details. |
children | ReactNode | — | Public Pimolu prop; see the source declaration for details. |
className | string | undefined | — | Public Pimolu prop; see the source declaration for details. |
stepRequirednumberNo default extracted.
Step number, starting at 1.
titleRequiredReactNodeNo default extracted.
Public Pimolu prop; see the source declaration for details.
descriptionReactNodeNo default extracted.
Public Pimolu prop; see the source declaration for details.
disabledboolean | undefinedDefault: false
Public Pimolu prop; see the source declaration for details.
childrenReactNodeNo default extracted.
Public Pimolu prop; see the source declaration for details.
classNamestring | undefinedNo default extracted.
Public Pimolu prop; see the source declaration for details.
Accessibility
- Name the sequence and identify the active step in text as well as appearance.