Skip to Content
Inset

Table filters

Dashed filter chips with a searchable checklist.

FacetFilter draws a select filter as a dashed filter chip: "+ Status", with a searchable checklist, the picked values shown on the chip, and Clear and Reset. It extends Filament's SelectFilter, so attribute(), relationship(), multiple(false) and the query work as usual. Options come from options() (an array, a closure or an enum) or, with relationship(), from the related records.

Put the filters above the content, and the search, the chips, Reset and the column options share one toolbar row:

use Filament\Tables\Enums\FiltersLayout;
use Kstmostofa\InsetTheme\Tables\Filters\FacetFilter;

->filters([
    FacetFilter::make('status')->options(OrderStatus::class),
    FacetFilter::make('payment_status')->label('Payment')->options(PaymentStatus::class),
], layout: FiltersLayout::AboveContent)

Relationships

Relationships work the same way as with SelectFilter, nested ones too:

FacetFilter::make('customer')->relationship('customer', 'name'),
FacetFilter::make('product')->relationship('items.product', 'name'),
FacetFilter::make('tags')->relationship('tags', 'name', hasEmptyOption: true),

A chip loads all of its options, so keep it for short lists. Narrow a long one with the third argument of relationship(), or use a searchable SelectFilter instead. Chips apply as soon as you pick, with or without deferFilters(). Filters that are not facets keep Filament's own look.

On this page