PHPackages                             thatsus/bootstrap-switch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thatsus/bootstrap-switch

ActiveComponent[Utility &amp; Helpers](/categories/utility)

thatsus/bootstrap-switch
========================

Turn checkboxes and radio buttons into toggle switches.

3.3.2(11y ago)0702Apache License Version 2.0HTML

Since Jul 31Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thatsus/bootstrap-switch)[ Packagist](https://packagist.org/packages/thatsus/bootstrap-switch)[ Docs](http://www.bootstrap-switch.org)[ RSS](/packages/thatsus-bootstrap-switch/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)DependenciesVersions (17)Used By (0)

Bootstrap Switch
================

[](#bootstrap-switch)

[![Dependency Status](https://camo.githubusercontent.com/d532af0d707bce5db0e6bc52e25d4f330586042557485169ca6d6017e3cca0ab/68747470733a2f2f64617669642d646d2e6f72672f6e6f7374616c6769617a2f626f6f7473747261702d7377697463682e7376673f7374796c653d666c6174)](https://david-dm.org/nostalgiaz/bootstrap-switch)[![devDependency Status](https://camo.githubusercontent.com/0b99adc281b9fd147c548749b1ea7b7ddd1eaaf508acf8708ee1f04275e43e17/68747470733a2f2f64617669642d646d2e6f72672f6e6f7374616c6769617a2f626f6f7473747261702d7377697463682f6465762d7374617475732e7376673f7374796c653d666c6174)](https://david-dm.org/nostalgiaz/bootstrap-switch#info=devDependencies)[![NPM Version](https://camo.githubusercontent.com/aae249effdb3718d7bfd7f67c7c9301d432ef4d1162823d803463988074dc4cb/687474703a2f2f696d672e736869656c64732e696f2f6e706d2f762f626f6f7473747261702d7377697463682e7376673f7374796c653d666c6174)](https://www.npmjs.org/)

Turn checkboxes and radio buttons into toggle switches. This library is created by [Mattia Larentis](http://github.com/nostalgiaz) and maintained by the core team, with the help of the community.

To get started, check out !

#### Core team

[](#core-team)

- [Mattia Larentis](http://github.com/nostalgiaz)
- [Emanuele Marchi](http://github.com/lostcrew)
- **you?** drop me a line.

Demo and Documentation
----------------------

[](#demo-and-documentation)

- [Examples](http://www.bootstrap-switch.org/examples.html)
- [Options](http://www.bootstrap-switch.org/options.html)
- [Methods](http://www.bootstrap-switch.org/methods.html)
- [Events](http://www.bootstrap-switch.org/events.html)

Getting started
---------------

[](#getting-started)

Include the dependencies: jQuery, Bootstrap and Bootstrap Switch CSS + Javascript:

```
[...]

[...]
```

Add your checkbox:

```

```

Initialize Bootstrap Switch on it:

```
$("[name='my-checkbox']").bootstrapSwitch();
```

Enjoy.

Supported browsers
------------------

[](#supported-browsers)

IE9+ and all the other modern browsers.

LESS + SASS
-----------

[](#less--sass)

Import `src/less/bootstrap2/bootstrap-switch.less` for version &lt;= 2.3.2 or `src/less/bootstrap3/bootstrap-switch.less` for version &lt;= 3.3.4 in your compilation stack.

Bugs and feature requests
-------------------------

[](#bugs-and-feature-requests)

Have a bug or a feature request? Please first search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/nostalgiaz/bootstrap-switch/issues/new).

The new issue should contain both a summary of the issue and the browser/OS environment in which it occurs and a link to the playground you prefer with the reduced test case. If suitable, include the steps required to reproduce the bug.

Please do not use the issue tracker for personal support requests: [Stack Overflow](http://stackoverflow.com/questions/tagged/bootstrap-switch) is a better place to get help.

#### Known issues

[](#known-issues)

- Make sure `.form-control` is not applied to the input. Bootstrap does not support that, refer to [Checkboxes and radios](http://getbootstrap.com/css/#checkboxes-and-radios)

Integrations
------------

[](#integrations)

### AngularJs

[](#angularjs)

Two custom directives are available:

- [angular-bootstrap-switch](https://github.com/frapontillo/angular-bootstrap-switch)
- [angular-toggle-switch](https://github.com/JumpLink/angular-toggle-switch)

### KnockoutJs

[](#knockoutjs)

A Knockout binding handler is available [here](https://github.com/pauloortins/knockout-bootstrap-switch)

### NuGet

[](#nuget)

A NuGet package is available [here](https://github.com/blachniet/bootstrap-switch-nuget)

License
-------

[](#license)

Licensed under the MIT License [Bttstrp#347](https://github.com/Bttstrp/bootstrap-switch/issues/347)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 59.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~41 days

Recently: every ~19 days

Total

14

Last Release

4127d ago

Major Versions

1.9.0 → 2.0.12014-01-19

2.0.1 → 3.0.02014-04-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/dc432bad0d4010ecab94ca498f4613e6bd7273668995565c15fd8a1cbcabf205?d=identicon)[rlambertsen](/maintainers/rlambertsen)

---

Top Contributors

[![nostalgiaz](https://avatars.githubusercontent.com/u/1184352?v=4)](https://github.com/nostalgiaz "nostalgiaz (101 commits)")[![frapontillo](https://avatars.githubusercontent.com/u/1140238?v=4)](https://github.com/frapontillo "frapontillo (16 commits)")[![volpino](https://avatars.githubusercontent.com/u/165090?v=4)](https://github.com/volpino "volpino (8 commits)")[![t3chn0r](https://avatars.githubusercontent.com/u/2670603?v=4)](https://github.com/t3chn0r "t3chn0r (5 commits)")[![michaek](https://avatars.githubusercontent.com/u/155459?v=4)](https://github.com/michaek "michaek (4 commits)")[![Aimeast](https://avatars.githubusercontent.com/u/3733969?v=4)](https://github.com/Aimeast "Aimeast (3 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![ickbinhier](https://avatars.githubusercontent.com/u/2810904?v=4)](https://github.com/ickbinhier "ickbinhier (3 commits)")[![nathasm](https://avatars.githubusercontent.com/u/410832?v=4)](https://github.com/nathasm "nathasm (3 commits)")[![pauloortins](https://avatars.githubusercontent.com/u/1145643?v=4)](https://github.com/pauloortins "pauloortins (3 commits)")[![root-talis](https://avatars.githubusercontent.com/u/5227711?v=4)](https://github.com/root-talis "root-talis (3 commits)")[![Pasvaz](https://avatars.githubusercontent.com/u/3006580?v=4)](https://github.com/Pasvaz "Pasvaz (2 commits)")[![oniram88](https://avatars.githubusercontent.com/u/173604?v=4)](https://github.com/oniram88 "oniram88 (2 commits)")[![marclaporte](https://avatars.githubusercontent.com/u/1004261?v=4)](https://github.com/marclaporte "marclaporte (2 commits)")[![andrewmackrodt](https://avatars.githubusercontent.com/u/831182?v=4)](https://github.com/andrewmackrodt "andrewmackrodt (1 commits)")[![angelxmoreno](https://avatars.githubusercontent.com/u/363479?v=4)](https://github.com/angelxmoreno "angelxmoreno (1 commits)")[![nwhite89](https://avatars.githubusercontent.com/u/1407863?v=4)](https://github.com/nwhite89 "nwhite89 (1 commits)")[![OwlyCode](https://avatars.githubusercontent.com/u/1631270?v=4)](https://github.com/OwlyCode "OwlyCode (1 commits)")[![alexmcpherson](https://avatars.githubusercontent.com/u/329102?v=4)](https://github.com/alexmcpherson "alexmcpherson (1 commits)")[![engoyan](https://avatars.githubusercontent.com/u/530974?v=4)](https://github.com/engoyan "engoyan (1 commits)")

---

Tags

javascriptJSbootstrapswitch

### Embed Badge

![Health badge](/badges/thatsus-bootstrap-switch/health.svg)

```
[![Health](https://phpackages.com/badges/thatsus-bootstrap-switch/health.svg)](https://phpackages.com/packages/thatsus-bootstrap-switch)
```

###  Alternatives

[nostalgiaz/bootstrap-switch

Turn checkboxes and radio buttons into toggle switches.

5.0k362.3k4](/packages/nostalgiaz-bootstrap-switch)[matthiasmullie/minify

CSS &amp; JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.

2.0k30.5M336](/packages/matthiasmullie-minify)[snapappointments/bootstrap-select

The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more. Now with Bootstrap 4 support.

9.8k480.4k3](/packages/snapappointments-bootstrap-select)[onokumus/metismenu

A jQuery menu plugin

2.0k263.3k5](/packages/onokumus-metismenu)[stolz/assets

An ultra-simple-to-use assets management library

296519.2k8](/packages/stolz-assets)[tholu/php-packer

A PHP version of Packer, JavaScript obfuscation library originally created by Dean Edwards

137441.2k5](/packages/tholu-php-packer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
