React Form Switch Component API
Form Switch API
Explore the API reference for the React Form Switch component and discover how to effectively utilize its props for customization.
On this page
CFormSwitch#
import { CFormSwitch } from '@coreui/react'// orimport CFormSwitch from '@coreui/react/src/components/form/CFormSwitch'
Property | Default | Type |
---|---|---|
className# | - | string |
A string of all className you want applied to the component. | ||
id# | - | string |
The id global attribute defines an identifier (ID) that must be unique in the whole document. | ||
invalid# | - | boolean |
Set component validation state to invalid. | ||
label# | - | ReactNode |
The element represents a caption for a component. | ||
reverse# | - | boolean |
Put switch on the opposite side. | ||
size# | - | 'lg' , 'xl' |
Size the component large or extra large. Works only with | ||
type# | checkbox | 'checkbox' , 'radio' |
Specifies the type of component. | ||
valid# | - | boolean |
Set component validation state to valid. |