yhjohn/color-tag

A Laravel Nova field.

dev-master 2019-08-26 09:58 UTC

This package is not auto-updated.

Last update: 2024-10-02 11:11:50 UTC


README

screenshot 1

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require yhjohn/nova-color-tag

Usage

Just define your field as you normally would and in addition, pass in array of colors as the using the colors method,

Example

// ...
use Yhjohn\ColorTag\ColorTag;

public function fields(Request $request)
{
    return [
        // ...
        ColorTag::make('Color')->colors(['#FF0000', '#FFCC00']),
    ];
}

You can also pass in any valid HTML Color Names

ColorTag::make('Color')->colors(['AliceBlue', 'Cornsilk']),