2.1.0 • Published 4 years ago

wired-toggle v2.1.0

Weekly downloads
113
License
MIT
Repository
github
Last release
4 years ago

wired toggle

wired-toggle

Hand-drawn sketchy toggle button / switch.

For demo and view the complete set of wired-elememts: wiredjs.com

Usage

Add wired-toggle to your project:

npm i wired-toggle

Import wired-toggle definition into your HTML page:

<script type="module" src="wired-toggle/lib/wired-toggle.js"></script>

Or into your module script:

import { WiredToggle } from "wired-toggle"

Use it in your web page:

<wired-toggle></wired-toggle>
<wired-toggle checked></wired-toggle>

Properties

checked - Checked state (boolean).

disabled - disables the toggle button. Default value is false.

Custom CSS Variables

--wired-toggle-off-color Color of the knob when in off (false) position. Default value is gray.

--wired-toggle-on-color Color of the knob when in on (true) position. Default value is rgb(63, 81, 181).

Events

change event fired when state of the toggle is changed by the user.

License

MIT License (c) Preet Shihn

2.1.0

4 years ago

2.0.2

4 years ago

2.0.0

5 years ago

2.0.0-alpha.1

5 years ago

2.0.0-alpha.0

5 years ago

1.0.0

5 years ago

1.0.0-alpha.0

5 years ago

0.9.2

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.9.0-1

5 years ago

0.9.0-0

5 years ago

0.8.0

6 years ago

0.8.0-0

6 years ago

0.7.0

6 years ago

0.6.5

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago