Switch
Switches toggle the state of a single setting on or off.
code
Expend code
#Label
code
Expend code
#Checked & disable
code
Expend code
# color
code
Expend code
Switch
the properties of a switch component that allow the user to turn a single setting on or off.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | CSS class for additional styling. |
id | string | - | A unique identifier to associate a switch with a label. |
checked | boolean | false | Controls whether the switch is checked. |
defaultChecked | boolean | false | Sets the initial check state of the switch. |
disabled | boolean | false | Sets whether the switch is disabled, preventing user interaction. |