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 1mo ago

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 8% 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

[pelmered/filament-money-field

94162.4k1](/packages/pelmered-filament-money-field)[arispati/emoji-remover

PHP library that remove an emoji from text

30341.5k](/packages/arispati-emoji-remover)

PHPackages © 2026

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