timothyasp / nova-color-field by timothyasp

A Laravel Nova Color Picker field.
1,187,438
73
3
Package Data
Maintainer Username: timothyasp
Package Create Date: 2018-08-23
Package Last Update: 2023-07-05
Language: Vue
License: MIT
Last Refreshed: 2024-04-25 15:12:30
Package Statistics
Total Downloads: 1,187,438
Monthly Downloads: 19,769
Daily Downloads: 817
Total Stars: 73
Total Watchers: 3
Total Forks: 18
Total Open Issues: 4

Laravel Nova Color Field

Dead simple Laravel Nova Color field. Includes a color picker from the vue-color component.

Details Page

details page color input

Index

index color

Installation

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

composer require timothyasp/nova-color-field

Usage

In your resource class, add the following to your fields method:

use Timothyasp\Color\Color;

....

Color::make("Field");

This will add the color picker to your resource, using vue-color's "slider" component by default. If you'd like to leverage another vue-color component, you can do so by calling that component's name as a method after Color::make():

use Timothyasp\Color\Color;

....

Color::make('Field')->compact()
// or
Color::make('Field')->slider()

and so on. You can use any one of: chrome, compact, grayscale, material, photoshop, sketch, slider, swatches

Credits

Built for QuizGriz - the #1 online trivia and quiz game site

License

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