Files
react-native/website/versioned_docs/0.18/switch.md
T
2017-10-27 11:51:58 -07:00

2.5 KiB

id, title, original_id
id title original_id
version-0.18-switch switch switch

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.