@czkoudy/toggle-switch
TypeScript icon, indicating that this package has built-in type declarations

1.4.0 • Public • Published

@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

Readme

Keywords

Package Sidebar

Install

npm i @czkoudy/toggle-switch

Weekly Downloads

4

Version

1.4.0

License

MIT

Unpacked Size

551 kB

Total Files

8

Last publish

Collaborators

  • czkoudy