@czkoudy/toggle-switch
Toggle Switch Component for React
Using CSS file made by Bootstrap Toggle: bootstrap4-toggle.css v3.6.1
⚙️Install
npm install --save @czkoudy/toggle-switch
📓Usage
import ToggleSwitch from '@czkoudy/toggle-switch';
return <ToggleSwitch />;
⚓ ToggleSwitch props
| Name | Type | Required | Default | Options |
| -------- | ------- | -------- | --------- | ------------------- |
| size | string | No | "sm" | "xs" , "sm", "lg" |
| onStyle | string | No | "success" | Any Boostrap colors |
| offStyle | string | No | "danger" | Any Boostrap colors |
| onLabel | string | No | "On" | Any String |
| offLabel | string | No | "Off" | Any String |
| checked | boolean | No | false | true, false |
| width | string | No | "150px" | Any px string |
| disabled | boolean | No | false | true, false |
👮♀️ License
MIT