Homecomponentsaction

Switch

A control that toggles between on and off.


Use Switch to view or switch between enabled or disabled states.

Disabled

Use the disabled property to prevent any interaction with the switch.

Example

Settings


API

id
The HTML id of the switch.
string

disabled
Used to disable the switch.
true
false

on
State of the switch.
true
false

onChange
Called when the switch is toggled.
((checked: boolean) => void)

data
An object with the data keys and values.
DataAttributeMap