input-toggle-js

1.0.0 • Public • Published

toggle.js

A simple JavaScript input toggle control.

NPM

You can install directly via NPM to your project folder.

npm install toggle-js

CDN

The CDN is updated after the release is made public. Always, check the GitHub page for the latest release.

Usage

Add a toggle control to your web pages easily by simply including an input element with type attribute as toggle like so:

<input type="toggle">

States (On & Off)

The default state for the toggle is Off (0). You can also set a default state by adding a value to the value attribute like so.

<input type="toggle" value="1">

If you set a non-zero value, the state defaults to an On state:

Package Sidebar

Install

npm i input-toggle-js

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

5.33 kB

Total Files

5

Last publish

Collaborators

  • chigozieorunta