happytodev/filament-tailwind-color-picker
Filament form field for picking colors from the Tailwind CSS palette. Provides a single Tailwind color picker component that works alongside other Filament fields and stays responsive across screen sizes.
## Technical Evaluation
### **Architecture Fit**
- **Modularity**: Remains a **Filament-specific** Tailwind CSS color picker field, maintaining clean integration with Filament’s form builder ecosystem. The package’s component-based design continues to reduce boilerplate for color selection UX.
- **Theming Consistency**: Tailwind’s utility-first approach ensures alignment with existing design systems, though customization remains limited to predefined palettes.
- **State Management**: Unchanged—still leverages Filament’s built-in form handling for seamless sync with backend models (e.g., `Eloquent` attributes).
### **Integration Feasibility**
- **Low Coupling**: Drop-in field integration remains unchanged. Example usage:
```php
use Happytodev\FilamentTailwindColorPicker\Fields\ColorPicker;
ColorPicker::make('background_color')
->default('#ffffff')
->livePreview(true),
filament/spatie-color-picker).filament/filament and tailwindcss versions. Critical: Test against Filament v3.x if used.| Package Version | Filament v2.x | Filament v3.x | Notes |
|---|---|---|---|
| 0.1.9 | ✅ | ❓ | Bug fix may not apply to v3.x |
composer require happytodev/filament-tailwind-color-picker:^0.1.9
npm install # Ensure Tailwind is configured
ColorPicker. Example:
- TextInput::make('accent_color')->rules(['regex:/^#[0-9A-F]{6}$/i']),
+ ColorPicker::make('accent_color')
+ ->default('#3b82f6')
+ ->rules(['required']) // Add custom validation
#g00000).tailwind.config.js may not sync with the picker’s palette. Override via:
ColorPicker::make('color')
->palette([
'brand' => '#10b981',
// Custom hex values
]),
color_code) support hex strings (max 7 chars)./filament-tailwind-color-picker
├── src/
├── composer.json (updated dependencies)
├── README.md (documentation for Filament v3.x)
ColorPicker::make('color')
->rules([
'regex:/^#[0-9A-F]{6}$/i',
function ($attribute, $value, $fail) {
if (!in_array($value, ['#ff0000', '#00ff00'])) {
$fail('Must be red or green.');
}
},
]),
settings table with tenant_id.| Scenario | Impact | Mitigation |
|---|---|---|
| Bug Fix Incomplete | Live preview still broken | Roll back to v0.1.8 or fork. |
| Tailwind build fails | Broken picker UI | Add tailwindcss to composer.json scripts. |
| Invalid color input | Corrupted database | Use rules() or mutateUsing. |
| Filament v3.x break | Picker stops rendering | Test in Dockerized staging env. |
| No maintenance | Security vulnerabilities | Fork and maintain internally. |
v0.1.9 and test in a sandbox.--color-primary).
NO_UPDATE_NEEDED would **not** apply here due to the critical need to address the **scope of the bug fix** and **compatibility risks** introduced by the lack of version support documentation. The assessment has been updated to reflect these risks and actionable steps.
How can I help you explore Laravel packages today?