Filter

Designer doc
This component is implemented using Select, MultiSelect, TreeSelect and TreeMultiSelect components. Please refer to them for further implementation details.

Example

There are different ways that the Filter pattern can be used in the project level, such as in the following examples.
Filter bar
A filter bar can be used when the filters are frequently used to filter the content below it.
View code
Table header
Filters in table header can be applied at a per-column level and enable faster filtering.
View code
Drawer
The side drawer can be expanded for advanced filter selection.
View code
Advanced filters
Advanced filters can take many forms, you can pick the level of granularity the filters can afford. The combination of identifier + relative + value becomes a condition for the results to meet.
View code

Data-fetching patterns

Filters can be applied to fetch data in the following ways.
Live-filtering
Results are fetched instantly when selection is made. This is similar to how select, multi-select dropdowns work.
View code
Per-filtering
Filters are applied one at a time. Within a multi-select dropdown, options can be searched, scrolled and chosen without automatically updating the results. Updated results can be triggered by clicking the inline ‘Apply’ button.
View code
Icon button can be used to trigger the multi-select dropdown for similar behavior. By default, the filter icon is used, but this can be customised using the children prop and customisation of other props can be done just like IconButtonProps.
View code
Batch-filtering
Results are fetched when the various filters have been inputted and ‘Apply’ has been clicked. This is similar to how filter drawers work.

Accessibility

Navigation is similar to Select and MultiSelect components, use Arrow Down, Arrow Up, Escape, Enter and Tabs to open/close the popup and to navigate within the popup itself.

API

FilterButton
Prop nameTypeDefaultDescription
allFilterButtonPropsButtonProps
appliedFilterCountnumber0
clearAllButtonPropsButtonProps
    Example
    Example
    Filter bar
    Filter bar
    Table header
    Table header
    Drawer
    Drawer
    Advanced filters
    Advanced filters
    Data-fetching patterns
    Data-fetching patterns
    Live-filtering
    Live-filtering
    Per-filtering
    Per-filtering
    Batch-filtering
    Batch-filtering
    Accessibility
    Accessibility
    API
    API
    FilterButton
    FilterButton
Coral is a thoroughly developed design system widely adopted by developers and designers for creating beautiful and user-friendly Sea internal products.

Copyright © 2018-2025 Sea Labs