Skip to content

Filter panel ​

A pane beside a list where people narrow the results with filters.

filters-filtersbase--defaultOpen in Storybook ↗

When to use ​

  • A list whose entity type has filters, such as the library or the list of saved searches.

When not to use ​

  • Searching on one term across the list: use the list's search.
  • Choosing a value for a field: use a dropdown or the entity picker.

Anatomy ​

  1. Filters button: in the list band, a secondary-style button with a funnel, Filters and a count chip when filters are active. It opens and closes the pane.
  2. Pane: a --filter-pane-width column at the left of the results panel. Its top row is level with the list band (--list-band-pad) and holds the Filters button while the pane is open. The rest scrolls.
  3. Actions: Clear all (secondary, ✕) and Apply filter(s) (primary, full width), then the saved searches menu where saved searches are on, then an Add filter autocomplete for filters that are not shown by default.
  4. Section: one per filter. The header shows the filter's name, an optional help icon with a tooltip and a chevron (⌄ closed, ⌃ open).
  5. Matcher: inside an open section. With more than one way to match, the mode (contains text, is exactly, …) sits as a prefix inside the input box. Checkbox lists, two-field ranges and sliders stack under the mode instead.
  6. Clear filter: a small link under an active section.

Variants ​

VariantWhereLooks like
Panefrom 48rem upa column beside the results
Sheetbelow 48rema sheet from the bottom over a dimmed page (--sheet-radius); tapping the dimmed page closes it
Filter typeDefault matcher
Textcontains text
Selectionis any of, with suggestions
Date, number, yes/nois exactly

A filter's configuration can change its default matcher, limit which matchers it offers and rename them.

States ​

StateWhat you seeTrigger
Closed sectionchevron ⌄, matcher hidden—
Open sectionchevron ⌃, matcher below the headerclicking the header, Enter or Space
Active sectionheader in --color-accent-light with --color-accent-ink; Clear filter link; count on the Filters buttonthe filter has a value
Pane openFilters button with an accent borderclicking Filters
Pausedfilters hidden; opening them ends the searcha simple search is running
filters-filtersbase--activeOpen in Storybook ↗
filters-filterstoggle--statesOpen in Storybook ↗

Filters apply on Apply filter(s) or Enter, not on every keystroke. Typing or ticking only makes a section active. Clearing is lighter: Clear filter clears one filter and applies at once, and Clear all clears every filter, closes all sections, removes an applied saved search and applies at once.

A section opens by itself when its filter becomes active. Changing a section's matcher clears its value.

Keyboard & accessibility ​

  • Enter anywhere in the pane applies the filters.
  • Section headers are focusable, with role="button" and aria-expanded; Enter or Space opens or closes them.
  • The pane is a complementary landmark named Filters.
  • The Filters button has aria-expanded and aria-controls pointing at the pane. Its name includes the count: Filters, 2 active. The count chip itself is hidden from assistive technology.
  • The matcher's mode is a dropdown and follows its keys.

Content ​

  • Filter names are nouns from the data: Title, Year of publication.
  • Matcher modes read as the middle of a sentence: Title contains textdragon.
  • Translation keys: filters.*, with the modes in filters.matcher-labels.*.

Saved searches · Autocomplete · Dropdown · Checkbox · Button

Powered by Elody - Open Source Semantic Data Platform