@withaspark/toggle

1.0.3 • Public • Published

Toggle

Install

NPM

npm install --save @withaspark/toggle

JS

require('@withaspark/toggle');

SASS

@import "@withaspark/toggle";

Usage

<select name="token_login" class="form-control toggle">
    <option value="0">Off</option>
    <option value="1" selected="selected">On</option>
</select>

<script>
$('select.toggle').toggleable();
</script>

Options

Toggle width

Set the .toggle-block class on any container of the element to make the toggle full width.

Set the .toggle-inline class on any container of the element to make the toggle display inline-block vs. the default (block).

Miscellaneous

To modify colors, sizes, animations, etc., override the relevant CSS.

License

Licensed under the MIT LICENSE.

Package Sidebar

Install

npm i @withaspark/toggle

Weekly Downloads

5

Version

1.0.3

License

MIT

Unpacked Size

7.73 kB

Total Files

6

Last publish

Collaborators

  • withaspark