Skip to main content
Signature

Explore example code

Browse the Loading example code on GitHub.

About this widget

Components that show a loading indicator during pending requests. To add a loading indicator to your search experience, use these components:
  • Searcher. The Searcher that handles your searches.
  • LoadingViewModel. The logic applied to the loading indicator.
  • LoadingView. The concrete view displayed during loading.

Examples

Kotlin

Parameters

searcher
Searcher
required
The Searcher that handles your searches.
viewModel
LoadingViewModel
default: LoadingViewModel()
The logic applied to the loading indicator.
debouncer
Debouncer
default: Debouncer(debounceLoadingInMillis)
Delays searcher operations by a specified time duration.

ViewModel

isLoading
Boolean
When true, the interface starts in a loading state.

ViewModel

isLoading
Boolean
default:false
When true, the interface starts in a loading state.
Kotlin

View

view
LoadingView
required
The concrete view displayed during load.
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
Last modified on July 10, 2026