Filter

Filtering enables users to organize data through UI controls, enhancing their ability to comprehend, analyze and take action on specific records within complex datasets effectively.

 

Anatomy

Frame 167688
  1. Filter and Search controls
  2. Applied filters and related actions (remove filters individually or clear all)
  3. Filtered content

 

Best Practices

Complex and Simple Filters

In some cases there are only a few controls a user can use to filter the content. In these cases it is easier for the user to directly access these controls instead of having to open a popover or panel to see those few options.

Simple filter example

Simple filter example

Here the user has only one option to filter the content: "Show active only"

 

Complex datasets often require multiple filtering options. In these cases it is recommended to accommodate filter options in a separate area than the toolbar. The example below shows a combination of a Filter button and a Popover with filter options. Please note that Popover and checkboxes are not exclusive components for handling complex filters, filter controls should always be tailored to specific use cases.

Complex filter example

Complex filter example

The user has many options for filtering the content

The above example utilizes the Checkbox Group as an example, however the appropriate filter controls should be determined according to specific use cases.
See more commonly used controls for filtering at the Related Components section.

 

Separating filter controls and other actions

It is possible to have multiple options for the user to interact with content (eg. data table), such as filtering, searching, exporting or performing actions on certain records, etc. Whether it is a filter button or a few filter controls, it is recommended to keep all action related to filtering separate from other actions. 
This visual separation can be achieved by applying larger space and adding a divider, or both.

Frame 167690
  1. Area for search and filter controls (search bar, filter button, other filter controls)
  2. Area for other actions (eg. export, add, take action on certain records, etc.)

 

Spacing

Tags indicate applied filters and enables the user to remove the filters individually. To remove all filters at once, the user can click on a link to do so. These actions are organized into a container, and the spacing-2xs (12px) spacing token is used to separate them.

Frame 167692

 

Top and bottom spacing for a group of tags

In order to have clear visual separation and to prevent accidental clicks, it is recommended to keep the spacing-md (24px) token for top and bottom of the group of tags and link.

Frame 167693

 

Responsive Guidelines

Wrapping filter indicators

In case there are so many applied filters that the related tags exceed the container width, they should wrap into multiple lines.

Frame 167691

 

 

Enhancing Filter Experience

The below checklist is referenced from Smashing Magazine’s guidelines on filtering

  1. Can we avoid a filter icon and show filters as they are?
  2. If not, what icon do we choose to indicate filtering?
  3. Is the icon + padding large enough for comfortable tapping?
  4. Do we put the icon at the top, bottom or floating (mobile/desktop)?
  5. What exactly happens when the user clicks/taps on the icon?
  6. How will the icon change on tap/click?
  7. Will we have some sort of animation or transition on click?
  8. Will filters appear as full page/partial overlay or slide-in?
  9. Can we avoid sidebar filtering as it’s usually slow?
  10. Do we expose popular or relevant filters by default?
  11. Do we display the number of expected results for each filter?
  12. Can we use a horizontal swiper to move between filters?
  13. Can we avoid drop-downs and use only buttons/chips + toggles?
  14. For complex filters, do we provide search within filters?
  15. Do we use icons to explain differences between various filters?
  16. Do we use the right elements for filters, e.g. sliders, buttons, toggles?
  17. Do filters apply automatically (yes, for slide-ins)?
  18. Do filters apply manually on confirmation (“Apply”) (yes, for overlays)?
  19. How do we communicate already selected filters?
  20. Can selected filters appear as removable pills, chips or tags?
  21. Do we recommend relevant filters based on selection?
  22. Do we track incompatibility between selected filters?
  23. How do error messages or warning appear in the UI?
  24. Do we allow customers to reset all filters quickly, at once?
  25. Are filters (or filters button) floating on scroll on mobile/desktop?
  26. Can users tap on the same spot to open/close filters?