PHPackages                             mrshanebarron/toggle - 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. mrshanebarron/toggle

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

mrshanebarron/toggle
====================

Toggle switch component for Laravel - supports Livewire and Vue

v1.0.1(5mo ago)08MITVuePHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/toggle)[ Packagist](https://packagist.org/packages/mrshanebarron/toggle)[ RSS](/packages/mrshanebarron-toggle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Toggle
======

[](#toggle)

A switch/toggle component for Laravel applications. Perfect for boolean settings and on/off states. Works with Livewire and Vue 3.

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

[](#installation)

```
composer require mrshanebarron/toggle
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```

```

### With Label

[](#with-label)

```

```

### Different Sizes

[](#different-sizes)

```

```

### Disabled State

[](#disabled-state)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`wire:model`booleanrequiredBound value`label`string`null`Label text beside toggle`size`string`'md'`Size: `sm`, `md`, `lg``disabled`boolean`false`Disable interactionVue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbToggle } from './vendor/sb-toggle';
app.component('SbToggle', SbToggle);
```

### Basic Usage

[](#basic-usage-1)

```

import { ref } from 'vue';
const enabled = ref(false);

```

### With Label

[](#with-label-1)

```

```

### Sizes

[](#sizes)

```

```

### In a Form

[](#in-a-form)

```

    Save Settings

```

### Vue Props

[](#vue-props)

PropTypeDefaultDescription`modelValue`Boolean`false`Bound value (v-model)`disabled`Boolean`false`Disable toggle`size`String`'md'`Size: `sm`, `md`, `lg``label`String`null`Label text### Events

[](#events)

EventPayloadDescription`update:modelValue``boolean`Emitted when toggledSizes Reference
---------------

[](#sizes-reference)

SizeTrackThumb`sm`32x16px12x12px`md`44x24px20x20px`lg`56x28px24x24pxAccessibility
-------------

[](#accessibility)

- `role="switch"` attribute
- `aria-checked` reflects state
- Focus ring for keyboard navigation
- Keyboard support (Enter/Space)

Styling
-------

[](#styling)

Uses Tailwind CSS:

- Blue background when on
- Gray background when off
- White thumb with shadow
- Smooth transition animation

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x

License
-------

[](#license)

MIT License

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance73

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

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 ~1 days

Total

2

Last Release

153d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

---

Tags

laravellivewiretoggleswitchvue

### Embed Badge

![Health badge](/badges/mrshanebarron-toggle/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-toggle/health.svg)](https://phpackages.com/packages/mrshanebarron-toggle)
```

###  Alternatives

[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[mischasigtermans/laravel-altitude

Claude Code agents for the TALL stack, powered by Laravel Boost

1139.2k](/packages/mischasigtermans-laravel-altitude)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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