webwizardsusa / filament-table-layouts
Let people switch a Filament table between a table and a card grid, with an image at the top of each card, remembered per table.
Package info
github.com/webwizardsusa/filament-table-layouts
pkg:composer/webwizardsusa/filament-table-layouts
Requires
- php: ^8.3
- filament/filament: ^5.0
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- orchestra/testbench: ^11.0
- pestphp/pest: ^5.2
- pestphp/pest-plugin-laravel: ^5.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Under active development. This package is still changing and may not be ready for production use yet. Until 1.0, a minor release can include breaking changes, so check the changelog before you upgrade.
Let people switch a Filament table between rows and a grid of cards, with a switcher in the table's toolbar. Each card has an image across the top, the details below it, then the record actions, with the bulk select checkbox over the top left corner. The layout someone picks is remembered in their session, for each table.
Requires PHP 8.3+ and Filament 5.
composer require webwizardsusa/filament-table-layouts
use Webwizardsusa\TableLayouts\Card; public static function table(Table $table): Table { return $table ->columns([ ImageColumn::make('cover'), TextColumn::make('title')->searchable()->sortable(), TextColumn::make('author.name'), ]) ->card( Card::make([ TextColumn::make('title')->weight(FontWeight::Bold), TextColumn::make('author.name')->color('gray'), ])->image('cover'), ); }
Defining a card offers both layouts, starting in the table. To start in cards, or offer only cards:
use Webwizardsusa\TableLayouts\Enums\TableLayout; $table->card($card)->defaultLayout(TableLayout::Card); $table->card($card)->availableLayouts(TableLayout::Card);
The full documentation is in docs/.
Testing
composer test
About Us
This package is developed and maintained by WebWizardsUSA, a top rated web development agency on Upwork.
License
The MIT License (MIT). See LICENSE.md.



