PHPackages                             kingmaker/filament-filter-sets - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kingmaker/filament-filter-sets

ActiveLibrary

kingmaker/filament-filter-sets
==============================

Predefined filter sets for Filament tables — apply a combination of table filters in one click.

1.1.0(today)02↑2900%MITPHPPHP ^8.2CI passing

Since Jul 30Pushed todayCompare

[ Source](https://github.com/kingmaker-agm/filament-filter-sets)[ Packagist](https://packagist.org/packages/kingmaker/filament-filter-sets)[ Docs](https://github.com/kingmaker-agm/filament-filter-sets)[ RSS](/packages/kingmaker-filament-filter-sets/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (2)Used By (0)

Filament Filter Sets
====================

[](#filament-filter-sets)

[![Filament Filter Sets — apply pre-defined sets of filters in Filament PHP](.github/banner/filter-set-banner.png)](.github/banner/filter-set-banner.png)

[![Packagist Version](https://camo.githubusercontent.com/ddd804f0ca77f69ee4138eb4f6f45dcd64e8bb59d7cf403e7bb6e704398f249d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b696e676d616b65722f66696c616d656e742d66696c7465722d73657473)](https://packagist.org/packages/kingmaker/filament-filter-sets)[![Packagist Downloads](https://camo.githubusercontent.com/cb82c1e11ab197d096fd22ff36abba814614d180000f585786dd0e5b322d51d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6b696e676d616b65722f66696c616d656e742d66696c7465722d73657473)](https://camo.githubusercontent.com/cb82c1e11ab197d096fd22ff36abba814614d180000f585786dd0e5b322d51d6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6b696e676d616b65722f66696c616d656e742d66696c7465722d73657473)[![Filament](https://camo.githubusercontent.com/c8bd6e6fdc064cd38d7279b2eb4c74032533c55b8d315055b4292e5faa9d638f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d34253230253743253230352d666461653462)](https://filamentphp.com/)[![Run PHPUnit Tests](https://github.com/kingmaker-agm/filament-filter-sets/actions/workflows/run-tests.yml/badge.svg)](https://github.com/kingmaker-agm/filament-filter-sets/actions/workflows/run-tests.yml)[![License](https://camo.githubusercontent.com/d6bc2b26794002c24d023acaab01b6dbb953c57ab9cb80ba5b8aa2f2bd5de99a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c7565)](https://opensource.org/licenses/MIT)

Predefined **filter sets** for Filament tables — apply a whole combination of table filters in one click, from a dropdown in the table toolbar.

A filter set is a named bundle of filter state. Instead of asking a user to open the filters panel and set four fields to find "unread quick reads", you declare that combination once and they pick it from a list.

Requirements
------------

[](#requirements)

PackageFilamentLaravelPHP1.x4 or 511.28+8.2+Installation
------------

[](#installation)

```
composer require kingmaker/filament-filter-sets
```

The service provider is auto-discovered. There is nothing to publish and no trait to add.

Usage
-----

[](#usage)

Call `filterSets()` on the table, alongside your existing `filters()`:

```
use Filament\Tables\Table;
use Filament\Tables\Filters\TernaryFilter;
use Kingmaker\Filament\FilterSets\FilterSet;

public function table(Table $table): Table
{
    return $table
        ->filters([
            TernaryFilter::make('is_published'),
            // ...
        ])
        ->filterSets([
            FilterSet::make('unread_quick_reads')
                ->label('Unread Quick Reads')
                ->icon('heroicon-o-rocket-launch')
                ->filters([
                    'is_read' => ['value' => false],
                    'read_time' => ['read_time_range' => 'quick'],
                ]),

            FilterSet::make('loved_stories')
                ->icon('heroicon-s-heart')
                ->color('danger')
                ->filters([
                    'min_rating' => ['rating_clause' => 'greater_equal', 'rating_value' => 4],
                ]),
        ]);
}
```

A swatch icon appears next to the table's search field. Opening it lists every set; clicking one applies it.

### The `FilterSet` API

[](#the-filterset-api)

MethodDescription`make(string $name)`Creates the set. The name is also the identifier passed to `applyTableFilterSet()`.`label(string $label)`The text in the dropdown. Defaults to `Str::headline($name)` — `unread_quick_reads` becomes `Unread Quick Reads`.`icon(string|BackedEnum|null $icon)`An icon for the dropdown item. Accepts an icon name or Filament's `Heroicon` enum.`color(?string $color)`A Filament colour for the dropdown item, e.g. `success`.`filters(array|Closure $filters)`The filter form state to apply, keyed by filter name.The array passed to `filters()` is the same shape the table's filters form uses: the outer key is the filter name, the inner array is that filter's own form state. A filter with a single field — like `TernaryFilter` — takes `['value' => ...]`; a custom `Filter` with a schema takes one key per field.

### Runtime values

[](#runtime-values)

`filters()` also accepts a `Closure`, resolved every time the set is read. Use it for anything that depends on the current request:

```
FilterSet::make('my_drafts')
    ->filters(fn (): array => [
        'author' => ['value' => auth()->id()],
        'is_published' => ['value' => false],
    ]),
```

### Applying a set programmatically

[](#applying-a-set-programmatically)

Every component with a table gains a virtual `applyTableFilterSet()` method, so you can trigger a set from your own Blade or Livewire code:

```

    Loved stories

```

Behaviour
---------

[](#behaviour)

- **Sets replace, they do not merge.** The filters form is reset to its defaults before a set is applied, so switching from one set to another never leaves a stray filter behind.
- **State is filled through the schema**, not assigned to the Livewire property, so each field's state casts run. This is what makes a ternary `false` render as the selected `No` option rather than falling back to the placeholder.
- **Deferred and live filters are both supported.** If the table defers its filters, the set is applied through `applyTableFilters()`; otherwise through `updatedTableFilters()`.
- **Unknown set names are ignored** — calling `applyTableFilterSet('nope')` leaves the filters exactly as they were.

Customisation
-------------

[](#customisation)

Publish the trigger view to change the icon, placement or markup:

```
php artisan vendor:publish --tag=filament-filter-sets-views
```

Publish the translations to change the trigger's label, or to translate it:

```
php artisan vendor:publish --tag=filament-filter-sets-translations
```

Testing
-------

[](#testing)

Filter sets are exercised like any other Livewire call:

```
Livewire::test(ListStories::class)
    ->call('applyTableFilterSet', 'loved_stories')
    ->assertCanSeeTableRecords([$lovedStory])
    ->assertCanNotSeeTableRecords([$mediocreStory]);
```

To run this package's own suite:

```
composer install
composer test
```

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md).

License
-------

[](#license)

The MIT License (MIT). See [LICENSE.md](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a73fdca69f0fe759b6916d6db0cea5f124b3fc5e3199e0c472610388dda6d4e0?d=identicon)[kingmaker](/maintainers/kingmaker)

---

Top Contributors

[![kingmaker-agm](https://avatars.githubusercontent.com/u/23194965?v=4)](https://github.com/kingmaker-agm "kingmaker-agm (2 commits)")

---

Tags

laravelfilterstablesfilamentfilament-pluginfilter-sets

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kingmaker-filament-filter-sets/health.svg)

```
[![Health](https://phpackages.com/badges/kingmaker-filament-filter-sets/health.svg)](https://phpackages.com/packages/kingmaker-filament-filter-sets)
```

###  Alternatives

[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

728176.2k14](/packages/tallstackui-tallstackui)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

274333.4k9](/packages/croustibat-filament-jobs-monitor)[a2insights/filament-saas

Filament Saas for A2Insights

191.7k](/packages/a2insights-filament-saas)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)[andreia/filament-ui-switcher

Add a modal with options to switch between different UI layouts and styles (colors, fonts, font sizes).

246.4k](/packages/andreia-filament-ui-switcher)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
