react-switchery-component
React switch component. Clone of Switchery rewritten for React.
Install
npm install react-switchery-component
Usage
;;; Component { superprops; thisstate = isChecked: false; } { this; } { return <div> <p> <label htmlFor="basic-example">Basic example:</label> <Switch id="basic-example" checked=thisstateisChecked onChange= this /> </p> <p> <label htmlFor="color-example">Different color:</label> <Switch id="color-example" color="#4c3fa2" checked=thisstateisChecked onChange= this /> </p> <p> <label htmlFor="size-example">Different size:</label> <Switch id="size-example" size="small" checked=thisstateisChecked onChange= this /> </p> <p> <label htmlFor="speed-example">Different speed:</label> <Switch id="speed-example" speed="2s" checked=thisstateisChecked onChange= this /> </p> <p> <label htmlFor="disabled-example">Disabled:</label> <Switch id="disabled-example" disabled=true checked=thisstateisChecked onChange= this /> </p> </div> ; }