PHPackages                             trin4ik/nova-switcher - 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. trin4ik/nova-switcher

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

trin4ik/nova-switcher
=====================

A Laravel Nova switcher field.

v0.4(2y ago)1265.8k↓53.4%10[4 issues](https://github.com/trin4ik/nova-switcher/issues)MITVuePHP ^8.0

Since Jan 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/trin4ik/nova-switcher)[ Packagist](https://packagist.org/packages/trin4ik/nova-switcher)[ RSS](/packages/trin4ik-nova-switcher/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (1)Versions (7)Used By (0)

!!! Guys, I archived this project because I'm not using it anymore. If you want it, I can transfer my rights to you !!!

Laravel Nova Switcher Field
===========================

[](#laravel-nova-switcher-field)

Replace default Boolean with switcher.
Work on Index/Detail view with xhr, on Form like checkbox.

[![](https://user-images.githubusercontent.com/839633/209843810-d656e6db-025f-4221-9c6c-9b238227706f.gif)](https://user-images.githubusercontent.com/839633/209843810-d656e6db-025f-4221-9c6c-9b238227706f.gif)

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

[](#installation)

```
composer require trin4ik/nova-switcher
```

Usage
-----

[](#usage)

```
use Trin4ik\NovaSwitcher\NovaSwitcher;
...
NovaSwitcher::make('Active');
```

### Labels

[](#labels)

```
use Trin4ik\NovaSwitcher\NovaSwitcher;
...
NovaSwitcher::make('Active')
    ->trueLabel('On')
    ->falseLabel('Off');
...
NovaSwitcher::make('Active')
    ->withLabels(true: 'On', false: 'Off');
```

### Confirmation

[](#confirmation)

```
use Trin4ik\NovaSwitcher\NovaSwitcher;
...
NovaSwitcher::make('Active')
    ->confirmToTrue('enable?')
    ->confirmToFalse('disable?');
...
NovaSwitcher::make('Active')
    ->confirm(toTrue: 'enable?', toFalse: 'disable?');
```

of couse, you can only use confirmation dialogue to enable, or disable:

```
use Trin4ik\NovaSwitcher\NovaSwitcher;
...
NovaSwitcher::make('Active')
    ->confirmToFalse('Turn it off?');
```

### Reverse

[](#reverse)

Also, you can use reverse value (if switcher checked, value is false and vice versa)

```
NovaSwitcher::make('Active')
    ->reverse();
```

Thanks to...
------------

[](#thanks-to)

- [David Piesse](https://github.com/davidpiesse), based on
- [Thomas Lombart](https://dev.to/thomaslombart/how-to-build-a-reusable-and-accessible-toggle-switch-with-vue-3hh7) for the switcher css

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

4

Last Release

976d ago

PHP version history (2 changes)v0.2PHP ^7.3|^8.0

v0.3PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/839633?v=4)[trin4ik](/maintainers/trin4ik)[@trin4ik](https://github.com/trin4ik)

---

Top Contributors

[![trin4ik](https://avatars.githubusercontent.com/u/839633?v=4)](https://github.com/trin4ik "trin4ik (10 commits)")

---

Tags

laravellaravel-novanovaphplaravelnova

### Embed Badge

![Health badge](/badges/trin4ik-nova-switcher/health.svg)

```
[![Health](https://phpackages.com/badges/trin4ik-nova-switcher/health.svg)](https://phpackages.com/packages/trin4ik-nova-switcher)
```

###  Alternatives

[ebess/advanced-nova-media-library

Laravel Nova tools for managing the Spatie media library.

6163.5M22](/packages/ebess-advanced-nova-media-library)[optimistdigital/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2852.1M6](/packages/optimistdigital-nova-sortable)[outl1ne/nova-sortable

This Laravel Nova package allows you to reorder models in a Nova resource's index view using drag &amp; drop.

2862.1M9](/packages/outl1ne-nova-sortable)[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[advoor/nova-editor-js

A Laravel Nova field bringing EditorJs magic to Nova.

92219.3k3](/packages/advoor-nova-editor-js)[outl1ne/nova-page-manager

Page(s) and region(s) manager for Laravel Nova.

17947.0k](/packages/outl1ne-nova-page-manager)

PHPackages © 2026

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