Koala logo Design
Esc
No matches for “
↑↓ navigate open Esc close
Components List filters

List filters

A search + filters + sort row that keeps the filters inline until they'd no longer fit, then collapses them behind a single funnel button that opens an anchored popover. Width-driven (a ResizeObserver), not a fixed breakpoint — so it collapses exactly when the row runs out of room, whatever the filter count.

<koala-list-filters>

Canonical

One row: search (grows), filters, sort. While the dropdowns fit they sit inline; the moment they'd overflow they collapse into the funnel button, which opens the same dropdowns in an anchored popover.

Behaviour

Fits — inline
Filters render in the row beside search + sort.
Doesn't fit — collapsed
Filters fold into a funnel button (count badge); clicking opens the popover.

Props

2 attributes
Attribute Values Notes
filter-countintActive-filter count, shown as a badge on the collapsed funnel icon.
trigger-idstringId of the collapsed trigger (default filter-button) so a page can name it in an Alpine-AJAX x-target.
breakpointMedium, LargeDeprecated — ignored. Collapse is width-driven now; kept only so old call sites still bind.

The parent <form> must declare x-data="koalaListFilters()" and lay out a single row tagged data-filter-bar containing data-filter-search and (optionally) data-filter-sort. The component measures these to decide when to collapse.

Do & don't

Do Put search, <koala-list-filters> and sort in one data-filter-bar row. Each checkbox auto-submits via $el.form.requestSubmit().
Don't Don't let the filters wrap onto a second line. If they don't fit, they should collapse to the funnel icon — that's what the component does for you.