https://github.com/happytodev/filament-tailwind-color-picker
Specific Tailwindcss color picker field for Filamentphp
https://github.com/happytodev/filament-tailwind-color-picker
Last synced: 18 days ago
JSON representation
Specific Tailwindcss color picker field for Filamentphp
- Host: GitHub
- URL: https://github.com/happytodev/filament-tailwind-color-picker
- Owner: happytodev
- License: mit
- Created: 2022-08-23T09:43:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T10:45:20.000Z (over 1 year ago)
- Last Synced: 2025-03-26T17:21:28.236Z (about 1 month ago)
- Language: PHP
- Size: 256 KB
- Stars: 11
- Watchers: 1
- Forks: 9
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-filament - happytodev/filament-tailwind-color-picker - Specific Tailwindcss color picker field for Filamentphp. (Fields)
README
# Specific Tailwindcss color picker for Filamentphp
[](https://packagist.org/packages/happytodev/filament-tailwind-color-picker)
[](https://github.com/happytodev/filament-tailwind-color-picker/actions?query=workflow%3Arun-tests+branch%3Amain)
[](https://github.com/happytodev/filament-tailwind-color-picker/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[](https://packagist.org/packages/happytodev/filament-tailwind-color-picker)This plugin add a field in Filament Form to help you to select color in the Tailwind color's palette.
![]()
## Screenshots
### Single Tailwind Color Picker in Filament

### Code integration example

### Filament Tailwind Color Picker works perfectly with other filaments fields

### Responsive on 1280x1024

### Responsive on iPhone 12 Pro

## Support us
[You can support the development of this open-source package here](https://github.com/sponsors/happytodev)
## Installation
You need first a Filament installation working. For that, please read instructions on the Filament website.
You can install the package via composer:
```bash
composer require happytodev/filament-tailwind-color-picker
```Optionally, you can publish the views using
```bash
php artisan vendor:publish --tag="filament-tailwind-color-picker-views"
```## Usage
For adding a background color picker :
```php
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 :
```php
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
```bash
composer test
```## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Frédéric Blanc](https://github.com/happytodev)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.