Stepper
Stepper component, horizontal, vertical or segmented, to guide users through multi step processes.
How to use it
Run npx @blossomui/react add stepper, or copy src/components/UI/Stepper/Stepper.tsx into your React project and import it.
import { Stepper, StepperProgress } from './components/ui/Stepper'
Props
Step
| Prop | Type | Description |
|---|
| title (required) | string | |
| description | ReactNode | Short text under the title (vertical orientation only). |
| content | ReactNode | Extra content shown under the step, such as a code block or a form (vertical orientation only). |
StepperProps
| Prop | Type | Description |
|---|
| color | string | Accent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default. |
| steps (required) | Step[] | |
| current (required) | number | Index of the current step, starting at 0. Previous steps are shown as completed. |
| orientation | 'horizontal' | 'vertical' | |
| numbered | boolean | Shows every step numbered and highlighted without tracking progress. Useful for instructions. |
| onStepClick | (index: number) => void | Makes the completed steps clickable so the user can go back. |
StepperProgressProps
| Prop | Type | Description |
|---|
| labels | { step?: (current: number, total: number) => string } | Texts of the component. Pass only the ones you want to change, for example to translate it. |
| color | string | Accent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default. |
| total (required) | number | |
| current (required) | number | |
| label | string | |