Stepper
Basic Usage
Loading...
Installation
pnpm add @corew500/uiUsage
import { Stepper } from "@corew500/ui/stepper"
<Stepper>Content</Stepper>Variants
stepperVariants
| Axis | Values | Default |
|---|---|---|
| size | smdefaultlg | default |
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| initialStep | number | 1 | Initial step number (1-indexed) |
| onStepChange | (step: number) => void | — | Callback when step changes |
| onFinalStepCompleted | () => void | — | Callback when final step is completed |
| disableStepIndicators | enum | false | Disable clicking on step indicators to navigate |
| backButtonText | string | Back | Back button text |
| nextButtonText | string | Continue | Next button text |
| completeButtonText | string | Complete | Complete button text (last step) |
| renderStepIndicator | (props: { step: number; currentStep: number; onStepClick: (step: number) => void; }) => ReactNode | — | Custom step indicator renderer |
| size | enum | — | — |
Accessibility
Keyboard Navigation
- Navigation buttons are keyboard accessible
- Step list uses role="tablist" for semantics
Screen Readers
- - Step indicators use aria-label for screen readers
- Active step uses aria-current="step"
- Icons use aria-hidden="true" as they are decorative
Localization
Translatable Content
- - All button text is customizable via props
- Pass pre-translated strings for i18n support