colors

@Composable
fun colors(containerColor: Color = SearchBarTokens.ContainerColor.value, dividerColor: Color = SearchViewTokens.DividerColor.value): SearchBarColors

Creates a SearchBarColors that represents the different colors used in parts of the search bar in different states.

For colors used in the input field, see SearchBarDefaults.inputFieldColors.

Parameters

containerColor

the container color of the search bar

dividerColor

the color of the divider between the input field and the search results


@Composable
fun colors(containerColor: Color = SearchBarTokens.ContainerColor.value, dividerColor: Color = SearchViewTokens.DividerColor.value, inputFieldColors: TextFieldColors = inputFieldColors()): SearchBarColors

Deprecated

Search bars now take the input field as a parameter. `inputFieldColors` should be passed explicitly to the input field. This parameter will be removed in a future version of the library.

Replace with

colors(containerColor, dividerColor)