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(6mo ago)08MITVuePHP ^8.1

Since Dec 14Pushed 6mo agoCompare

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

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

32

—

LowBetter than 69% of packages

Maintenance67

Regular maintenance activity

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

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

199d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/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

[livewire/flux

The official UI component library for Livewire.

9527.8M128](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

211189.7k8](/packages/bezhansalleh-filament-google-analytics)[tomshaw/electricgrid

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

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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