Skip to main content
Signature

Explore example code

Browse the Filter Map example code on GitHub.

About this widget

Components holding a map of filters, and that can apply a single filter at a time.

Examples

Kotlin

Low-level API

If you want to fully control the Filter Map components and connect them manually, use the following components:
  • Searcher. The Searcher that handles searches.
  • FilterState. The current state of the filters.
  • FilterMapViewModel. The logic applied to the filter map.
  • FilterMapView. The view that renders the filter map.
Kotlin

Compose UI

InstantSearch provides the FilterMapState as a state model, which is an implementation of the FilterMapView interface. FilterMapState must be connected to the FilterMapConnector or FilterMapViewModel like any other FilterMapView implementation.
Kotlin

Parameters

filters
Map<Int, Filter>
required
The map of filters to be held. The key is an unique identifier for the filter value.
Kotlin
filterState
FilterState
required
The FilterState that holds filters.
selected
Int?
default:"null"
The key of the filter selected by default.
groupID
FilterGroupID
default:"FilterGroupID(FilterOperator.And)"
Groups all created filters under an ID.

View

view
FilterMapView
required
The view that renders the filter map.
presenter
default:"FilterPresenterImpl()"
How to display filters.
Kotlin
Last modified on July 10, 2026