Filter

Usage

The filter component lets users narrow down visible data by selecting specific values or ranges.

Use for:

  • Filtering data in data tables or large lists

Don’t use for:

  • Sorting data
  • Selecting values in forms
  • Dropdown action menus.

Anatomy

Filter trigger

The button users click to open the filter options. It includes:

  1. Label – Text that describes what the filter is for (e.g. “Status”).
  2. Display value – Shows the currently selected filter value(s) (e.g. “Active”).
  3. Remove button – Clears the filter and hides it from view.

Filter popover

  1. Label – Always shows just the name of the filter (e.g. “Status”) to indicate context.
  2. Logical operator – Select or text element that defines how the filter will behave (e.g. “is,” “is not,” “contains”)—this clarifies how data will be included or excluded.
  3. Search – Optional input for filtering long lists of values inside the popover.
  4. Content – The actual filter UI based on type.
  5. Actions – Actions to apply or clear the filter value.

Types

Single

Allows users to choose one value from a predefined list to use as a filter.

Multi

Allows users to select multiple values from a predefined list to filter data.

Date

Allows users to pick a date range as filter input.

Range

Lets users define a numeric range to filter by

Text

Accepts text input to be used in filtering.

Behavior

Placement

Filters should be positioned above the content they control, stacked horizontally with small gap between them. If filters overflow the available width, they should wrap to a second line to maintain responsiveness in order to avoid introducing scroll.

Applying filters

Explicit

Explicit apply mode in action
The user must click the ‘Apply’ button to confirm their selection. This updates the filter value and closes the popover. The filter trigger only updates to show the new value after ‘Apply’ is clicked.

Instant

Instant apply mode in action
The filter updates immediately as the user selects a value. There’s no ‘Apply’ button and changes are applied in real-time, including to the value shown in the trigger.

Clearing a filter

Clearing a filter in action

Clicking ‘clear ‘ instantly removes the selected value, resets the filter’s internal state, and reflects the empty value immediately—no ‘Apply’ required.

Removing a filter

Removing a filter in action

Removes the filter from the UI and clears all related data, including its internal value and any state associated with it.

Using logical operators

Using logical operators in action

Users select a logical operator to define how the filter compares values. It updates the same way as the filter content—either instantly or on apply, based on the component’s apply mode. A default operator should always be provided. If only one operator is available, it’s displayed as plain text instead of a select menu.

Variants

Default

Default variant includes a trigger button and a popover. Clicking the trigger opens the popover, which contains the filter label, logical operator, content area, and actions. Use this variant when filters don't need to be persistently visible on the page.

Inline

Inline variant shows filter content directly on a page. Consider using this inline filters are crucial to operate current page (e.g, calendar) or when filters are presented all at once in a separate modality e.g, on mobile devices.

Best practices

Do
Include a logical operator in the label, after applying the value so users instantly see how the filter works and understand the logic behind it
Don't
Combine multiple data points in one filter
Do
Format display value in a way that suits user's best in a specific scenario
Don't
Don't use filter component for sorting data. Sorting is not filtering
Do
Allow searching if list of options might be long

Examples

Live Preview

Props

NameDescription Type Default Values
label Required
Label for the filter.string
type Required
Type of the filter.stringsinglesingle, multi, text, date-range, number-range
options
Options for the filter.array
logical-operator-options
Options for the logical operator.array
searchable
Controls whether the filter is searchable or not.booleanfalsefalse, true
apply-mode
Controls the apply mode of the filter.stringexplicitexplicit, immediate
target
Type string or an actual DOM node where you want render componentstring|objectbody
use-teleport
When it is set to true, filter menu will teleport the content part into the target.booleanfalsefalse, true
open
Controls whether the filter is open or not.booleanfalsefalse, true
position
Controls the position of the filter menu in relation to the trigger. `bottom-left` will align it to the bottom left of the trigger. `bottom-right` will align it to the bottom right of the trigger. `top-left`and 'top-right' will align it to the top left and right respectively.stringbottom-leftbottom-left, bottom-right, top-left, top-right
id
Custom ID for the filter component.String
v-model
model-value
Selected value of the filter.object
translations
Object with all necessary translations.objectFILTER_TRANSLATIONS{ filterIconSearch: 'Search', filterIconRemove: 'Remove filter', filterInputPlaceholder: 'Search option', filterButtonApply: 'Apply', filterButtonClear: 'Clear', filterButtonClose: 'Close' }
readonly
Determines whether the filter is readonly or not.booleanfalse, true
formatter
Controls the trigger value of the filter.Function
hide-remove-button
Controls whether to hide the remove button.booleanfalsefalse, true

Slots

NameDescription
default
Default content slot

Events

NameDescription Type
update:modelValue
Emits when the filter value is updated (temporary, before apply){ "names": [ "object" ] }
open
Emits the event after the click{ "names": [ "Event" ] }
close
Emits the event after the click{ "names": [ "Event" ] }
remove
Emits when the filter is removed{ "names": [ "Event" ] }
clear
Emits when the filter is cleared{ "names": [ "Event" ] }
apply
Emits when the filter is applied{ "names": [ "object" ] }
change
Emits when the filter value changes (for v-model compatibility){ "names": [ "object" ] }