Switch
<switch>
is a UI component that lets users toggle between two states.
The default state is false
or OFF.
See also:
import * as React from "react";
<switch checked={true} />
Props
Name | Type | Description |
---|---|---|
checked | boolean | Gets or sets the value of the switch selection. Default value: false . |
onToggle | (args: EventData ) => void | Emitted when the value of the switch changes. |
Native component
Android | iOS |
---|---|
android.widget.Switch | UISwitch |