Skip to main content

About this widget

Use the Hits view and helper components to display a list of search results. Use HitsPaging if you want to use infinite scrolling in your search. To add Hits to your search experience, use these components:
  • Searcher. The Searcher that handles your searches.
  • T. A data class representing a search result.
  • HitsView<T>. The view that renders objects of type T.
See also:

Explore example code

Browse the Hits example code on GitHub.

Examples

You can use deserialize to convert raw hits into your own data class using the Serializable annotation.
Kotlin

Compose UI

InstantSearch provides the LoadingState as a state model, which is an implementation of the LoadingView interface. You need to connect LoadingState to the LoadingConnector or LoadingViewModel like any other LoadingView implementation.
Kotlin

Parameters

transform
(SearchResponse) -> List<T>
required
A function transforming the search response into a list of results of your class T.
Kotlin
Last modified on July 10, 2026