jeffersongoncalves/filament-flux
Filament v5 plugin that exposes Livewire Flux UI components as native Filament Form fields, Table columns, Infolist entries, and Actions. Includes an installer to patch panel theme CSS and add Flux + Filament Flux styles.
Pros:
FluxInput, FluxSelect) while preserving Filament’s native API. This aligns with Laravel’s ecosystem (Filament v5 + Livewire) and avoids reinventing form/field logic.select fields while adopting FluxInput). Reduces risk of breaking existing UI.<x-flux::badge>, <x-flux::dropdown>) with Flux primitives, reducing custom CSS/JS overhead.Cons:
pageOptions in pagination, extremeLinks) are dropped in Flux replacements. May require workarounds.<flux:modal>, forcing reliance on Filament’s native modals for actions/confirmations.HeroiconNormalizer, adding minor maintenance overhead.useEverywhere() flag automates bulk replacements.statsCard with charts) may need validation post-integration.npm run build to inject Flux/Tailwind CSS into theme.css. No runtime JS conflicts if using Filament’s default setup.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Breaking Changes | Medium | Test in staging first; use useEverywhere() incrementally. Opt out problematic fields. |
| CSS/JS Conflicts | Low | Plugin idempotently patches theme.css; Tailwind v4 handles Flux classes automatically. |
| Feature Loss | Medium | Audit Filament-specific features (e.g., pagination pageOptions) before enabling replacements. |
| Performance | Low | Flux components are optimized for Livewire; minimal overhead vs. native Filament fields. |
| Maintenance | Medium | Monitor Filament v5 minor updates for breaking changes; vendor views fall back to defaults. |
sidebar.item, dropdown)? If so, test overrides thoroughly.HeroiconNormalizer handles most cases, but edge cases may require manual fixes.pageOptions dropdown or extremeLinks? If yes, disable the pagination Flux replacement.<flux:modal>, so these must use Filament’s modals.theme.css heavily customized? The plugin patches it idempotently, but conflicts may arise.filament-notifications, filament-widgets)? Some components (e.g., statsCard) may need validation.npm run build) and Tailwind v4 for CSS processing.jeffersongoncalves/filament-flux (core plugin).livewire/flux (UI components).filament/filament (v5.x).Pre-Integration:
composer.json must target ^5.0).resources/views/filament/*).pageOptions, extremeLinks).Installation:
composer require jeffersongoncalves/filament-flux
php artisan make:filament-theme admin # If not already created
php artisan filament-flux:install --panel=admin
npm run build
install command patches theme.css with Flux/Tailwind imports.Configuration:
Panel::make():
return $panel->plugins([
FilamentFluxPlugin::make()
->useEverywhere() // Auto-replace all fields
->useFluxNavigation(['sidebar' => true, 'topbar' => false])
->useFluxComponents(['badge' => true, 'dropdown' => false]),
]);
select, pagination) if needed.Testing:
FluxInput::make()->email()).FluxSelect vs. native Select).<x-flux::badge>).Post-Integration:
filament-flux as needed (follow changelog).| Component Type | Compatibility Notes |
|---|---|
| Form Fields | 1:1 replacement (e.g., TextInput → FluxInput). All Filament methods preserved. |
| Table Columns | Flux-specific methods (e.g., fluxColor(), fluxIcon()). Native Filament columns unchanged. |
| Actions | Uses Filament’s native modals; Flux styling via fluxVariant(), fluxIcon(), etc. |
| Navigation | Sidebar/topbar replaced with <flux:navlist.item>. Data layer (active states) intact. |
| Blade Components | Opt-in per slug (e.g., <x-flux::badge>). Fallback to Filament views if missing. |
| Theme System | Syncs Filament’s theme switcher with Flux’s appearance store. |
Phase 1: Safe Adoption (Low Risk):
useEverywhere() for non-critical fields (e.g., input, textarea).Phase 2: UI Overhaul (Moderate Risk):
useFluxNavigation()).badge, dropdown) incrementally.Phase 3: Full Migration (High Risk):
shell override for full Flux sidebar/main layout.pagination, statsCard).Phase 4: Optimization:
How can I help you explore Laravel packages today?