Filter form
v0.10.0Filters kept in the URL: a GET form that applies itself after typing stops or at once on a pick, resets the page, and works without JavaScript.
Filter form search
Install
npx shadcn add @syncrobotic/filter-form Overview
When to use
- A catalog or log whose filtered view should be shareable and survive Back.
- Any page where changing a filter resets the page number.
Use something else
- Filters on data already in the browser: filter in state, as Data grid does.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Filter form facets
Usage rules
- Filters that change what a page lists belong in the URL: shareable, bookmarkable, undone with Back.
- Typing applies a moment after it stops; a pick applies at once. The page number resets.
- It is a plain GET form, so it works before JavaScript loads. Pass onNavigate to stay client-side (Next.js: router.push / router.replace with scroll: false).
Changelog
- 0.10.02026-11-18New.