API reference: @salmonui/navigation/stepper
StepperPropsinterface
import type { StepperProps } from '@salmonui/navigation/stepper';interface StepperProps extends Omit<OlHTMLAttributes<HTMLOListElement>, 'defaultValue' | 'onChange' | 'type'> {
children?: ReactNode;
value?: number | undefined;
defaultValue?: number | undefined;
onValueChange?: ((value: number, event: StepperChangeEvent) => void) | undefined;
onBeforeValueChange?: ((event: StepperBeforeChangeEvent) => void) | undefined;
onStepClick?: ((event: StepClickEvent) => void) | undefined;
linear?: boolean | undefined;
readOnly?: boolean | undefined;
orientation?: 'horizontal' | 'vertical' | undefined;
labelPlacement?: 'top' | 'bottom' | 'start' | 'end' | undefined;
renderStep?: ((context: StepRenderContext) => ReactNode) | undefined;
localeText?: Partial<StepperLocaleText> | undefined;
ref?: Ref<HTMLOListElement> | undefined;
}
| Name | Signature | Description |
|---|---|---|
childrenoptional | children?: ReactNode; |
|
valueoptional | value?: number | undefined; | Active step, 0-based. |
defaultValueoptional | defaultValue?: number | undefined; | |
onValueChangeoptional | onValueChange?: ((value: number, event: StepperChangeEvent) => void) | undefined; | |
onBeforeValueChangeoptional | onBeforeValueChange?: ((event: StepperBeforeChangeEvent) => void) | undefined; | Runs before a change; |
onStepClickoptional | onStepClick?: ((event: StepClickEvent) => void) | undefined; | A selectable step was clicked or activated with Enter / Space. |
linearoptional | linear?: boolean | undefined; | Only earlier steps and the next one are selectable. |
readOnlyoptional | readOnly?: boolean | undefined; | Steps are an indicator only: no buttons, no selection. |
orientationoptional | orientation?: 'horizontal' | 'vertical' | undefined; | Default |
labelPlacementoptional | labelPlacement?: 'top' | 'bottom' | 'start' | 'end' | undefined; | Label side relative to the indicator; logical. Default |
renderStepoptional | renderStep?: ((context: StepRenderContext) => ReactNode) | undefined; | Replaces the default content of every step. |
localeTextoptional | localeText?: Partial<StepperLocaleText> | undefined; | |
refoptional | ref?: Ref<HTMLOListElement> | undefined; |