jeffersongoncalves/filament-flux-pro
Filament v5 plugin that wraps Livewire Flux Pro components as native Filament form fields, widgets, schema components, table columns, and page concerns (date pickers, editor, uploads, charts, tabs, kanban, command palette, etc.). Requires Flux Pro license.
Install Dependencies Run:
composer require jeffersongoncalves/filament-flux-pro
Ensure auth.json is configured with Flux Pro credentials (never commit this file).
Run Installer
php artisan filament-flux-pro:install --panel=admin
This patches Tailwind config, publishes the config file, and warns about missing prerequisites.
Register Plugins
In your Panel provider:
->plugin(FilamentFluxPlugin::make())
->plugin(FilamentFluxProPlugin::make()->useEverywhere())
Rebuild Assets
npm run build
php artisan view:clear
Replace a basic DatePicker in a Resource with FluxDatePicker:
use Jeffersongoncalves\FilamentFluxPro\Forms\Components\FluxDatePicker;
FluxDatePicker::make('published_at')
->fluxMode('single')
->required();
Rebinding Existing Fields
Enable useEverywhere() to auto-convert standard Filament fields to Flux Pro equivalents:
->plugin(FilamentFluxProPlugin::make()->useEverywhere([
'datePicker' => true,
'richEditor' => false, // Disable for specific fields
]))
Dynamic Data Binding
Use closures for dynamic options in FluxAutocomplete or FluxPillbox:
FluxAutocomplete::make('user_id')
->fluxOptionsResolver(fn ($search) => User::search($search)->pluck('name', 'id'));
Subclassing Chart Widgets
Extend FluxLineChartWidget for custom data:
class RevenueChart extends FluxLineChartWidget {
protected function getData() {
return Revenue::query()
->groupByMonth()
->get()
->map(fn ($r) => ['date' => $r->month, 'revenue' => $r->total]);
}
}
Table Integration Add sparklines to table columns:
FluxChartColumn::make('sales_trend')
->fluxData(fn ($record) => $record->last30DaysSales())
->fluxColor(fn ($record) => $record->trend > 0 ? 'lime' : 'red');
Nested Layouts
Combine FluxTabs with Flux Pro fields:
FluxTabs::make('Post')
->tabs([
Tab::make('Content')->schema([
FluxEditor::make('body'),
]),
]);
Conditional Rendering
Use FluxPopover for contextual tooltips:
{{ FluxPopover::trigger(
triggerHtml: '<flux:button>Details</flux:button>',
contentHtml: '<flux:text>Advanced info...</flux:text>',
) }}
Kanban Boards Define columns dynamically:
protected function getKanbanColumns() {
return [
KanbanColumnDefinition::make('Backlog'),
KanbanColumnDefinition::make('In Progress'),
];
}
Command Palette Enable globally:
->plugin(FilamentFluxProPlugin::make()->enableCommandPalette())
Missing filament-flux Plugin
Registration fails with a RuntimeException if FilamentFluxPlugin isn’t registered first.
License Authentication
Forgetting auth.json or incorrect credentials cause silent failures. Test with:
composer require livewire/flux-pro
Tailwind Scanning
After installing, run npm run build and php artisan view:clear to ensure Flux Pro styles are compiled.
State Hydration
FluxComposer returns an array (['text' => ..., 'attachments' => ...]) when attachments/mentions are used. Cast to json in your model:
protected $casts = [
'message' => 'json',
];
Uncaught Error: Class 'FluxXyz' not found if the free filament-flux plugin is missing.php artisan view:clear) after updating Flux Pro.dd() to inspect closures in fluxOptionsResolver or fluxData.Custom Chart Options
Override getOptions() in chart widgets:
protected function getOptions(): array {
return [
'colors' => ['emerald', 'fuchsia'],
'showGrid' => false,
];
}
Sanitization Rules
Extend HtmlSanitizer for custom allowed tags:
use Jeffersongoncalves\FilamentFluxPro\Support\HtmlSanitizer;
$sanitizer = new HtmlSanitizer();
$sanitizer->addAllowedTags(['custom-tag']);
Kanban Customization
Use KanbanCardData to modify card rendering:
protected function getKanbanCardData(KanbanCardData $data) {
$data->title(fn ($record) => "Task #{$record->id}");
return $data;
}
FluxAutocomplete, use fluxDebounce() to reduce API calls.getData() to avoid runtime queries.useEverywhere(): Disabling it doesn’t revert fields to their original state—you must manually replace them.livewire/flux-pro is ^2.13 (check composer.json).How can I help you explore Laravel packages today?