Hand-drawn sketchy toggle button / switch.
For demo and view the complete set of wired-elememts: wiredjs.com
Add wired-toggle to your project:
npm i wired-toggle
Import wired-toggle definition into your HTML page:
Or into your module script:
Use it in your web page:
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).
change event fired when state of the toggle is changed by the user.