react-onoff-switch
v1.0.0
Published
React on-off switch component
Downloads
32
Readme
OnOff switch button
React component, on-off sliding button to keep track of a user choice or state.
Install from npm
npm install react-onoff-switch
Demo
Simple demo example here.
API
Usage
import OnOff from 'react-onoff-switch'
ReactDOM.render(
<OnOff onChange={(value) => console.log('New value is:', value)}/>,
document.getElementById('app')
);