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

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

amidesfahani/nova-toggle
========================

A Boolean Toggle Switch Field

0147—0%Vue

Since Jun 4Pushed 3y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Toggle Field
============

[](#toggle-field)

A drop in replacement for the default Boolean field

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

[](#installation)

Same as most other Nova Packages

```
composer require amidesfahani/nova-toggle

```

Usage
-----

[](#usage)

The Toggle has all the same options as the Boolean field so you can set the values to be stored in the Model.

```
use Amid\NovaToggle\Toggle;
```

```
Toggle::make('Active')
    ->inlineOnIndex()
    ->inlineOnDetail()
    ->trueText('On')
    ->falseText('Off')
    ->textOnIndex()
```

In addition you can set visual parameters

### Labels

[](#labels)

You can show both, or each state label

```
Toggle::make('Active')
    ->showLabels() //Both labels
    ->showOnlyTrueLabel() //True label only
    ->showOnlyFalseLabel() //False label only
```

### Size

[](#size)

You can set the width and height. Setting the width will auto scale the height, but you can override this with -&gt;height(). Defaults are 60 (px) and 26 (px)

```
Toggle::make('Active')
    ->width(80)
    ->height(45) //To override scaling
```

### Colors

[](#colors)

You can set wither or both of the background colours for the Toggle. By default True is the Nova 'Success Green' \[ var(--success) \] and false is a Grey 60 \[ var(--60) \]

```
Toggle::make('Active')
    ->trueColor('pink')
    ->falseColor('#fcfcfc')
```

### Speed

[](#speed)

You can set the animation speed in ms with

```
Toggle::make('Active')
    ->speed(500)
```

The default is 300ms

### Toggle on index

[](#toggle-on-index)

You can activate the toggle on index as well with

```
Toggle::make('Active')
    ->inlineOnIndex()
```

Original Package
----------------

[](#original-package)

- [davidpiesse/nova-toggle](https://github.com/davidpiesse/nova-toggle)

Licence
-------

[](#licence)

This package is [Treeware](https://treeware.earth). If you use it in production, then we ask that you [**buy the world a tree**](https://plant.treeware.earth/https://github.com/amidesfahani/nova-toggle) to thank us for our work. By contributing to the Treeware forest you’ll be creating employment for local families and restoring wildlife habitats.

###  Health Score

18

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity25

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5d9ed461878eff3be19c9bfd4158e246a2a02f3728fa9589d8d48b61867fc2b0?d=identicon)[amidesfahani](/maintainers/amidesfahani)

---

Top Contributors

[![amidesfahani](https://avatars.githubusercontent.com/u/61671721?v=4)](https://github.com/amidesfahani "amidesfahani (3 commits)")

### Embed Badge

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

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

###  Alternatives

[myclabs/php-enum

PHP Enum implementation

2.7k225.2M586](/packages/myclabs-php-enum)[maba/webpack-bundle

Bundle to Integrate Webpack to Symfony

122268.2k4](/packages/maba-webpack-bundle)[lara-zeus/bolt

Zeus Bolt is form builder for your users, with so many use cases

23637.3k2](/packages/lara-zeus-bolt)[gerardojbaez/laraplans

SaaS style recurring plans for Laravel.

17817.3k1](/packages/gerardojbaez-laraplans)[balping/ticketit-app

Ticketit, the simple helpdesk tickets system pre-installed in Laravel

136.6k](/packages/balping-ticketit-app)[msvdev/yii2-widget-mappicker

Yii2 map widget allows you to simplify the entry of geographic coordinates for your form. Support google and yandex maps services.

108.6k](/packages/msvdev-yii2-widget-mappicker)

PHPackages © 2026

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