Skip to content

czkoudy/toggle-switch

Repository files navigation

@czkoudy/toggle-switch

Toggle Switch Component for React

Using CSS file made by Bootstrap Toggle: bootstrap4-toggle.css v3.6.1

https://gitbrent.github.io/bootstrap4-toggle/

Stargazers Issues

NPM JavaScript Style Guide

Downloads

Buy Me A Coffee

⚙️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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published