Get unlimited public & private packages + team-based management with npm Teams.Learn more »

react-x-switch

3.0.0 • Public • Published

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.

Install

npm i react-x-switch

DownloadsWeekly Downloads

122

Version

3.0.0

License

MIT

Unpacked Size

6.89 kB

Total Files

6

Last publish

Collaborators

  • avatar