PHPackages                             gabrielesbaiz/nova-field-indicator - 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. gabrielesbaiz/nova-field-indicator

ActiveLibrary

gabrielesbaiz/nova-field-indicator
==================================

A colour-coded indicator field for Laravel Nova

1.0.0(1y ago)02.4k↑450%MITPHPPHP ^8.0CI failing

Since Mar 4Pushed 12mo ago1 watchersCompare

[ Source](https://github.com/gabrielesbaiz/nova-field-indicator)[ Packagist](https://packagist.org/packages/gabrielesbaiz/nova-field-indicator)[ Docs](https://github.com/gabrielesbaiz/nova-field-indicator)[ GitHub Sponsors]()[ RSS](/packages/gabrielesbaiz-nova-field-indicator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

NovaFieldIndicator
==================

[](#novafieldindicator)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5a4d0c00876760f8d36bdc2bf99dae9e1c112e0dc1e40f54bc85ae7455307add/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6761627269656c65736261697a2f6e6f76612d6669656c642d696e64696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gabrielesbaiz/nova-field-indicator)[![Total Downloads](https://camo.githubusercontent.com/575bc5c65b4e77c9d2822e01e70ee312437f969212f17c6d8201d8e48cd7dd12/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6761627269656c65736261697a2f6e6f76612d6669656c642d696e64696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gabrielesbaiz/nova-field-indicator)

A colour-coded indicator field for Laravel Nova.

Original code from [oleghalin/nova4-indicator-field](https://github.com/oleghalin/nova4-indicator-field)

Features
--------

[](#features)

- ✅ With labels
- ✅ Without labels
- ✅ Hide defined values
- ✅ Named colours
- ✅ Literal colours

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

[](#installation)

You can install the package via composer:

```
composer require gabrielesbaiz/nova-field-indicator
```

Usage
-----

[](#usage)

```
use Gabrielesbaiz\NovaFieldIndicator\NovaFieldIndicator;

NovaFieldIndicator::make('Status'),
```

### Options

[](#options)

#### Labels

[](#labels)

```
NovaFieldIndicator::make('Status')
    ->labels([
        'banned' => 'Banned',
        'active' => 'Active',
        'invited' => 'Invited',
        'inactive' => 'Inactive',
    ])
```

#### Without Labels

[](#without-labels)

```
NovaFieldIndicator::make('Status')
    ->withoutLabels()
```

#### Unknown Label

[](#unknown-label)

```
NovaFieldIndicator::make('Status')
    ->unknown('Unknown')
```

#### Should Hide

[](#should-hide)

```
NovaFieldIndicator::make('Status')
    ->shouldHide('active')
```

```
NovaFieldIndicator::make('Status')
    ->shouldHide(['invited', 'requested'])
```

```
NovaFieldIndicator::make('Status')
    ->shouldHide(function($value) {
        return $value == 'inactive';
    })
```

#### Should Hide If No

[](#should-hide-if-no)

```
NovaFieldIndicator::make('Status')
    ->shouldHideIfNo()
```

#### Colours

[](#colours)

##### Named Colours

[](#named-colours)

```
NovaFieldIndicator::make('Status')
    ->colors([
        'banned' => 'red',
        'active' => 'green',
        'invited' => 'blue',
        'inactive' => 'grey',
    ])
```

The available colours are the default "base" colours from [Tailwind](https://tailwindcss.com/docs/colors), with the addition of black:

- 'black' `#22292F`
- 'grey' or 'gray' `#B8C2CC`
- 'red' `#E3342F`
- 'orange' `#F6993F`
- 'yellow' `#FFED4A`
- 'green' `#38C172`
- 'teal' `#4DC0B5`
- 'blue' `#3490DC`
- 'indigo' `#6574CD`
- 'purple' `#9561E2`
- 'pink' `#F66D9B`

As well as the following Nova variable colours:

- 'success' `var(--success)`
- 'warning' `var(--warning)`
- 'danger' `var(--danger)`
- 'info' `var(--info)`

Colour classes are not validated against the lists above, so if you enter an invalid colour, it will fall back to grey.

##### Literal Colours

[](#literal-colours)

```
NovaFieldIndicator::make('Status')
    ->colors([
        '...' => '#ff0000',
        '...' => 'rgb(0, 255, 0)',
        '...' => 'rgba(0, 0, 0, 0.5)',
        '...' => 'hsl(120, 100%, 50%)',
        '...' => 'hsla(120, 100%, 50%, 0.5)',
        '...' => 'var(--success)',
    ])
```

##### Additional Colour Classes

[](#additional-colour-classes)

```
.indicator-yourcolourname {
    background: #000000;
}
```

```
NovaFieldIndicator::make('Status')
    ->colors([
        'yourstatus' => 'yourcolourname',
    ])
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Oleg Khalin](https://github.com/oleghalin)
- [Gabriele Sbaiz](https://github.com/gabrielesbaiz)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance47

Moderate activity, may be stable

Popularity22

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

441d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97040fb60637d4b81897347524bc9343ffa6b978d4b19c0c28ea0823e2a1752b?d=identicon)[gabrielesbaiz](/maintainers/gabrielesbaiz)

---

Top Contributors

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

---

Tags

laravelGabriele Sbaiznova-field-indicator

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/gabrielesbaiz-nova-field-indicator/health.svg)

```
[![Health](https://phpackages.com/badges/gabrielesbaiz-nova-field-indicator/health.svg)](https://phpackages.com/packages/gabrielesbaiz-nova-field-indicator)
```

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

1312.2k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

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