zvizvi/filament-flexbox
Filament Flexbox adds a flexible layout component to Filament forms and schemas, letting you arrange fields with CSS flexbox controls for direction, wrapping, alignment, and gap. Build responsive, row- or column-based field groups without custom Blade views.
composer require zvizvi/filament-flexbox and note the version constraint: v0.0.1 is the first tagged release, so pin explicitly ("zvizvi/filament-flexbox": "^0.0.1") and expect the public API to move before 1.0.v0.0.1 are effectively empty (only the changelog link), so the README and the src/ tree are your real specification. Read in this order: composer.json (supported Filament/PHP versions), the service provider (what gets registered), then the component class (what fluent methods actually exist).composer.json and check whether the constraint targets Filament v3 (^3.0) or v4 (^4.0); a brand-new 0.0.1 package is usually built against a single major.Grid::make() feels heavy. Drop the component into a resource form schema and confirm it renders before investing further:use Zvizvi\FilamentFlexbox\Components\Flexbox; // confirm namespace from src/
Flexbox::make([
TextInput::make('first_name'),
TextInput::make('last_name'),
])
v0.0.1 as a spike: build one throwaway form with it, screenshot the result at sm/md/lg, and only then roll it into real resources.->direction(), ->wrap(), ->gap(), ->align(), ->justify() and friends are the conventional set, but do not assume names) and build a single internal cheat sheet your team codes against.Section/Grid: it holds Component children and contributes no state of its own. That means ->statePath() and ->relationship() belong on the children, never on the flexbox.Flexbox::make([
TextInput::make('city')->columnSpan(1),
Select::make('country')->options(...)->columnSpan(1),
])->gap(4) // verify method names against src/
->suffixAction()-style button or a Placeholder). Keep nesting to two levels; beyond that the generated classes become impossible to reason about and you should reach for Grid with explicit columnSpan.Flexbox composes cleanly inside Section, Tabs, and Wizard steps because it implements the same contract as any other schema component. Prefer Section for grouping-with-heading and Flexbox only for the alignment problem.Infolist schemas and in Filament\Pages form definitions — confirm by grep for the registration call in the service provider rather than assuming.0.0.1 means no BC promise. Anything you learn from the source today can change in 0.0.2 without a deprecation. Constrain the version, and if the layout is load-bearing for your UI, vendor-copy the component class into your app so a package bump can't silently break production forms.composer.json. Cross-check the constraint against your panel's installed version with composer why-not zvizvi/filament-flexbox if install fails on dependency resolution.php artisan filament:assets (or a Vite build) after install; if it registers via a panel plugin, remember ->plugin(FlexboxPlugin::make()) in your PanelProvider — a missing registration typically means Class not found on the component rather than a render error.display:flex/gap output. Filament's own wrapper divs (fi-fo-component-ctn, grid containers) impose widths that fight flex children; if a field refuses to shrink, the culprit is usually a parent Grid column span, not the flexbox.->live() + ->visible() still occupy their flex slot unless hidden is applied. Verify with a conditional field; wrap conditionals in their own container if the space collapse misbehaves.Grid when you can. If you only need even columns, Filament's built-in Grid::make(2) is maintained upstream and gets new features first. Reserve this package for genuine alignment/justification needs — trailing buttons, baseline-aligned input rows, wrapping tag lists.loadViewsFrom/publishes calls) and override in resources/views/vendor/... so upstream updates to PHP logic don't clobber your tweaks.https://github.com/zvizvi/filament-flexbox/commits/) — until 0.1.0 lands, review each diff before bumping.How can I help you explore Laravel packages today?