Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.29 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.29 KB

@react-x/switch

npm npm npm

Cross-platform Switch component for React and React Native.

Getting Started

Install @react-x/switch using yarn:

yarn add @react-x/switch

Usage

import Switch from '@react-x/switch';

Props

Prop Type Required Description
isOn boolean yes Whether or not the switch is on or off.
onChange function no Callback triggered when the switch is toggled.
onTintColor string no The color the switch should be when turned on.
thumbTintColor string no The color of the tappable part of the switch.
tintColor string no The color the switch should be when turned off.
isDisabled boolean no Whether or not this switch is togglable.

Contributing

If you have any ideas on how this module could be better, create an Issue or submit a PR.