SearchField

fun SearchField(value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, onSearch: (String) -> Unit? = null, labels: SearchFieldLabels = SearchFieldLabels())

A single-line search field with a search glyph and a clear button that appears once the field has text. The placeholder also supplies the accessible name after typing. Clearing calls onValueChange with an empty string.

The keyboard shows a Search action; onSearch runs when it is pressed. For filter-as-you-type lists, leave onSearch null and react to onValueChange.