asignua/filament-clusters
Organize your Filament admin panel into logical clusters. This package lets you group related resources and pages into cohesive modules, keeping navigation clean and making large applications easier to manage for developers and end users.
composer require and, if the package ships a panel plugin, register it in your PanelProvider (->plugin(...)); otherwise the Cluster component is available immediately as a form layout component.use Guava\FilamentCluster\Components\Cluster; // adjust to the package namespace
Cluster::make()
->columns(2)
->schema([
DatePicker::make('start_date')
->label('Start date')
->required(),
DatePicker::make('end_date')
->label('End date')
->required()
->afterOrEqual('start_date'),
]);
Section when the fields are peers, not a titled group. Clusters read as a single bordered block (address blocks, date ranges, currency + amount pairs) and cut down on stacked section chrome in long forms.columns() plus per-field columnSpan(). A typical pattern is columns(2) with a full-width field in the middle of the grid (->columnSpan(2)) and the remaining fields flowing into the next row. Keep spans summing to the column count per intended row.end_date). If you need a friendly name that differs from the visible label, use ->validationAttribute().afterOrEqual, gt, required_with-style rules because the related inputs are visually adjacent; keep the rule on the dependent field and the label on both.Section, a Tab, or a repeater item schema works well; clusters inside clusters get noisy and make border/span math harder to reason about.columns() small so mobile stacking stays readable.->visible(), expect the grid to reflow; either hide the whole cluster or make sure remaining spans still fill the row.columns(2) with four+ fields, you did. Re-check any custom CSS that was papering over those edges — it will now double up.columnSpan(2) in a columns(3) grid leaves a gap, and an odd number of fields in a 2-column grid leaves a dangling cell. Verify with the field count, not by eyeballing one screen size.->label() (and optionally ->validationAttribute()) rather than overriding the translation.columns()/columnSpan() configuration or your own CSS overrides.extraAttributes() / custom classes on the cluster and its children, and (if exposed) a publishable view for deeper border/markup changes. Prefer these over global CSS targeting Filament's generated classes, which are not part of the package's stability contract.composer update is safe; still re-run your form tests that assert validation messages, since the docs' labeling guidance may reveal messages you were unknowingly asserting against raw attribute names.How can I help you explore Laravel packages today?