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

jsx
import { CFormSwitch } from '@coreui/react-pro'
PropertyDefaultType
className-string, undefined

A string of all className you want applied to the component.

id-string, undefined

The id global attribute defines an identifier (ID) that must be unique in the whole document.

invalid-boolean, undefined

Set component validation state to invalid.

label-ReactNode

The element represents a caption for a component.

reverse-boolean, undefined

Put switch on the opposite side.

size-'lg', 'xl', undefined

Size the component large or extra large. Works only with switch.

typecheckbox'checkbox', 'radio', undefined

Specifies the type of component.

valid-boolean, undefined

Set component validation state to valid.