PHPackages                             okipa/laravel-toggle-switch-button - 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. okipa/laravel-toggle-switch-button

Abandoned → [https://github.com/Okipa/laravel-bootstrap-components](/?search=https%3A%2F%2Fgithub.com%2FOkipa%2Flaravel-bootstrap-components)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

okipa/laravel-toggle-switch-button
==================================

A customizable toggle switch button generator for Laravel.

2.0.5(8y ago)21.6k1MITPHPPHP &gt;=7.0

Since Jun 16Pushed 7y ago2 watchersCompare

[ Source](https://github.com/Okipa/laravel-toggle-switch-button)[ Packagist](https://packagist.org/packages/okipa/laravel-toggle-switch-button)[ Docs](https://github.com/Okipa/laravel-toggle-switch-button)[ RSS](/packages/okipa-laravel-toggle-switch-button/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (3)Versions (13)Used By (0)

laravel-toggle-switch-button
============================

[](#laravel-toggle-switch-button)

Package abandonned in profit of  package.
------------------------------------------------------------------------------------------------

[](#package-abandonned-in-profit-of-httpsgithubcomokipalaravel-bootstrap-components-package)

[![Source Code](https://camo.githubusercontent.com/66f33d7fd980843b99ef222b867f121adceb264ea89e2db97c50d92da80c443e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f736f757263652d6f6b6970612f6c61726176656c2d2d746f67676c652d2d7377697463682d2d627574746f6e2d626c75652e737667)](https://github.com/Okipa/laravel-toggle-switch-button)[![Latest Version](https://camo.githubusercontent.com/1ef61778ff87cf56a3cfa93de92a95a3ae602182cf441c419368a601e6821f72/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6f6b6970612f6c61726176656c2d746f67676c652d7377697463682d627574746f6e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/Okipa/laravel-toggle-switch-button/releases)[![Total Downloads](https://camo.githubusercontent.com/d520488afb8b049fd802743703cce14119a019533e856b95cb6e26037b7ebe81/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6b6970612f6c61726176656c2d746f67676c652d7377697463682d627574746f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/okipa/laravel-toggle-switch-button)[![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)[![Code Coverage](https://camo.githubusercontent.com/d16c78b9eda88d131cbedd7cf83aa59223b9b39647aa15b53f1bdd990ab1ffbe/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f6b6970612f6c61726176656c2d746f67676c652d7377697463682d627574746f6e2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Okipa/laravel-toggle-switch-button/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fe246cc2bb3a3712175d539b088238aca0bb292530c4bc9eca94e4dda9126b3f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4f6b6970612f6c61726176656c2d746f67676c652d7377697463682d627574746f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/Okipa/laravel-toggle-switch-button/?branch=master)

A customizable and configurable toggle switch button generator for Laravel that enables you to simply display it on your projects pages.

[![Laravel Toggle Switch Button](https://raw.githubusercontent.com/Okipa/laravel-toggle-switch-button/master/img/laravel-toggle-switch-button.png)](https://raw.githubusercontent.com/Okipa/laravel-toggle-switch-button/master/img/laravel-toggle-switch-button.png)

---

Installation
------------

[](#installation)

### Versions

[](#versions)

- [V1](https://github.com/Okipa/laravel-toggle-switch-button/tree/v1) : `composer require okipa/laravel-toggle-switch-button:^1.0.0`
- [V2](https://github.com/Okipa/laravel-toggle-switch-button/tree/v2) : `composer require okipa/laravel-toggle-switch-button:^2.0.0`

### For Laravel &gt;=5.4 only

[](#for-laravel-54-only)

Add the package service provider in the `register()` method from your `app/Providers/AppServiceProvider.php` :

```
// laravel toggle switch button
// https://github.com/Okipa/laravel-toggle-switch-button
$this->app->register(Okipa\LaravelToggleSwitchButton\ToggleSwitchButtonServiceProvider::class);
```

### Styles import

[](#styles-import)

- Load the package `SASS` or `CSS` file from the `[path/to/composer/vendor]/okipa/laravel-toggle-switch-button/styles` directory to your project.

---

Usage
-----

[](#usage)

Since the toggle switch button implements the `Htmlable` interface, just call it this way in your blade file :

```
{{ toggleSwitchButton()
    ->name('active')
    ->checked(old('active') or $model->active)
    ->icon('')
    ->label('Activation') }}
```

---

API
---

[](#api)

Public methods See the available public methods in the [ToggleSwitchButton class](https://github.com/Okipa/laravel-toggle-switch-button/blob/master/src/ToggleSwitchButton.php)

---

Customize styles
----------------

[](#customize-styles)

If you use `CSS`, just override the package styles.

If you use `SASS`, you can override the following variables **before** the package SASS file import. Check the following example for a bootstrap use :

```
// bootstrap 4 example
$toggle-switch-button-label-background-color: $input-group-addon-bg;
$toggle-switch-button-label-border-color: $input-group-addon-border-color;
$toggle-switch-button-label-font-size: $font-size-base;
$toggle-switch-button-unchecked-background-color: $input-group-addon-border-color;
$toggle-switch-button-checked-background-color: $primary;
$toggle-switch-button-label-border-radius: $btn-border-radius;
@import '[path/to/composer/vendor]/okipa/laravel-toggle-switch-button/styles/styles';
```

---

Customize templates
-------------------

[](#customize-templates)

Publish the package blade templates file in your project :

```
php artisan vendor:publish --tag=toggle-switch-button::views
```

Then, change the content from your `resources/views/vendor/components/switch-button.blade.php` file.

---

Contributors
------------

[](#contributors)

- [ACID-Solutions](https://github.com/ACID-Solutions)

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~33 days

Recently: every ~0 days

Total

12

Last Release

2941d ago

Major Versions

v1.x-dev → 2.0.02018-06-03

### Community

Maintainers

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

---

Top Contributors

[![Okipa](https://avatars.githubusercontent.com/u/5328934?v=4)](https://github.com/Okipa "Okipa (60 commits)")

---

Tags

buttongenerategenerationgeneratorhtmllaravelokipapackagephpswitchtogglephplaravelpackagegeneratorhtmlgenerationbuttontoggleswitchgenerateokipa

### Embed Badge

![Health badge](/badges/okipa-laravel-toggle-switch-button/health.svg)

```
[![Health](https://phpackages.com/badges/okipa-laravel-toggle-switch-button/health.svg)](https://phpackages.com/packages/okipa-laravel-toggle-switch-button)
```

###  Alternatives

[okipa/laravel-table

Generate tables from Eloquent models.

57153.1k](/packages/okipa-laravel-table)[okipa/laravel-form-components

Ready-to-use and customizable form components.

198.0k1](/packages/okipa-laravel-form-components)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[tehwave/laravel-achievements

Simple, elegant Achievements the Laravel way

7212.9k](/packages/tehwave-laravel-achievements)

PHPackages © 2026

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