This plugin adds an editable icon column to your filament tables. The cell renders the current state as an icon, and clicking it opens a dropdown where the user picks a new state, again represented by icons. The selection is saved straight to the record, like filament's own SelectColumn.
This is useful for quickly toggling states directly from a table, for example a status, a priority or a rating, without opening the edit page.
The full documentation is available at guava.cz.
| Filament version | Plugin version |
|---|---|
| 3.x | 1.x |
| 4.x | 2.x |
| 5.x | 3.x |
For older filament versions, please check the branch of the respective version.
You can install the package via composer:
composer require guava/filament-icon-select-columnNext, publish the package assets:
php artisan filament:assetsFinally, make sure you have a custom filament theme (read here how to create one) and add the following to your theme.css file so the CSS is properly built:
@source '../../../../vendor/guava/filament-icon-select-column/resources/**/*';Add the column to any table. It works best with a backed enum implementing HasLabel, HasIcon and optionally HasColor:
use Guava\FilamentIconSelectColumn\Tables\Columns\IconSelectColumn;
$table->columns([
IconSelectColumn::make('status')
->options(Status::class),
]);Everything else, including array options, icon sizes and closing the dropdown on selection, is covered in the documentation.
composer testPlease see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.