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

ActiveLibrary

xamani/nova-toggle
==================

A Laravel Nova toggle field.

v1.1(2y ago)01.6kMITSCSSPHP ^7.3|^8.0

Since Aug 29Pushed 2y agoCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (0)

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

[](#toggle-field)

A drop in replacement for the default Boolean field

[![Toggle In Action](https://camo.githubusercontent.com/f8f274c9dcb1befe0efe395d24dcd98304f65e7d0f31a5aa4e62794ac35ee72a/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64617669647069657373652f696d6167652f75706c6f61642f76313533353331373236372f323031382d30382d32365f32312e35392e33305f7332627533392e676966)](https://camo.githubusercontent.com/f8f274c9dcb1befe0efe395d24dcd98304f65e7d0f31a5aa4e62794ac35ee72a/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f64617669647069657373652f696d6167652f75706c6f61642f76313533353331373236372f323031382d30382d32365f32312e35392e33305f7332627533392e676966)

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

[](#installation)

Same as most other Nova Packages

```
composer require xamani/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 Davidpiesse\NovaToggle\Toggle;
```

```
Toggle::make('Active')
    ->trueValue('On')
    ->falseValue('Off')
```

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
```

To set the text you can use either or both of the following. You must also set the visibility of the labels as described above.

```
Toggle::make('Active')
    ->showLabels()
    ->trueLabel('Tru Dat')
    ->falseLabel('Nah Dawg')
```

The defaults are 'True' and 'False'

### 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')
    ->editableIndex()
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.2% 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 ~406 days

Total

2

Last Release

953d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56ff56d15dc0abf7492ee4306b94c77838db43524a42ab083dd9f85de4b25651?d=identicon)[xamani](/maintainers/xamani)

---

Top Contributors

[![davidpiesse](https://avatars.githubusercontent.com/u/800650?v=4)](https://github.com/davidpiesse "davidpiesse (15 commits)")[![xamani](https://avatars.githubusercontent.com/u/25452228?v=4)](https://github.com/xamani "xamani (3 commits)")[![bernhardh](https://avatars.githubusercontent.com/u/642292?v=4)](https://github.com/bernhardh "bernhardh (1 commits)")[![bolechen](https://avatars.githubusercontent.com/u/195015?v=4)](https://github.com/bolechen "bolechen (1 commits)")[![daguilarm](https://avatars.githubusercontent.com/u/2663941?v=4)](https://github.com/daguilarm "daguilarm (1 commits)")[![lucidlogic](https://avatars.githubusercontent.com/u/932221?v=4)](https://github.com/lucidlogic "lucidlogic (1 commits)")

---

Tags

laravelfieldnova

### Embed Badge

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

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

###  Alternatives

[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[alexwenzel/nova-dependency-container

A Laravel Nova 4 form container for grouping fields that depend on other field values.

461.0M2](/packages/alexwenzel-nova-dependency-container)[sietse85/nova-button

(Nova 4+) A Laravel Nova package for adding buttons to your resources.

37347.3k](/packages/sietse85-nova-button)[stepanenko3/nova-json

Nova json field to spread a json column throughout multiple fields.

42249.7k](/packages/stepanenko3-nova-json)[optimistdigital/nova-notes-field

This Laravel Nova package adds a notes field to Nova's arsenal of fields.

52139.5k](/packages/optimistdigital-nova-notes-field)[digital-creative/nova-filepond

A Nova field for uploading File, Image and Video using filepond.

5568.0k1](/packages/digital-creative-nova-filepond)

PHPackages © 2026

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