Skip to content

Filter.Root

TypeDescription
idstring(required) Unique identifier that links the filter UI to Filter.useFilter(id) consumers via shared state.
behavior"realtime"
"manual"
(optional) Controls when filter changes are emitted. "realtime" (default) emits on every change. "manual" buffers filter changes internally until the user clicks Apply in the panel. Search input is always emitted in real time.
resultCountnumber(optional) The number of matching results. Passed to child components that can display the count.
defaultFiltersRecord<string, FilterValue>(optional) Pre-selected filters to apply on mount. The panel and relevant filter accordions open automatically. Keys should match the filter key format (e.g. /type/card).
defaultPanelOpenboolean(optional) Controls whether the filter panel is open on mount. When true, the panel opens even without active filters. When false, the panel stays closed even with defaultFilters or URL-restored filters. Defaults to opening automatically when filters are present.
resultLoadingboolean(optional) When true, the result count shows a skeleton loading state. Use this while fetching result counts asynchronously.
classNamestring(optional) Custom CSS class name applied to the root element.
styleCSSProperties(optional) Inline styles applied to the root element. Use e.g. maxWidth to control the width of the filter.
childrenReact.ReactNode(optional) Filter sub-components like Filter.Search, Filter.Panel, Filter.ActiveFilters, etc.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Filter.Header

TypeDescription
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Filter controls like Filter.Toolbar, Filter.Panel, and Filter.ActiveFilters.

Filter.Search

TypeDescription
labelstring(required) Label for the search input.
submitBehavior"manual"(optional) When set to "manual", the search state is only updated when the user presses Enter or clicks the submit button. Automatically applies type="search" and explicitly shows the submit button.
placeholderstring(optional) Placeholder text for the search input.
classNamestring(optional) Custom CSS class name.

Filter.Panel

TypeDescription
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Filter components rendered inside the panel, e.g. Filter.Selection, Filter.Date, or custom filters.

Filter.PanelButton

TypeDescription
childrenReact.ReactNode(optional) Button label text. Defaults to the translated "Filter" label.
[Button props]Various(optional) All Button props are supported except variant, icon, iconPosition, transitionState, and aria-expanded.

Filter.ActiveFilters

TypeDescription
labelstring(optional) Accessible label for the active filters group. Defaults to "Aktive filtre".
showCategoryLabelboolean(optional) When true, each tag is prefixed with the category name (e.g. "Betalingstype: Kort" instead of "Kort").
collapsibleThresholdnumber(optional) When the number of active filters exceeds this threshold, tags are shown inside a collapsible accordion with a scrollable area and a "Clear all" button.
classNamestring(optional) Custom CSS class name.

Filter.Toolbar

TypeDescription
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Toolbar content — typically Filter.Search on the left and Filter.Toolbar.Actions grouping action buttons on the right.

Filter.Toolbar.Actions

TypeDescription
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Action buttons or controls to display on the right side of the toolbar.

Filter.Item

TypeDescription
labelstring(required) Label displayed for this filter section.
filterKeystring(required) Unique key identifying this filter in the state.
defaultOpenboolean(optional) When true, the accordion starts expanded. The open/closed state is remembered across panel opens without a page refresh.
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Filter content rendered inside the item.

Filter.Date

TypeDescription
labelstring(optional) Label for the date filter. Defaults to the locale translation (e.g. "Dato" in Norwegian, "Date" in English).
filterKeystring(optional) Unique key for this filter in the state. Defaults to "date".
defaultOpenboolean(optional) When true, the accordion starts expanded. The state is remembered across panel opens.

Filter.Selection

TypeDescription
labelstring(required) Label for the selection filter.
filterKeystring(required) Unique key for this filter group. Individual selections are stored as filterKey/value entries in the filter state.
dataArray<{ value: string; label: string }>(required) Array of selectable items. Each item has a value (string) and label (string).
defaultOpenboolean(optional) When true, the accordion starts expanded. The state is remembered across panel opens.

Filter.MultiSelection

TypeDescription
labelstring(required) Label for the multi-selection filter.
filterKeystring(required) Unique key for this filter group. Individual selections are stored as filterKey/value entries in the filter state.
dataArray<{ value: string | number; title: React.ReactNode }>(required) Array of selectable items. Each item has a value (string | number) and title (ReactNode).
defaultOpenboolean(optional) When true, the accordion starts expanded. The state is remembered across panel opens.

Filter.QuickFilters

TypeDescription
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Quick filter toggle buttons or other controls.

Filter.SortButton

TypeDescription
dataDrawerListData(required) Sort options passed to the underlying Dropdown. Each item should have a selectedKey and content.
valuestring
number
(optional) The currently selected sort value.
defaultValuestring
number
(optional) Default sort value on mount.
size"default"
"small"
"medium"
"large"
(optional) Size of the trigger button. Defaults to "medium".
[Dropdown props]Various(optional) All other Dropdown props are forwarded.

Filter.NoResults

TypeDescription
connectedTostring(optional) Links to a Filter.Root by its id. Reads resultCount from the shared filter state. When used, the resultCount prop is not needed.
resultCountnumber(optional) The number of results. When 0, the no-results message is shown. When omitted, falls back to the resultCount from the linked connectedTo or the nearest Filter.Root.
childrenstring(optional) Custom message to display instead of the default translated text.
classNamestring(optional) Custom CSS class name.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Filter.ResultCount

TypeDescription
connectedTostring(optional) Links to a Filter.Root by its id. Reads resultCount from the shared filter state.
resultCountnumber(optional) The number of results to display. When omitted, falls back to the resultCount from the linked connectedTo or nearest Filter.Root.
alwaysVisibleboolean(optional) When true, the result count is always visible even when no filters or search text are active. By default, the count is only shown when filters are active.
childrenstring(optional) Custom message to display instead of the default translated text.
classNamestring(optional) Custom CSS class name.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Filter.Content

TypeDescription
connectedTostring(optional) Links to a Filter.Root by its id. When omitted and used inside a Filter.Root, the id is inherited from context.
classNamestring(optional) Custom CSS class name.
childrenReact.ReactNode(optional) Result content to render. Wrapped in a skeleton when the linked filter is loading.
Spacestring
object
(optional) Spacing properties like top or bottom are supported.

Filter.Highlighting

TypeDescription
childrenstring(required) Text to highlight based on the current search value.
connectedTostring(optional) Links to a Filter.Root by its id. When omitted, the id is inherited from the nearest Filter.Root or Filter.Content.

Filter.useFilter(id)

Returns an object with the following properties:

TypeDescription
filtersRecord<string, FilterValue>(required) Object containing all active filters keyed by filterKey.
searchstring(required) The current search string.
hasActiveFiltersboolean(required) true when any filter or search text is active.
resetFilters() => void(required) Clears all filters and search text.
removeFilter(filterKey: string) => void(required) Removes a single filter by its filterKey.

Filter.useFilterAsync(id, fetcher, options?)

Parameters:

TypeDescription
idstring(required) The id of the Filter.Root to link to.
fetcher(params: { filters, search }) => Promise<T>(required) Async function called whenever filters or search change. Receives { filters, search } and should return the filtered data.
options.initialDataT(optional) Data to return before the first fetch completes.
options.debouncenumber(optional) Delay in milliseconds before executing the fetcher after a state change. Useful for reducing API calls while the user is typing.

Returns an object with:

TypeDescription
dataT
undefined
(required) The data returned by the fetcher. undefined until the first fetch completes (unless initialData is provided).
loadingboolean(required) true while a fetch is in progress.
errorError
undefined
(required) The error thrown by the fetcher, if any. Reset to undefined on each new fetch.

Translations

More info about translations can be found in the general localization and Eufemia Forms localization docs.

Keynb-NOen-GBsv-SEda-DK
Filter.ariaLabelFilterFilterFilterFilter
Filter.activeFiltersLabelAktive filtreActive filtersAktiva filterAktive filtre
Filter.activeFiltersCountLabel%s aktive filtre%s active filters%s aktiva filter%s aktive filtre
Filter.clearAllLabelFjern alleClear allRensa allaFjern alle
Filter.panelButtonLabelFilterFilterFilterFilter
Filter.hideFilterLabelSkjul filterHide filterDölj filterSkjul filter
Filter.applyFilterLabelBruk filterApply filterAnvänd filterAnvend filter
Filter.cancelFilterLabelAvbrytCancelAvbrytAnnuller
Filter.dateLabelDatoDateDatumDato
Filter.sortButtonLabelSorterSortSorteraSortér
Filter.noResultsMessagePrøv å endre eller fjerne noen filtre.Try changing or removing some filters.Försök att ändra eller ta bort några filter.Prøv at ændre eller fjerne nogle filtre.
Filter.resultCountMessage%s treff%s result(s)%s resultat%s resultat(er)