Switch
A control that allows the user to toggle between checked and not checked.
Example
Props
Name | Type | Description |
---|---|---|
defaultChecked | ?(boolean | 'indeterminate') | The checked state of the checkbox when it is initially rendered |
checked | ?(boolean | 'indeterminate') | Checked state of the checkbox |
onCheckedChange | ?((value: boolean | 'indeterminate') => void) | Fired when the checked state of the checkbox changes |
disabled | ?boolean | Whether to disable the checkbox |