> 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.

# Filtering

**Components:** [`FilterDropdown`](https://wallarm.github.io/design-system/components/filter-dropdown.md), [`FilterDropdownTrigger`](https://wallarm.github.io/design-system/components/filter-dropdown.md), [`FilterDropdownContent`](https://wallarm.github.io/design-system/components/filter-dropdown.md), [`FilterDropdownOption`](https://wallarm.github.io/design-system/components/filter-dropdown.md), [`FilterCascade`](https://wallarm.github.io/design-system/components/filter-cascade.md), [`FilterCascadeTrigger`](https://wallarm.github.io/design-system/components/filter-cascade.md), [`FilterCascadeContent`](https://wallarm.github.io/design-system/components/filter-cascade.md), [`FilterCascadeCheckboxItem`](https://wallarm.github.io/design-system/components/filter-cascade.md)


+15 more

[`FilterInput`](https://wallarm.github.io/design-system/components/filter-input.md), [`SearchInput`](https://wallarm.github.io/design-system/components/search-input.md), [`PageToolbar`](https://wallarm.github.io/design-system/components/page.md), [`Select`](https://wallarm.github.io/design-system/components/select.md), [`SelectInput`](https://wallarm.github.io/design-system/components/select.md), [`SelectSearchInput`](https://wallarm.github.io/design-system/components/select.md), [`SegmentedTabs`](https://wallarm.github.io/design-system/components/segmented-tabs.md), [`SegmentedControl`](https://wallarm.github.io/design-system/components/segmented-control.md), [`NumericBadge`](https://wallarm.github.io/design-system/components/numeric-badge.md), [`Table`](https://wallarm.github.io/design-system/components/table.md), [`TableEmptyState`](https://wallarm.github.io/design-system/components/table.md), [`EmptyState`](https://wallarm.github.io/design-system/components/empty-state.md), [`Dialog`](https://wallarm.github.io/design-system/components/dialog.md), [`Field`](https://wallarm.github.io/design-system/components/field.md), [`Button`](https://wallarm.github.io/design-system/components/button.md)

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

## When to use

| Need                                                  | Use                                       | Not                        |
| ----------------------------------------------------- | ----------------------------------------- | -------------------------- |
| Text match on name or ID                              | `SearchInput` in `PageToolbar`            | `Input` with a search icon |
| One status with counts                                | `SegmentedTabs` + `NumericBadge`          | `FilterDropdown`           |
| One flat attribute, one value                         | `FilterDropdown` with `allLabel`          | `Select` in a toolbar      |
| One flat attribute, several values                    | `FilterDropdown multiple`                 | `Checkbox` rows            |
| A hierarchy (organization › deployment › application) | `FilterCascade`                           | Nested `DropdownMenu`s     |
| Over four attributes, operators, AND/OR               | `FilterInput`                             | Five `FilterDropdown`s     |
| A value in a form                                     | `Select` + `SelectInput` in `Field`       | `FilterDropdown`           |
| Pick rows from a large set                            | `Dialog width={960}` + selectable `Table` | A huge multi `Select`      |
| Table or schema view                                  | `SegmentedControl` with icons             | `Tabs`                     |

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.

```tsx
import { useState } from 'react';
import { Badge } from '@wallarm-org/design-system/Badge';
import { Button } from '@wallarm-org/design-system/Button';
import { EmptyState, EmptyStateActions, EmptyStateDescription, EmptyStateIllustration, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { createFilterCascadeCollection, FilterCascade, FilterCascadeContent, FilterCascadeTrigger, type FilterCascadeValueChangeDetails } from '@wallarm-org/design-system/FilterCascade';
import { FilterDropdown, FilterDropdownAllOption, FilterDropdownContent, FilterDropdownFooter, FilterDropdownOption, FilterDropdownTrigger, type FilterDropdownValueChangeDetails, useFilterDropdown } from '@wallarm-org/design-system/FilterDropdown';
import { FilterX, List, SearchX, Workflow } from '@wallarm-org/design-system/icons';
import { Page, PageContent, PageDescription, PageHeader, PageHeaderGroup, PageTitle, PageToolbar } from '@wallarm-org/design-system/Page';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { SegmentedControl, SegmentedControlItem } from '@wallarm-org/design-system/SegmentedControl';
import { createListCollection } from '@wallarm-org/design-system/Select';
import { type TableCellContext, type TableColumnDef, Table, TableEmptyState } from '@wallarm-org/design-system/Table';

export const Default = () => {
  const [query, setQuery] = useState('');
  const [types, setTypes] = useState<string[]>([]);
  const [status, setStatus] = useState<string[]>([]);
  const [scope, setScope] = useState<string[]>([]);
  const [view, setView] = useState('table');

  const TYPE_LABELS: Record<AttackType, string> = {
    sqli: 'SQL injection',
    xss: 'XSS',
    rce: 'RCE',
    ptrav: 'Path traversal',
    ssrf: 'SSRF',
  };
  const typeItems = Object.entries(TYPE_LABELS).map(([value, label]) => ({
    value,
    label,
    count: ATTACKS.filter(attack => attack.type === value).length,
  }));
  const typeOptions = createListCollection({ items: typeItems });
  const statusOptions = createListCollection({
    items: [
      { value: 'blocked', label: 'Blocked' },
      { value: 'monitored', label: 'Monitored' },
    ],
  });
  const scopeOptions = createFilterCascadeCollection(SCOPES);

  const renderType = ({ row }: TableCellContext<Attack, unknown>) => TYPE_LABELS[row.original.type];

  const renderStatus = ({ row }: TableCellContext<Attack, unknown>) =>
    row.original.status === 'blocked' ? (
      <Badge variant='dotted' type='secondary' color='red'>
        Blocked
      </Badge>
    ) : (
      <Badge variant='dotted' type='secondary' color='yellow'>
        Monitored
      </Badge>
    );

  const columns: TableColumnDef<Attack>[] = [
    { accessorKey: 'type', header: 'Type', size: 160, cell: renderType },
    { accessorKey: 'path', header: 'Request', size: 280 },
    { accessorKey: 'source', header: 'Source IP', size: 160 },
    { accessorKey: 'status', header: 'Status', size: 140, cell: renderStatus },
    { accessorKey: 'hits', header: 'Hits', size: 100 },
  ];

  const search = query.trim().toLowerCase();
  const rows = ATTACKS.filter(
    attack =>
      (attack.path.toLowerCase().includes(search) || attack.source.includes(search)) &&
      (types.length === 0 || types.includes(attack.type)) &&
      (status.length === 0 || status.includes(attack.status)) &&
      (scope.length === 0 || attack.deployment === scope[0]) &&
      (scope.length < 2 || attack.application === scope[1]),
  );

  const handleTypesChange = (details: FilterDropdownValueChangeDetails) => setTypes(details.value);
  const handleStatusChange = (details: FilterDropdownValueChangeDetails) =>
    setStatus(details.value);
  const handleScopeChange = (details: FilterCascadeValueChangeDetails) => setScope(details.value);

  const handleReset = () => {
    setQuery('');
    setTypes([]);
    setStatus([]);
    setScope([]);
  };

  return (
    <Page name='attacks' fullSize fixedHeight data-testid='attacks-page'>
      <PageHeader>
        <PageHeaderGroup className='flex-1'>
          <PageTitle>Attacks</PageTitle>
          <PageDescription>
            Malicious requests the filtering nodes detected in the last 7 days.
          </PageDescription>
        </PageHeaderGroup>
      </PageHeader>

      <PageToolbar>
        <div className='flex items-center gap-8'>
          <SearchInput
            value={query}
            onChange={setQuery}
            placeholder='Search request or IP'
            className='w-[320px]'
            data-testid='attacks-search'
          />
          <FilterDropdown
            label='Type'
            multiple
            collection={typeOptions}
            value={types}
            onValueChange={handleTypesChange}
            data-testid='attacks-type-filter'
          >
            <FilterDropdownTrigger />
            <FilterDropdownContent>
              {/* Under 8 options the menu has no search, so the options are listed directly.
                  From 8, render them from `useFilterDropdown().groups` in a child component. */}
              {typeItems.map(item => (
                <FilterDropdownOption key={item.value} item={item} hint={item.count} />
              ))}
              <FilterDropdownFooter />
            </FilterDropdownContent>
          </FilterDropdown>
          <FilterDropdown
            label='Status'
            allLabel='All statuses'
            collection={statusOptions}
            value={status}
            onValueChange={handleStatusChange}
            data-testid='attacks-status-filter'
          >
            <FilterDropdownTrigger />
            <FilterDropdownContent>
              <FilterDropdownAllOption />
              {statusOptions.items.map(item => (
                <FilterDropdownOption key={item.value} item={item} />
              ))}
            </FilterDropdownContent>
          </FilterDropdown>
          <FilterCascade
            label='Scope'
            collection={scopeOptions}
            parentLabel='Deployment level'
            value={scope}
            onValueChange={handleScopeChange}
            data-testid='attacks-scope-filter'
          >
            <FilterCascadeTrigger />
            <FilterCascadeContent />
          </FilterCascade>
        </div>
        <SegmentedControl
          value={view}
          onChange={setView}
          className='ml-auto'
          data-testid='attacks-view-toggle'
        >
          <SegmentedControlItem value='table'>
            <List />
            <span className='sr-only'>Table view</span>
          </SegmentedControlItem>
          <SegmentedControlItem value='schema'>
            <Workflow />
            <span className='sr-only'>Schema view</span>
          </SegmentedControlItem>
        </SegmentedControl>
      </PageToolbar>

      <PageContent>
        <Table
          aria-label='Attacks'
          data={rows}
          columns={columns}
          getRowId={getAttackId}
          data-testid='attacks-table'
        >
          <TableEmptyState>
            <EmptyState type='collection-empty' data-testid='attacks-no-results'>
              <EmptyStateIllustration>
                <SearchX />
              </EmptyStateIllustration>
              <EmptyStateMessage>
                <EmptyStateTitle>No results found</EmptyStateTitle>
                <EmptyStateDescription>
                  No attacks match your search or filters.
                </EmptyStateDescription>
              </EmptyStateMessage>
              <EmptyStateActions>
                <Button size='medium' variant='outline' color='neutral' onClick={handleReset}>
                  <FilterX />
                  Reset filters
                </Button>
              </EmptyStateActions>
            </EmptyState>
          </TableEmptyState>
        </Table>
      </PageContent>
    </Page>
  );
};
```

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.

```tsx
import { useState } from 'react';
import { FilterDropdown, FilterDropdownTrigger, type FilterDropdownValueChangeDetails } from '@wallarm-org/design-system/FilterDropdown';
import { createListCollection } from '@wallarm-org/design-system/Select';

export const SearchableFilter = () => {
  const [applications, setApplications] = useState<string[]>([]);
  const applicationOptions = createListCollection({
    items: APPLICATIONS,
    groupBy: item => item.deployment,
  });

  const handleApplicationsChange = (details: FilterDropdownValueChangeDetails) =>
    setApplications(details.value);

  return (
    <div className='p-24'>
      <FilterDropdown
        label='Application'
        multiple
        collection={applicationOptions}
        value={applications}
        onValueChange={handleApplicationsChange}
        data-testid='applications-filter'
      >
        <FilterDropdownTrigger />
        <ApplicationMenu />
      </FilterDropdown>
    </div>
  );
};
```

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.

```tsx
import { useState } from 'react';
import { createFilterCascadeCollection, FilterCascade, FilterCascadeContent, FilterCascadeItems, type FilterCascadeLevelData, FilterCascadeLevels, FilterCascadeParentItem, FilterCascadeSearch, FilterCascadeTrigger, type FilterCascadeValueChangeDetails } from '@wallarm-org/design-system/FilterCascade';

export const ScopeFilter = () => {
  const [scope, setScope] = useState<string[]>([]);
  const scopes = createFilterCascadeCollection(DEPLOYMENTS, {
    getValue: node => node.id,
    getLabel: node => node.name,
    hasChildren: node => node.kind === 'deployment',
    getIcon: node => (
      <span
        aria-hidden
        className={
          node.kind === 'deployment'
            ? 'size-6 rounded-full bg-badge-sky-strong'
            : 'size-6 rounded-full bg-badge-teal-strong'
        }
      />
    ),
    getDescription: node =>
      node.policies === 0
        ? 'No policies'
        : `${node.policies} ${node.policies === 1 ? 'policy' : 'policies'}`,
  });

  const loadApplications = (deployment: ScopeNode) => fetchApplications(deployment.id);
  const handleScopeChange = (details: FilterCascadeValueChangeDetails) => setScope(details.value);
  const renderLevel = (level: FilterCascadeLevelData) =>
    level.depth === 0 ? (
      <FilterCascadeItems />
    ) : (
      <>
        <FilterCascadeParentItem />
        <FilterCascadeItems />
      </>
    );

  return (
    <div className='p-24'>
      <FilterCascade
        label='Scope'
        collection={scopes}
        loadChildren={loadApplications}
        parentLabel='Deployment level'
        value={scope}
        onValueChange={handleScopeChange}
        data-testid='scope-filter'
      >
        <FilterCascadeTrigger />
        <FilterCascadeContent>
          <FilterCascadeSearch placeholder='Search' />
          <FilterCascadeLevels>{renderLevel}</FilterCascadeLevels>
        </FilterCascadeContent>
      </FilterCascade>
    </div>
  );
};
```

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.

```tsx
import { useState } from 'react';
import { Field, FieldDescription, FieldLabel } from '@wallarm-org/design-system/Field';
import { createListCollection, Select, SelectContent, SelectEmptyState, SelectHeader, SelectInput, SelectOption, SelectOptionIndicator, SelectOptionText, SelectPositioner, SelectSearchInput, useSelectSearch } from '@wallarm-org/design-system/Select';

export const SearchableSelect = () => {
  const [timeZone, setTimeZone] = useState('UTC');
  const timeZones = createListCollection({ items: TIME_ZONES });
  const { searchValue, onSearchChange, filteredCollection } = useSelectSearch(timeZones);

  const handleTimeZoneChange = (details: { value: string[] }) => {
    const next = details.value[0] ?? timeZone;
    setTimeZone(next);
    onTimeZoneSaved(next);
  };

  return (
    <div className='w-[400px] p-24'>
      <Field>
        <FieldLabel>Time zone</FieldLabel>
        <Select
          collection={filteredCollection}
          value={[timeZone]}
          positioning={{ sameWidth: true }}
          onValueChange={handleTimeZoneChange}
          data-testid='timezone-select'
        >
          <SelectInput placeholder='Choose a time zone' data-testid='timezone-input' />
          <SelectPositioner className='min-w-full max-w-full'>
            <SelectHeader>
              <SelectSearchInput value={searchValue} onChange={onSearchChange} />
            </SelectHeader>
            <SelectContent>
              {filteredCollection.size === 0 ? (
                <SelectEmptyState description={`No results for "${searchValue}"`} />
              ) : (
                filteredCollection.items.map(item => (
                  <SelectOption key={item.value} item={item}>
                    <SelectOptionText>{item.label}</SelectOptionText>
                    <SelectOptionIndicator />
                  </SelectOption>
                ))
              )}
            </SelectContent>
          </SelectPositioner>
        </Select>
        <FieldDescription>
          Dates in reports and on the Attacks page use this time zone.
        </FieldDescription>
      </Field>
    </div>
  );
};
```

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`.

```tsx
import { useState } from 'react';
import { Avatar, AvatarContent, AvatarDescription, AvatarFallback, AvatarName } from '@wallarm-org/design-system/Avatar';
import { Button } from '@wallarm-org/design-system/Button';
import { Dialog, DialogBody, DialogClose, DialogContent, DialogFooter, DialogFooterControls, DialogHeader, DialogTitle } from '@wallarm-org/design-system/Dialog';
import { EmptyState, EmptyStateDescription, EmptyStateMessage, EmptyStateTitle } from '@wallarm-org/design-system/EmptyState';
import { UserPlus } from '@wallarm-org/design-system/icons';
import { NumericBadge } from '@wallarm-org/design-system/NumericBadge';
import { SearchInput } from '@wallarm-org/design-system/SearchInput';
import { SegmentedTabs, SegmentedTabsList, SegmentedTabsTrigger } from '@wallarm-org/design-system/SegmentedTabs';
import { type TableCellContext, type TableColumnDef, type TableRowSelectionState, Table } from '@wallarm-org/design-system/Table';

export const PickerDialog = () => {
  const [open, setOpen] = useState(false);
  const [query, setQuery] = useState('');
  const [status, setStatus] = useState('all');
  const [selection, setSelection] = useState<TableRowSelectionState>({});

  const renderMember = ({ row }: TableCellContext<Member, unknown>) => (
    <Avatar size='md'>
      <AvatarFallback name={row.original.name} />
      <AvatarContent>
        <AvatarName>{row.original.name}</AvatarName>
        <AvatarDescription>{row.original.email}</AvatarDescription>
      </AvatarContent>
    </Avatar>
  );

  const renderStatus = ({ row }: TableCellContext<Member, unknown>) =>
    row.original.status === 'active' ? 'Active' : 'Invited';

  const columns: TableColumnDef<Member>[] = [
    { accessorKey: 'name', header: 'User', size: 520, cell: renderMember },
    { accessorKey: 'status', header: 'Status', size: 200, cell: renderStatus },
  ];

  const search = query.trim().toLowerCase();
  const matching = MEMBERS.filter(
    member =>
      member.name.toLowerCase().includes(search) || member.email.toLowerCase().includes(search),
  );
  const activeCount = matching.filter(member => member.status === 'active').length;
  const invitedCount = matching.length - activeCount;
  const rows = status === 'all' ? matching : matching.filter(member => member.status === status);
  const count = Object.keys(selection).length;

  const handleOpenChange = (next: boolean) => {
    setOpen(next);
    if (!next) {
      setQuery('');
      setStatus('all');
      setSelection({});
    }
  };
  const handleOpen = () => setOpen(true);
  const handleAdd = () => {
    onAddUsers(Object.keys(selection));
    handleOpenChange(false);
  };

  return (
    <div className='p-24'>
      <Button size='medium' onClick={handleOpen} data-testid='members-add'>
        <UserPlus />
        Add users
      </Button>
      <Dialog open={open} onOpenChange={handleOpenChange} width={960} data-testid='members-picker'>
        <DialogContent>
          <DialogHeader>
            <DialogTitle>Add users to Security team</DialogTitle>
          </DialogHeader>
          <DialogBody>
            <div className='flex flex-col gap-8'>
              <div className='flex items-center gap-12'>
                <SearchInput
                  value={query}
                  onChange={setQuery}
                  placeholder='Search name or email'
                  className='flex-1'
                  data-testid='members-search'
                />
                <SegmentedTabs
                  value={status}
                  onChange={setStatus}
                  data-testid='members-status-tabs'
                >
                  <SegmentedTabsList>
                    <SegmentedTabsTrigger value='all'>
                      All <NumericBadge>{matching.length}</NumericBadge>
                    </SegmentedTabsTrigger>
                    <SegmentedTabsTrigger value='active'>
                      Active <NumericBadge>{activeCount}</NumericBadge>
                    </SegmentedTabsTrigger>
                    <SegmentedTabsTrigger value='invited'>
                      Invited <NumericBadge>{invitedCount}</NumericBadge>
                    </SegmentedTabsTrigger>
                  </SegmentedTabsList>
                </SegmentedTabs>
              </div>
              <Table
                aria-label='Users to add'
                data={rows}
                columns={columns}
                getRowId={getMemberId}
                rowSelection={selection}
                onRowSelectionChange={setSelection}
                data-testid='members-table'
              >
                {rows.length === 0 && (
                  <EmptyState type='collection-empty' data-testid='members-no-results'>
                    <EmptyStateMessage>
                      <EmptyStateTitle>No users found</EmptyStateTitle>
                      <EmptyStateDescription>No users match your search.</EmptyStateDescription>
                    </EmptyStateMessage>
                  </EmptyState>
                )}
              </Table>
            </div>
          </DialogBody>
          <DialogFooter>
            <DialogFooterControls>
              <DialogClose asChild>
                <Button variant='ghost' color='neutral' size='large'>
                  Cancel
                </Button>
              </DialogClose>
              <Button
                size='large'
                disabled={count === 0}
                onClick={handleAdd}
                data-testid='members-confirm'
              >
                {count === 0 ? 'Add users' : `Add ${count} ${count === 1 ? 'user' : 'users'}`}
              </Button>
            </DialogFooterControls>
          </DialogFooter>
        </DialogContent>
      </Dialog>
    </div>
  );
};
```

## States

| State                           | Show                                                                                          | Example component                           |
| ------------------------------- | --------------------------------------------------------------------------------------------- | ------------------------------------------- |
| Unset                           | Single: `allLabel`; multi: `label`                                                            | `FilterDropdownTrigger`                     |
| One value / several             | "Type • Lua" / "Type • 2", built in; never custom text or a tag per value                     | `FilterDropdownTrigger`                     |
| Reset one filter                | Multi: ✕ or Backspace; single: «All». No per-filter Reset button                              | `FilterDropdown`                            |
| Reset scope                     | ✕ returns to the page default, not one level up                                               | `FilterCascadeTrigger`                      |
| 8+ options                      | Search appears (`searchThreshold`)                                                            | `FilterDropdownSearch`, `SelectSearchInput` |
| Menu search, no match           | Empty message; menu stays open                                                                | `FilterDropdownEmpty`, `SelectEmptyState`   |
| Cascade level loading or failed | Built-in loading rows, then Retry                                                             | `FilterCascade`                             |
| Filters match no rows           | `type='collection-empty'` + outline neutral "Reset filters"; never a create CTA               | `TableEmptyState`                           |
| Default value                   | Pinned first in a "Suggested" group                                                           | `SelectGroup`                               |
| Select on settings page         | Saves on pick, toast; no Save button                                                          | `Select`, `Toast`                           |
| Picker running                  | Primary `loading`, dialog open; on success close and toast "3 users added"                    | `Button`, `Dialog`                          |
| Picker, no match                | `EmptyState type='collection-empty'` as a direct `Table` child; `TableEmptyState` is too tall | `EmptyState`                                |
| Picker, already a member        | Leave the row out of `data`                                                                   | `Table`                                     |

## What your app owns

| You own                                                                                                                    | The DS owns                    |
| -------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| Applying `details.value` to your data                                                                                      | Filter 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 `category`                                 | Rendering them                 |
| Scope dots: `size-6 rounded-full` span, `bg-badge-violet-strong` / `-sky-strong` / `-teal-strong`, via `getIcon`           | The icon slot                  |
| Server search: debounce `query`, refetch `data`                                                                            | Client filtering only          |
| Picker selection across pages: keep `rowSelection` keys (row ids) when `data` changes                                      | Checkbox column                |
| Picker user cell (name, muted email): see [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md) | Nothing                        |

## Related

- [Resource list page](https://wallarm.github.io/design-system/patterns/resource-list-page.md), [Entity table](https://wallarm.github.io/design-system/patterns/entity-table.md), [Empty states](https://wallarm.github.io/design-system/patterns/empty-states.md)
- [Feedback toasts](https://wallarm.github.io/design-system/patterns/feedback-toasts.md), [Settings page](https://wallarm.github.io/design-system/patterns/settings-page.md), [Create and edit forms](https://wallarm.github.io/design-system/patterns/create-edit-forms.md)
- [Spacing](https://wallarm.github.io/design-system/foundations/spacing.md)
