Switch
Switch is a control that is used to quickly switch between two possible states. Switches are only used for these binary actions that occur immediately after the user “flips” the switch. They are commonly used for “on/off” switches.
Default
Sizes
Dark & Light mode
Disabled
Buttons
Right to left
Props
Name | Type | Required | Default | Description |
---|---|---|---|---|
id | string | No | - | Unique element's identifier |
checked | boolean | No | false | Is switch checked/unchecked |
onChange | React.ChangeEvent | No | - | Event that happens when you click on the switch |
captionUnchecked | string | No | - | Displayed text when unchecked |
captionChecked | string | No | - | Displayed text when checked |
isRtl | boolean | No | false | - |