Filters

General

This addon includes several prebuilt but easily modifiable filters. Each filter is a Livewire component that can be placed anywhere on your page. They are minimally styled using TailwindCSS. To avoid conflicts with other Livewire components, all components in this addon are prefixed with lf-.

Properties

To function properly, each filter requires a few properties:

  • blueprint: Specify the collection and the blueprint containing the field in the format collection.blueprint. For instance, if you have a collection with the handle pages and a blueprint with the same handle, set the property as blueprint="pages.pages".

  • field: The handle of the field you wish to filter by. For example, field="title".

  • condition: The condition for filtering. For instance condition="contains". A comprehensive list of conditions can be found in Statamic's documentation. Use condition="taxonomy" for filtering by a taxonomy, and condition="query_scope" for filtering entries using a query scope.

Additional Properties for Specific Filters

  • Taxonomy filters: These can utilize the modifier property to set the relationship as any, all, or not.

  • Query scope filters: You need to use the modifier property to set the query scope to use.

  • Range Filter: This filter uses max, min, and default properties to define the range of available values.

Available filters