react-input-switch

2.2.1
React toggle switch component
View on github

Installation

npm install react-input-switch --save
yarn add react-input-switch

Default

Off

Custom styles

Also <Switch className="switch" /> will render:

<label className="switch">
<span className="switch-track" />
<span className="switch-button" />
</label>

Controlled example

0

Custom on/off value

The default on/off value is 1/0 and default value is 1. This component will also render a hidden input with current value and the name prop.

yes

License

MIT

Made with by SWIFT CARROT