For AI agents: the complete documentation index is available at https://wallarm.github.io/design-system/llms.txt, the full documentation bundle is available at https://wallarm.github.io/design-system/llms-full.txt, and this page is available as Markdown at https://wallarm.github.io/design-system/patterns/filtering.md.

Filtering

Components: FilterDropdown, FilterDropdownTrigger, FilterDropdownContent, FilterDropdownOption, FilterCascade, FilterCascadeTrigger, FilterCascadeContent, FilterCascadeCheckboxItem

+15 more

FilterInput, SearchInput, PageToolbar, Select, SelectInput, SelectSearchInput, SegmentedTabs, SegmentedControl, NumericBadge, Table, TableEmptyState, EmptyState, Dialog, Field, Button

Pick the control by the shape of the values; every filter applies on pick.

When to use

NeedUseNot
Text match on name or IDSearchInput in PageToolbarInput with a search icon
One status with countsSegmentedTabs + NumericBadgeFilterDropdown
One flat attribute, one valueFilterDropdown with allLabelSelect in a toolbar
One flat attribute, several valuesFilterDropdown multipleCheckbox rows
A hierarchy (organization › deployment › application)FilterCascadeNested DropdownMenus
Over four attributes, operators, AND/ORFilterInputFive FilterDropdowns
A value in a formSelect + SelectInput in FieldFilterDropdown
Pick rows from a large setDialog width={960} + selectable TableA huge multi Select
Table or schema viewSegmentedControl with iconsTabs

There is no FilterBar, PageFilters or Combobox (use Select + useSelectSearch), and no onApply prop.

Rules

Filter bar layout

  • PageToolbar owns the 24px gutter and 12px gap. Never add gap-*, px-* or py-* to it.
  • Wrap SearchInput and the filters in one <div className='flex items-center gap-8'>.
  • SearchInput is w-[320px] in a toolbar, flex-1 in a dialog.
  • A view toggle goes last with className='ml-auto'.
  • Never set a width on filter triggers; they hug their text up to 180px.
  • Never stack two SegmentedTabs in one toolbar.

FilterDropdown

  • Always give it a label; it names the trigger and aria-label.
  • If the attribute is exclusive, use allLabel («All …» resets). If values combine, use multiple (OR-ed).
  • Build collection with createListCollection({ items, groupBy }).
  • Render options from useFilterDropdown().groups in a child component so they follow the search.
  • details.value of [] means unset. Pass counts as hint.
  • Never put FilterDropdown in a form or add an Apply button to a filter menu.

FilterCascade

  • Import all cascade parts from @wallarm-org/design-system/FilterCascade, never the root.
  • Build collection with createFilterCascadeCollection(items, accessors); plain { value, label, children } items need no accessors.
  • If a level loads on demand, pass loadChildren and mark parents hasChildren. If a parent is pickable, pass parentLabel.
  • If the menu needs a toggle ("Own only"), use FilterCascadeCheckboxItem in FilterCascadeSection; you keep its state.
  • Never leave a description empty; show "No policies" for zero.

FilterInput

  • Pass fields (name, label, type, values) and value / onChange(ExprNode | null). Its menus and chips are built in.

Searchable select

  • Put SelectSearchInput in SelectHeader, wired to useSelectSearch. Pass filteredCollection to Select and render it, so arrow keys skip hidden options.
  • If the menu must match the trigger, pass positioning={{ sameWidth: true }} and SelectPositioner className='min-w-full max-w-full'; otherwise it is 240–320px.
  • Option icons: set icon on each item.
  • For several values use SelectInput multiple. SelectButtonTag is a trigger, not a chip list.

Picker dialog

  • Use Dialog width={960}; there is no DIALOG_SIZES.
  • Dialog parts own the 24px gutter. Never pad them. DialogBody has no className: put flex flex-col gap-8 on a child div, search and tabs in flex items-center gap-12.
  • Pass getRowId so selection survives search and paging.
  • Primary is disabled "Add users" until rows are picked, then "Add 1 user", "Add 3 users".

Examples

A filter bar over a table: search, a multiple and a single filter, a scope chip, and the view toggle last.

Every pick applies at once. When the filters match nothing, the table offers "Reset filters", which clears the search and every filter.

From eight options a filter menu gets a search, and its options follow the query.

Options are grouped by deployment and carry attack counts. On reopen, picked options are pinned under «Selected»; a query with no match shows an empty message and keeps the menu open.

A scope chip whose applications load on demand and whose deployments can be picked.

Each option shows its policy count, "No policies" for zero. ✕ on the trigger returns to every scope, not one level up.

A searchable select in a form, with the menu matching the trigger.

A settings field saves on pick, with no Save button. A query with no match shows SelectEmptyState and keeps the menu open.

A picker dialog whose primary counts the selection: disabled "Add users", then "Add 2 users".

Search and status tabs sit over a selectable Table. Picked rows stay picked while the search changes, because rows are keyed by getRowId.

States

StateShowExample component
UnsetSingle: allLabel; multi: labelFilterDropdownTrigger
One value / several"Type • Lua" / "Type • 2", built in; never custom text or a tag per valueFilterDropdownTrigger
Reset one filterMulti: ✕ or Backspace; single: «All». No per-filter Reset buttonFilterDropdown
Reset scope✕ returns to the page default, not one level upFilterCascadeTrigger
8+ optionsSearch appears (searchThreshold)FilterDropdownSearch, SelectSearchInput
Menu search, no matchEmpty message; menu stays openFilterDropdownEmpty, SelectEmptyState
Cascade level loading or failedBuilt-in loading rows, then RetryFilterCascade
Filters match no rowstype='collection-empty' + outline neutral "Reset filters"; never a create CTATableEmptyState
Default valuePinned first in a "Suggested" groupSelectGroup
Select on settings pageSaves on pick, toast; no Save buttonSelect, Toast
Picker runningPrimary loading, dialog open; on success close and toast "3 users added"Button, Dialog
Picker, no matchEmptyState type='collection-empty' as a direct Table child; TableEmptyState is too tallEmptyState
Picker, already a memberLeave the row out of dataTable

What your app owns

You ownThe DS owns
Applying details.value to your dataFilter values and trigger text
URL sync (no router integration)Nothing
"Reset all": every filter [], search ''Per-filter clear
Option counts (hint, getDescription); a pinned option goes first in its own categoryRendering them
Scope dots: size-6 rounded-full span, bg-badge-violet-strong / -sky-strong / -teal-strong, via getIconThe icon slot
Server search: debounce query, refetch dataClient filtering only
Picker selection across pages: keep rowSelection keys (row ids) when data changesCheckbox column
Picker user cell (name, muted email): see Entity tableNothing