SearchBar

fun SearchBar(inputField: @Composable () -> Unit, onExpandedChange: (Boolean) -> Unit, modifier: Modifier = Modifier, insideMargin: DpSize = SearchBarDefaults.InsideMargin, expanded: Boolean = false, outsideEndAction: @Composable () -> Unit? = null, content: @Composable ColumnScope.() -> Unit)

A SearchBar component with Miuix style.

Parameters

inputField

the input field to input a query in the SearchBar.

onExpandedChange

the callback to be invoked when the SearchBar's expanded state is changed.

modifier

the Modifier to be applied to the SearchBar.

insideMargin

The margin inside the SearchBar.

expanded

whether the SearchBar is expanded and showing search results.

outsideEndAction

the action to be shown at the end side of the SearchBar when it is expanded.

content

the content to be shown when the SearchBar is expanded.