Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Nova Badge Field

Nova Badge Field Laravel Package

timothyasp/nova-badge-field

A Laravel Nova field for displaying colorful badges in your admin panel. Easily show status labels, counts, or tags with customizable colors and styles, ideal for resource index and detail views.

View on GitHub
Deep Wiki
Context7

A Laravel Nova field.

Frequently asked questions about Nova Badge Field
How do I install timothyasp/nova-badge-field?
Install it with Composer using composer require timothyasp/nova-badge-field. The package ships with an auto-discovered service provider and precompiled JS/CSS assets, so no manual provider registration is normally needed. There are no migrations and no required config publishing in the common case. After installing, add BadgeField::make('status') to a Nova resource's fields() method and verify the badge renders in the browser.
Does nova-badge-field work with Laravel Nova 5?
This is unverified and should be treated as a real risk. The last release was in June 2022, placing it in the Nova 4.0 era, while Nova 5 changed asset-serving and component conventions. A field built against Nova 3 or early Nova 4 conventions may render blank, throw on boot, or fail to load its JS bundle. Spike it on one low-traffic resource in a dev branch pinned to your exact Nova version before committing.
Which Laravel, PHP, and Nova versions does the package require?
The package is intended for Laravel 9 or 10 with PHP 8.x and Nova 4.x, but you should confirm the actual constraints in its composer.json before adoption. Nova's commercial licensing makes version pinning a business decision as much as a Composer one. Check whether its laravel/nova constraint could block a future Nova upgrade. If you are not already running Laravel Nova, this package has zero applicability.
How do I customize badge colors and styles?
The field is designed for colorful pill-style badges with configurable colors, so colors are set per field instance rather than globally. Because it is a pure presentation-layer field, styling is applied at render time and involves no persistence or schema changes. If you need dynamic per-row color mapping or icon support, confirm the package's API covers it or consider Nova's first-party Badge field with map(), types(), and withIcons(). Also check that chosen colors meet WCAG contrast requirements if labels are user-facing.
Is this package redundant now that Nova has a built-in Badge field?
Possibly yes, and you should check first. Nova 4 introduced a first-party Badge field with map(), types(), and withIcons(), which may cover static label-to-color mapping entirely. If the built-in field handles your use case, reject this package outright rather than adding an unmaintained dependency. This package only makes sense if you need its specific rendering behavior or are on an older Nova version without an equivalent.
Do I need migrations, config files, or database changes to use BadgeField?
No. The field is a read-only display change for index and detail views, so there are no schema changes, no backfill, and no data migration to reverse. If the underlying column already exists, adoption is essentially a drop-in resource-class edit. Removal is equally cheap, which makes a small pilot low-commitment.
Can I use BadgeField in both index and detail views?
Yes, the package is intended for resource index and detail views, replacing raw text with a colored badge. It is a client-side rendering concern only, so it imposes no constraints on your database, queue, or caching layers. Verify both views render correctly during your spike, since asset-loading problems often show up in one view before the other.
Is timothyasp/nova-badge-field actively maintained and safe for production?
Treat it as knowingly unmaintained. Adoption signals are weak at roughly 58 stars and zero dependents, and it is a single-maintainer, hobby-scale project, so assume slow or no response to issues. An unmaintained Composer dependency will surface in composer audit and SCA tooling and could pin a transitive constraint that blocks a future Nova upgrade. Pin it to an exact version or commit hash rather than a range, and validate on staging pinned to production versions.
How much effort does integrating this field take?
Roughly one to two hours for a Nova-experienced engineer, including visual verification, plus a staging validation pass. Integration is one composer require and a BadgeField::make('status') call in the resource's fields() method. Because it is read-only in practice, there is no write-path risk: no validation bypass and no mass-assignment surface. The main unknown is whether the precompiled dist assets load correctly against your Nova version.
What is the alternative if I want to avoid this dependency?
Write a small in-app custom Nova field you own, typically around 40 lines, or use Nova's first-party Badge field if your Nova version includes it. Both avoid adding an unmaintained third-party package and can be swapped in with a resource-class edit rather than any data operation. Many teams also just use inline displayUsing() closures for simple status labels. If you do adopt the package, wrap usage in a thin local field so replacement later is a one-file change.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo