SuperFilter
Controlled quick and popover filters. Quick filters apply immediately on desktop; popover changes apply together. Clear values applies immediately and closes the popover. Mobile puts every filter in the popover. The popover is at least 250px tall, with Clear and Apply pinned below its scrollable controls. Selects expand inside that same scroll area instead of creating another one. Amount ranges accept nonnegative numbers with up to eight decimal places; Apply stays disabled if Min exceeds Max.
Playground
Live preview
Applied: {}
Examples
Quick selects only · no desktop filter icon
Applied: {}
Long selected mission title · capped quick filter
Applied: {"mission":"long"}
Multiple mission categories · one or several selections
Applied: {"categories":["research","testing"]}
Mission discovery · multiple categories and languages
Applied: {"categories":["research"],"languages":["en","es"]}
Popover only · text and split range
Applied: {}
Searchable select inside the filter popover
Applied: {}
Mixed quick and popover filters
Applied: {}
Applied filters · green controls and count pill
Applied: {"category":"research","country":"ES","reward":{"min":"25","max":"100"}}
Custom control slots · distinct quick and popover renderings
Applied: {}
Checkbox group · multiple selected values
Applied: {"missionStates":["open","closing"]}
Radio group · one selected value
Applied: {"audience":"global"}
Choice slots with quick and text filters
Applied: {}
Sort only · default selection
Applied: {}
Sort only · applied count pill
Applied: {"sort":"reward"}
Filters and sort · applied alternate order
Applied: {"category":"research","sort":"reward"}
Mobile layout · every filter inside popover
Open on a narrow viewport and scroll the filter panel by touch to reach sorting, Clear and Apply.
Applied: {}
Code
const filters: SuperFilterDefinition[] = [
{ id: "category", title: "Category", kind: "select", quick: true,
options: categories, placeholder: "All categories" },
{ id: "reward", title: "Reward range", kind: "range",
minLabel: "Min (USDC)", maxLabel: "Max (USDC)" },
{ id: "custom", title: "Custom control", kind: "slot", emptyValue: "",
renderControl: ({ value, onChange, variant }) => <MyControl value={value} onChange={onChange} variant={variant} /> },
];
const sort = { id: "sort", title: t("sort_by"), defaultValue: "newest",
options: [{ value: "newest", label: t("newest") },
{ value: "reward", label: t("highest_reward") }] };
<SuperFilter filters={filters} sort={sort} values={values} onApply={setValues} />Used in
Includes use through shared UI components.
