PHPackages                             cboxdk/statamic-filter-builder - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cboxdk/statamic-filter-builder

ActiveStatamic-addon[Utility &amp; Helpers](/categories/utility)

cboxdk/statamic-filter-builder
==============================

Build advanced collection filters and sort orders through the Statamic control panel.

v2.0.0(2mo ago)033MITPHPPHP ^8.2CI passing

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/cboxdk/statamic-filter-builder)[ Packagist](https://packagist.org/packages/cboxdk/statamic-filter-builder)[ Docs](https://github.com/cboxdk/statamic-filter-builder)[ RSS](/packages/cboxdk-statamic-filter-builder/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Filter Builder for Statamic
===========================

[](#filter-builder-for-statamic)

A Statamic addon that lets you build dynamic collection filters and sort orders through the control panel. Define which fields can be filtered, set operators and values (including dynamic Antlers variables), and apply them to your collection tags — all without writing custom query scopes.

The Problem
-----------

[](#the-problem)

You want editors to control which entries appear in a listing — filtering by category, date range, or status — without hardcoding query parameters in templates or writing custom scopes for every use case.

The Solution
------------

[](#the-solution)

Add the `filter_builder` fieldtype to your blueprint, select which collections it applies to, and editors get a visual filter builder in the CP:

```
- handle: filters
  field:
    type: filter_builder
    mode: config
    collections:
      - articles
```

Then use it in your templates:

```
{{ collection:articles :filter_builder="filters" }}
    {{ title }}
{{ /collection:articles }}
```

### Site Builder Pattern

[](#site-builder-pattern)

Use **field mode** to let editors choose both the collection and its filters dynamically — ideal for reusable listing components:

```
- handle: collections
  field:
    type: collections
- handle: filters
  field:
    type: filter_builder
    mode: field
    field: collections
- handle: sorting
  field:
    type: sort_builder
    mode: field
    field: collections
```

```
{{ collection :from="collections" :filter_builder="filters" :sort="sorting" }}
    {{ title }}
{{ /collection }}
```

Features
--------

[](#features)

- **Filter Builder fieldtype** — visual UI for building collection filters with field-aware operators
- **Sort Builder fieldtype** — companion field for defining sort orders
- **Dynamic variables** — reference Antlers cascade values in filter conditions
- **Relationship support** — filter by entries, terms, and users fields
- **Auto-scope injection** — automatically adds the query scope when `filter_builder` param is present

Quick Start
-----------

[](#quick-start)

```
composer require cboxdk/statamic-filter-builder
```

No config files, no publishing, no migrations.

Documentation
-------------

[](#documentation)

See [DOCUMENTATION.md](DOCUMENTATION.md) for full setup guide, field type reference, template usage, and configuration options.

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

[](#requirements)

- PHP 8.2+
- Statamic 6.x
- Laravel 12+

Development
-----------

[](#development)

```
composer check    # Pint + PHPStan level 9 + Pest
```

License
-------

[](#license)

MIT

Credits
-------

[](#credits)

Originally designed and developed by [Sylvester Damgaard](https://github.com/cboxdk) while working at [TV2 Regionerne](https://github.com/tv2regionerne/statamic-filter-builder). Now maintained and actively developed under [Cbox](https://github.com/cboxdk) with a full rewrite for Statamic 6, Laravel 12, and Vue 3.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance85

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.2% 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

77d ago

### Community

Maintainers

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

---

Top Contributors

[![jacksleight](https://avatars.githubusercontent.com/u/126740?v=4)](https://github.com/jacksleight "jacksleight (45 commits)")[![sylvesterdamgaard](https://avatars.githubusercontent.com/u/2431914?v=4)](https://github.com/sylvesterdamgaard "sylvesterdamgaard (17 commits)")[![ryanmitchell](https://avatars.githubusercontent.com/u/51899?v=4)](https://github.com/ryanmitchell "ryanmitchell (5 commits)")[![duncanmcclean](https://avatars.githubusercontent.com/u/19637309?v=4)](https://github.com/duncanmcclean "duncanmcclean (1 commits)")

---

Tags

filtercollectionsortaddonstatamicfieldtype

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cboxdk-statamic-filter-builder/health.svg)

```
[![Health](https://phpackages.com/badges/cboxdk-statamic-filter-builder/health.svg)](https://phpackages.com/packages/cboxdk-statamic-filter-builder)
```

###  Alternatives

[visuellverstehen/statamic-classify

A useful helper to add CSS classes to all HTML tags generated by the bard editor.

20116.8k](/packages/visuellverstehen-statamic-classify)[marcorieser/statamic-livewire

A Laravel Livewire integration for Statamic.

2381.5k10](/packages/marcorieser-statamic-livewire)[withcandour/aardvark-seo

Save time and get your Statamic site to rank better with the SEO addon for Statamic.

13128.3k](/packages/withcandour-aardvark-seo)

PHPackages © 2026

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