Switch

Universal two-state toggle component.

Edit on GitHubProps #

disabled bool #

If true the user won't be able to toggle the switch. Default value is false.

onValueChange function #

Invoked with the new value when the value changes.

testID string #

Used to locate this view in end-to-end tests.

value bool #

The value of the switch. If true the switch will be turned on. Default value is false.

iosonTintColor ColorPropType #

Background color when the switch is turned on.

iosthumbTintColor ColorPropType #

Color of the foreground switch grip.

iostintColor ColorPropType #

Background color when the switch is turned off.