PHPackages                             nostalgiaz/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. nostalgiaz/bootstrap-switch

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

nostalgiaz/bootstrap-switch
===========================

Turn checkboxes and radio buttons into toggle switches.

3.3.4(9y ago)5.0k362.3k↓15.2%1.4k[190 issues](https://github.com/nostalgiaz/bootstrap-switch/issues)[8 PRs](https://github.com/nostalgiaz/bootstrap-switch/pulls)4Apache License Version 2.0Pug

Since Jul 31Pushed 4y ago176 watchersCompare

[ Source](https://github.com/nostalgiaz/bootstrap-switch)[ Packagist](https://packagist.org/packages/nostalgiaz/bootstrap-switch)[ Docs](https://bttstrp.github.io/bootstrap-switch)[ RSS](/packages/nostalgiaz-bootstrap-switch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)DependenciesVersions (19)Used By (4)

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

[](#bootstrap-switch)

[![Dependency Status](https://camo.githubusercontent.com/949a86d62c0466d615b00942242aa2239faba195c2ce126bccb3fb91e4cf9fc2/68747470733a2f2f64617669642d646d2e6f72672f427474737472702f626f6f7473747261702d7377697463682e7376673f7374796c653d666c6174)](https://david-dm.org/Bttstrp/bootstrap-switch)[![devDependency Status](https://camo.githubusercontent.com/10f0e3aa4d3e414a828484b1fd9462d894af1c03303ecde262dc3a88fe6bfacc/68747470733a2f2f64617669642d646d2e6f72672f427474737472702f626f6f7473747261702d7377697463682f6465762d7374617475732e7376673f7374796c653d666c6174)](https://david-dm.org/Bttstrp/bootstrap-switch#info=devDependencies)[![NPM Version](https://camo.githubusercontent.com/aae249effdb3718d7bfd7f67c7c9301d432ef4d1162823d803463988074dc4cb/687474703a2f2f696d672e736869656c64732e696f2f6e706d2f762f626f6f7473747261702d7377697463682e7376673f7374796c653d666c6174)](https://www.npmjs.org/)

Turn checkboxes and radio buttons into toggle switches. Created by [Mattia Larentis](http://github.com/nostalgiaz), maintained by [Emanuele Marchi](http://github.com/lostcrew) and [Peter Stein](http://www.bdmdesign.org) with the help of the community. Compatible with Bootstrap 4, Bootstrap 3 and Bootstrap 2.

Play with [demo on my fiddle](https://jsfiddle.net/djibe89/vL87w0j8/).

Quick start
-----------

[](#quick-start)

Several quick start options are available:

- Download the [latest release](https://github.com/Bttstrp/bootstrap-switch/releases/latest)
- Clone the repo: `git clone https://github.com/Bttstrp/bootstrap-switch.git`
- Install with npm: `npm install bootstrap-switch`
- Install with yarn: `yarn add bootstrap-switch`
- Install with Composer: `composer require components/bootstrap-switch`
- Install with Bower: `bower install bootstrap-switch`
- Install with NuGet: `PM> Install-Package Bootstrap.Switch` ([NuGet package](https://github.com/blachniet/bootstrap-switch-nuget))

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
----

[](#less)

- For Bootstrap 2 (no longer officially supported), import `src/less/bootstrap2/bootstrap-switch.less`
- For Bootstrap 3, import `src/less/bootstrap3/bootstrap-switch.less`

SASS/SCSS
---------

[](#sassscss)

- For Bootstrap 4, import `src/sass/bootstrap4/bootstrap-switch.scss`

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/Bttstrp/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](https://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](https://getbootstrap.com/css/#checkboxes-and-radios)

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

[](#integrations)

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

License
-------

[](#license)

Licensed under the [MIT License](https://github.com/Bttstrp/bootstrap-switch/blob/master/LICENSE).

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity66

Solid adoption and visibility

Community45

Growing community involvement

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 54.3% 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 ~81 days

Recently: every ~195 days

Total

17

Last Release

3369d ago

Major Versions

1.9.0 → 2.0.12014-01-19

2.0.1 → 3.0.02014-04-01

3.3.3 → v4.x-dev2017-02-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/353880b13d9402f33fb70a23f8ccbde9317814036b9da24968f086471e77128b?d=identicon)[putnik](/maintainers/putnik)

---

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)")[![graingert](https://avatars.githubusercontent.com/u/413772?v=4)](https://github.com/graingert "graingert (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)")[![same31](https://avatars.githubusercontent.com/u/12462178?v=4)](https://github.com/same31 "same31 (3 commits)")[![ceefour](https://avatars.githubusercontent.com/u/24123?v=4)](https://github.com/ceefour "ceefour (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)")[![Julusian](https://avatars.githubusercontent.com/u/1327476?v=4)](https://github.com/Julusian "Julusian (2 commits)")[![Pasvaz](https://avatars.githubusercontent.com/u/3006580?v=4)](https://github.com/Pasvaz "Pasvaz (2 commits)")[![RohanSakhale](https://avatars.githubusercontent.com/u/2164321?v=4)](https://github.com/RohanSakhale "RohanSakhale (2 commits)")[![regepan](https://avatars.githubusercontent.com/u/1817850?v=4)](https://github.com/regepan "regepan (1 commits)")

---

Tags

bootstrapbootstrap-switchcheckboxradioswitchtoggle-switchestogglesjavascriptJSbootstrapswitch

### Embed Badge

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

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

###  Alternatives

[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)[yazvonov/laravel-tojs

Transform PHP Vars to JavaScript for Laravel

102.2k](/packages/yazvonov-laravel-tojs)

PHPackages © 2026

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