FilterBar: the one row above a list
FilterBar is the row above every list or board in an app built on Meadowstack: the pills of one filter on the left, the search on the right, and a named button for each further filter after it. When the row runs out of room, the search shrinks first and then the pills take a line of their own, so the row stacks before anything scrolls.
By Bohuslav PoláčekChecked
What it is for, and what the preview shows
FilterBar is the row between a list's header and the list. It holds what narrows the list: the pills of one filter (a status, or the saved views of ViewPills), a search field, and a button for each further filter, named after what it filters. It goes into the screen's toolbar or viewBar, the one row the root AGENTS.md allows above the content.
The preview is the invoice list of Kestrel, an accounting practice in the demo, twice. With nothing filtered, All is on and every status pill carries its count. With Overdue on and the age set, the counts follow the age, and the Age button names its value, so the filter reads without opening it. Each pill and each button sets a parameter in the address, which the card shows.
The rules, and where each one lives
- Pills left, search right, actions after. The root
AGENTS.md(Tables, filter bars) anddocs/principles.md(Lightness) give the order; the manifest repeats it as FilterBar'swhen. - A second filter group is a named button. One group of pills a bar; every other filter is a button that names what it filters and, once set, its value ("Age: 1 to 14 days"), as
AGENTS.mdputs it. - One row above the content. Only the header and one row of controls sit above a list, 48px tall at most. The runtime audit's
control-rowsfails a screen with a second row or a taller one, and allows two lines on a phone (docs/audit.md, decision 0009). - Stack before scroll. The bar measures its content: the search shrinks to 160px, then the pills take their own line; pills that still overflow fade at the cut edge and show chevrons on hover (
AGENTS.md). - No pills in a header. A
SegmentedControlinside aScreen'sheaderfails the static audit (segmented-in-header); the pills live in the bar. - Kit controls only. An own
<input>or<button>in an app failsnpm run check:markup(bare-control); FilterBar's search comes labelled.
What AI coding tools write instead
The manifest's replaces names it: a hand-built row of filter buttons and a search input. An assistant writes a flex row with a few toggle buttons and an <input type="search">, and each new filter becomes one more button in the row.
The row holds until the list gets a third filter or meets a phone. Then it wraps into two ragged lines or scrolls sideways, the search keeps its full width while the pills squeeze, and every screen orders its controls differently, so people look for the search in a new place on each list. The filter usually lives in component state, so a reload or a shared link loses it. FilterBar fixes the order and the stacking, and the lists in the demo keep each filter in the address.
How to use it
The props, from FilterBar's signature:
searchandonSearchChange: the search field's value and its setter.searchLabel: the search field's accessible name and its placeholder ("Search by client, number or reference").children: the pills on the left, aSegmentedControlfor a filter applied in place or ViewPills for saved views.actions: what comes after the search: the named filter buttons, each a smallButtoninside aPicker, and a button that clears a filter set from elsewhere.className.
A Select in actions takes the toolbar's size by itself. Render the list under the bar in DataTable, with isFiltered set while a filter is on, so an empty result offers to clear it. Both belong to the list pattern.
Its entry in the manifest
| Manifest field | FilterBar |
|---|---|
| What it is | Search, filters and view controls above a table or board. |
| Use it for | Above every list or board: pills left, search right, actions after. |
| Not for | For a record's tabs (Tabs) |
| It replaces | A hand-built row of filter buttons and a search input |
| Screen types | Index; Worklist; Workspace |
| Import | import { FilterBar } from "@meadowstack-studio/kit"; |
Where it runs in the example apps
| Example app | Modules that render it |
|---|---|
| An app for a packaging and print company | Jobs, Print file editor, Quotes, Cutting dies, Colour |
| An app for a studio or agency | Capacity, Tasks, Finance |
| An app for a haulage company | Freight, Drivers, Costs |
| An app for a roastery with an online shop | Roasting, Shop, Wholesale |
| An app for a sports club | Club, Coaching, Rentals |
| An app for a construction company | Sites, Crews, Machines, Site diary, Drawings, Budget |
| An app for an accounting office | Documents, Bookkeeping, Official mail, Invoicing |
| An app for restaurants and venues | Kitchen, People |
| An app for one person | Brand deals, Content, Money, Training |
How the starter calls it
<FilterBar search={search} onSearchChange={setSearch} searchLabel="Search title, supplier, number, person">
<ViewPills
label="Views"
current={status ?? "all"}
views={[
{ id: "all", label: "All", href: viewHref(null), count: loaded ? all.length : undefined },
...statusOrder.map((value) => ({
id: value,
label: statusMeta[value].filter,
href: viewHref(value),
count: loaded ? all.filter((item) => item.status === value).length : undefined,
})),
]}
/>
</FilterBar>Questions
What happens when the filters do not fit in one row?
The bar measures its content. The search shrinks to 160px first, then the pills move to a line of their own; pills that still do not fit fade at the cut edge and scroll, with chevrons on hover.
Should a second filter be another row of pills?
No. A bar has one group of pills. Every other filter is a button named after what it filters, and once it is set the button shows its value, like Age: 1 to 14 days.
Where does the filter state live?
In the address, in the demo's lists: each pill and each filter button sets a query parameter, so a reload, the back button and a shared link keep the same view.
Is FilterBar the place for list, board and calendar?
No. Another presentation of the same page is one DisplayMenu button in the same row, and saved views of the same list are ViewPills inside the bar.
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app