ComponentsFilter Group

FilterGroup

A Filter Group is a UI pattern used to organize and apply multiple filters to a dataset, helping users refine and narrow down results.

GitHub LogoSource Code
⚠️

This component offers one implementation of the Filter Group pattern. Due to the variety of filtering needs, we recommend reviewing and extending the code as needed. A more modular solution may be provided in the future.

Usage

Reset to default

If you want to reset the filter group to its default state, you can set the defaultValue to the initial state you want and the Clear Filters button will work as a reset button.

Uncontrolled

You can have the FilterGroup component uncontrolled by omitting the value and onChange props. In this case, the component will manage its own state.

Empty filters

If you need to show a placeholder element while loading the filters or the data for each filter, you can use the leftEmptyElement and rightEmptyElement props on the filterContentProps prop.

Filters in loaded state