React Stepper Component API
Stepper API
Explore the API reference for the React Stepper component and discover how to effectively utilize its props for customization.
CStepper#
import { CStepper } from '@coreui/react'// orimport CStepper from '@coreui/react/src/components/stepper/CStepper'| Property | Default | Type |
|---|---|---|
| activeStepIndex#Deprecated 5.16.0 | - | number |
Controls the currently active step in the React Stepper component (Controlled mode). | ||
| activeStepNumber#5.16.0+ | - | number |
Controls the currently active step number in the React Stepper component (Controlled mode). | ||
| className# | - | string |
Custom CSS class name applied to the main React Stepper container. | ||
| defaultActiveStepIndex#Deprecated 5.16.0 | 0 | number |
Sets the initial active step index for the Form Wizard when the React Stepper is used in Uncontrolled mode. | ||
| defaultActiveStepNumber#5.16.0+ | - | number |
Sets the initial active step number for the Form Wizard when the React Stepper is used in Uncontrolled mode. | ||
| layout# | horizontal | 'horizontal', 'vertical' |
Defines the overall layout orientation of the React Stepper component.
| ||
| linear# | true | boolean |
Defines whether the Stepper enforces linear progression (cannot skip steps).
| ||
| onFinish# | - | () => void |
Callback fired when the user completes the last step of the Form Wizard. | ||
| onReset# | - | () => void |
Callback fired when the user triggers the reset action on the React Stepper. | ||
| onStepChange# | - | (stepNumber: number) => void |
Callback fired when the active step changes in the React Stepper component. | ||
| onStepValidationComplete# | - | ({ stepNumber, isValid }: StepperStepValidationResult) => void |
Callback fired after a validation check completes for a specific step in the Form Wizard. | ||
| stepButtonLayout# | horizontal | 'horizontal', 'vertical' |
Controls the internal layout of the step indicator (icon and label) inside each step when using a horizontal layout.
| ||
| steps# | [] | string[], StepperStepData[] |
Defines the steps for the React Stepper component.
| ||
| validation# | true | boolean |
Enables or disables built-in form validation inside the React Stepper. | ||