Skip to content

Android components Forms

StanceSearchBar

Beta

A search field with a clear button and a search keyboard action.

  • PlatformAndroid, Jetpack Compose
  • Builds onOutlinedTextField
  • Kindcomposable

Preview

Rendered by the Jetpack Compose library, not drawn by hand.

StanceSearchBar on AndroidStanceSearchBar on AndroidStanceSearchBar on Android
StanceSearchBar, Light appearance
Light
StanceSearchBar, Dark appearance
Dark
StanceSearchBar, High contrast appearance
High contrast

Usage

kotlin
var query by remember { mutableStateOf("") }
StanceSearchBar(query, { query = it }, placeholder = "Search templates")

Accessibility

  • The clear button has an accessible name.

On other platforms