Checkbox Based Toggle Buttons with Pure JavaScript

Category: Form , Javascript | February 18, 2016
Author: ashepherd89
Views Total: 4,365 views
Official Page: Go to website
Last Update: February 18, 2016
License: GNU GPLv3


Checkbox Based Toggle Buttons with Pure JavaScript


ToggleableButton.js is a small JavaScript library that converts a regular checkbox input into a toggleable switch control.

How to use it:

Download and include the toggleableButton.js and toggleablebutton.css on your Html page.

<link rel="stylesheet" href="dist/css/toggleablebutton.css">
<script src="dist/js/toggleablebutton.js"></script>

Include the toggleable-button class in the class attribute of a form checkbox to create a normal-sized button.

<input class="toggleable-button" name="" type="checkbox">



  • Refactor

You Might Be Interested In:

Leave a Reply