SwitchComponentProps as props.
SwitchComponentProps
string
The
id of an external element that labels this switch, if a label exists. Pass this as the aria-labelledby
attribute on your root element to satisfy accessibility requirements when a visible label exists in the DOM.boolean
Whether the switch should be rendered in the on (checked) state.
boolean
When
true, the switch is non-interactive and should be rendered in a visually disabled state.boolean
When
true, the switch is in an error state.(isChecked: boolean) => void
Callback that should be invoked with the new
isChecked value when the user toggles the switch.React.Ref<any>
A React ref that should be forwarded to the underlying DOM element.

