8.6 Released with 🥽 visionOS support and more!
Check it out
Switch
Represents a switch component.

Summary ​

Constructors

constructor

Properties

android
checked
checkedChangeEvent
ios
offBackgroundColor
152 properties inherited from View
Click to expand

Constructors ​

constructor ​

new Switch(): Switch

Properties ​

android ​

android: any
Gets the native [android widget](http://developer.android.com/reference/android/widget/Switch.html) that represents the user interface for this component. Valid only when running on Android OS.

checked ​

checked: boolean
Gets or sets if a switch is checked or not.

ios ​

ios: any
Gets the native iOS [UISwitch](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UISwitch_Class/) that represents the user interface for this component. Valid only when running on iOS.

offBackgroundColor ​

offBackgroundColor: Color
Gets or sets the background color of the Switch when it is turned off.

checkedChangeEvent ​

Static
checkedChangeEvent: string
Previous
Style