Switch
The Switch component is used to toggle between two states.
Installation
Usage
Variants
Disabled Switch
Examples
Switch with lables
Default Checked Switch
onCheckedChange function
false
Props
| Name | Type | Default | Description |
|---|---|---|---|
| className | string | "" | Additional class names for the switch. |
| disabled | boolean | false | Flag to disable the switch. |
| id | string | "" | Id for the switch. |
| defaultChecked | boolean | false | Flag to set the switch to checked by default. |
| checked | boolean | false | Flag to set the switch to checked. |
| onCheckedChange | (e: boolean) => void | undefined | Callback function that is called when the switch is toggled. |

