gabrielesbaiz/nova-field-indicator

A colour-coded indicator field for Laravel Nova
19,206
Install
composer require gabrielesbaiz/nova-field-indicator
Latest Version:2.0.1
PHP:^8.3
Laravel:12 · 13
Older releases:10 · 11
License:MIT
Last Updated:Sep 28, 2026
Links: GitHub  ·  Packagist
Maintainer: gabrielesbaiz

NovaField Indicator

A colour-coded status indicator for Laravel Nova — a dot, ring, square or pill that reads a value and shows what it means, configured from the enum your application already has.

Latest version PHP Laravel Downloads Stars Sponsor

📖 Read the documentation →

Every method, every config key, and a live palette page where picking a shape, size and shade rewrites the PHP call as you click it.

[!CAUTION] Upgrading from 1.x? Read UPGRADE.md first. On Nova 5 the success, danger, warning and info colours rendered an invisible dot — they now appear, so columns that looked empty will fill with colour. Named colours also move from the Tailwind v1 palette to Tailwind 3. php artisan nova-field-indicator:upgrade --dry-run previews the rest.

[!IMPORTANT] A ⭐ costs you nothing and helps other developers find this package. Sponsoring keeps it compatible with every new Laravel and Nova release.

What it does

Nova ships Badge, which is good at four hard-coded states. This is for the rest: a status column whose colours are yours, whose states come from an enum, and which still reads correctly in dark mode and to a screen reader.

  • Enum-first. ->enum(Status::class) derives labels, colours and icons from one enum. If the attribute is already enum-cast and the enum implements the contracts, the field needs no configuration at all.
  • The whole palette. Any Tailwind family and shade, light/dark pairs, or literal CSS colours — resolved against Nova's own --colors-* variables, so re-theming Nova re-themes every indicator.
  • Four shapes and three sizes, plus optional heroicons that cost nothing extra in the bundle because they are Nova's own.
  • Continuous values via ->ranges(), for scores, percentages and stock levels.
  • An index filter with ->filterable(), built from your states or your enum.
  • Accessible by default — colour is never the only channel, and a label-less mark is still a named graphic.
  • Resolved on the server, so an index ships one small object per row instead of your entire configuration repeated per cell.
  • 1.07 kB of JavaScript gzipped, with no runtime dependency of its own.

Requirements

  • PHP 8.3+
  • Laravel 12 or 13
  • Nova 5.11+ — Nova 6 is explicitly conflicted; configureDefaults(), the hook the field applies its display-only defaults through, arrived in 5.11

Installation

composer require gabrielesbaiz/nova-field-indicator

Optionally publish the config and translations:

php artisan vendor:publish --tag=nova-field-indicator-config
php artisan vendor:publish --tag=nova-field-indicator-lang

Quick start

use Gabrielesbaiz\NovaFieldIndicator\NovaFieldIndicator;

NovaFieldIndicator::make('Status')
    ->enum(Status::class)
    ->withIcons()
    ->filterable(),

Everything else is on the documentation site.

Testing

composer check   # Pint + PHPStan level 6 + Pest
npm test         # Vitest

Contributing

Please see CONTRIBUTING for details.

Security

Please review our security policy on how to report security vulnerabilities.

Credits

Support this package

If it saves you time, consider sponsoring.

License

The MIT License (MIT). Please see License File for more information.

Related Packages

gabrielesbaiz/nova-field-json

Composable JSON fields and a JSON editor field for Laravel Nova.

19,424 0
rawand201/filament-connection-badge

A Filament topbar badge that shows real-time network quality (full/medium/low/of...

5,536 6
gabrielesbaiz/nova-card-html

A Laravel Nova card that renders HTML, Markdown or Blade content, with lazy load...

19,189 0
inspheric/nova-indicator-field

A Laravel Nova indicator field.

1,023,451 128
maatwebsite/laravel-nova-excel

Supercharged Excel exports for Laravel Nova Resources

7,184,779 401

Version History

Version Released PHP Laravel License
2.0.1 ^8.3 ^12.0|^13.0 MIT
2.0.0 ^8.3 ^12.0|^13.0 MIT
1.0.0 ^8.0 ^10.0||^11.0||^12.0 MIT