GithubHelp home page GithubHelp logo

happytodev / filament-tailwind-color-picker Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 8.0 262 KB

Specific Tailwindcss color picker field for Filamentphp

License: MIT License

PHP 83.32% Blade 15.85% CSS 0.09% JavaScript 0.74%

filament-tailwind-color-picker's Introduction

Specific Tailwindcss color picker for Filamentphp

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

This plugin add a field in Filament Form to help you to select color in the Tailwind color's palette.

Banner

Screenshots

Single Tailwind Color Picker in Filament

SCR-20220831-umu

Code integration example

SCR-20220831-usl

Filament Tailwind Color Picker works perfectly with other filaments fields

SCR-20220825-mge

Responsive on 1280x1024

1280x1024-SCR-20220831-w9u

Responsive on iPhone 12 Pro

390x844-iphone12pro-SCR-20220831-wdc

Support us

You can support the development of this open-source package here

Installation

You need first a Filament installation working. For that, please read instructions on the Filament website.

You can install the package via composer:

composer require happytodev/filament-tailwind-color-picker

Optionally, you can publish the views using

php artisan vendor:publish --tag="filament-tailwind-color-picker-views"

Usage

For adding a background color picker :

    TailwindColorPicker::make('backgroundColor')
        ->bgScope(),

When user choose a color in the tailwindcss palette, the value returned by the form will be for example :

bg-red-300

For adding a text color picker :

    TailwindColorPicker::make('backgroundColor')
        ->textScope(),

When user choose a color in the tailwindcss palette, the value returned by the form will be for example :

text-red-300

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

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

Credits

License

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

filament-tailwind-color-picker's People

Contributors

dependabot[bot] avatar devadattas avatar github-actions[bot] avatar happytodev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

filament-tailwind-color-picker's Issues

Dark mode error

I have a problem with dark mode, after install this plugin. Im using vite I don't know if something related:

darkome_AdobeExpress.mp4

Getting Error when views are not published

I get the following error if I don't run the optional view publication command i.e. php artisan vendor:publish --tag="filament-tailwind-color-picker-views"

image

View [vendor.filament-tailwind-color-picker.forms.components.tailwind-color-picker] not found.

Feature Request: hexScope

As the title says. I would welcome a feature to return the hex value of the selected color, instead of the class name.

   TailwindColorPicker::make('backgroundColor')
           ->hexScope(),

returning a hex code, like:
#f59e0b

(PS: tried to post this as a feature request instead of bug repot, but github was not allowing it, for some reason)

illuminate/contracts dependency issue for Laravel 10

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires happytodev/filament-tailwind-color-picker * -> satisfiable by happytodev/filament-tailwind-color-picker[v0.1.0, ..., v0.1.9].
    - happytodev/filament-tailwind-color-picker[v0.1.0, ..., v0.1.9] require illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.1] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require happytodev/filament-tailwind-color-picker:*" to figure out if any version is installable, or "composer require happytodev/filament-tailwind-color-picker:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.