PHPackages                             codicastudio/badge-field - 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. codicastudio/badge-field

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

codicastudio/badge-field
========================

A random Codica Studio package.

1.0.0(5y ago)04MITVuePHP ^7.4 || ^8.0

Since Sep 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/codicastudio/badge-field)[ Packagist](https://packagist.org/packages/codicastudio/badge-field)[ Docs](https://github.com/codicastudio/badge-field)[ RSS](/packages/codicastudio-badge-field/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Laravel Nova Badge Field
========================

[](#laravel-nova-badge-field)

Simple Laravel Nova Badge field. It extends the `Select` field and allows a simple mapping of colors to values to display a "Badge" in the index.

### Details Page

[](#details-page)

[![details page select](https://camo.githubusercontent.com/2bf84259d95305cef3b8b7e83c4f63b833eeb89d98eecc006146faed92330475/68747470733a2f2f63646e2d70726f2e64707263646e2e6e65742f66696c65732f6163635f3436353631322f53354d447169)](https://camo.githubusercontent.com/2bf84259d95305cef3b8b7e83c4f63b833eeb89d98eecc006146faed92330475/68747470733a2f2f63646e2d70726f2e64707263646e2e6e65742f66696c65732f6163635f3436353631322f53354d447169)

### Index

[](#index)

[![index badge](https://camo.githubusercontent.com/ffc6163ec39e150b4bddc6171d5203970c400f69137c8de36decf25a209243a0/68747470733a2f2f63646e2d70726f2e64707263646e2e6e65742f66696c65732f6163635f3436353631322f676962676a44)](https://camo.githubusercontent.com/ffc6163ec39e150b4bddc6171d5203970c400f69137c8de36decf25a209243a0/68747470733a2f2f63646e2d70726f2e64707263646e2e6e65742f66696c65732f6163635f3436353631322f676962676a44)

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

[](#installation)

You can install the package in to a Laravel app that uses [Nova](https://nova.laravel.com) via composer:

```
composer require timothyasp/nova-badge-field
```

Usage
-----

[](#usage)

```
use Timothyasp\Badge\Badge;

$options = [
    'option1' => 'Option 1',
    'option2' => 'Option 2'
];

Badge::make('Field')
   ->options($options)
   ->colors([
      'option1' => '#ffffff',
      'option2' => '#000000'
   ]);

```

If you want to set the text color of the badge, set the color attribute on the option. If there isn't an option set, it defaults to setting the background color and the text color is set to a contrasting white/black color based on the brightness of the background.

```
use Timothyasp\Badge\Badge;

$options = [
    'option1' => 'Option 1',
    'option2' => 'Option 2'
];

Badge::make('Field')
   ->options($options)
   ->colors([
      'option1' => [
          'background' => '#ffffff',
          'color' => '#000000'
      ],
      'option2' => '#000000'
   ]);

```

If you prefer to use the `label` on the index and detail pages, you can use the `->displayUsingLabels()` option.

```
use Timothyasp\Badge\Badge;

$options = [
  'option1' => 'Option 1',
  'option2' => 'Option 2'
];

Badge::make('Field')
   ->options($options)
   ->colors([
      'option1' => '#ffffff',
      'option2' => '#000000'
   ])->displayUsingLabels();

```

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

2007d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4a33b354bea681b74be49f37bbe9f3c4f145dbefe0f2b5cbb705b0731bf13fd3?d=identicon)[codicastudio](/maintainers/codicastudio)

### Embed Badge

![Health badge](/badges/codicastudio-badge-field/health.svg)

```
[![Health](https://phpackages.com/badges/codicastudio-badge-field/health.svg)](https://phpackages.com/packages/codicastudio-badge-field)
```

###  Alternatives

[vladkens/autoprefixer

Run Autoprefixer using node.js in you php.

76330.5k3](/packages/vladkens-autoprefixer)[lackhurt/laravel-apollo

Apollo agent for laravel.

135.1k](/packages/lackhurt-laravel-apollo)[zakurdaev/yii2-editorjs-widget

Use editor.js in form. Module for Yii2

101.5k1](/packages/zakurdaev-yii2-editorjs-widget)

PHPackages © 2026

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