SearchBarDefaults

Contains default values used by SearchBar and InputField.

Properties

Link copied to clipboard

The default font size for the InputField text and label. COUI coui_search_view_input_text_size (16sp).

Link copied to clipboard

The default minimum height of the InputField background capsule. COUI coui_search_bar_normal_background_height (40dp).

Link copied to clipboard

The default inside margin of the SearchBar. COUI coui_search_bar_responsive_horizontal_padding_compat (16dp) x (52dp - 40dp) / 2.

Link copied to clipboard

The end padding for the default leading icon: (36dp container - 20dp glyph) / 2, equal to COUI coui_search_view_hint_padding_start.

Link copied to clipboard

The start padding for the default leading icon: the COUI 4dp icon container start gap plus (36dp container - 20dp glyph) / 2.

Link copied to clipboard

The end padding for the default trailing (clear) button touch target. COUI coui_search_bar_non_instant_search_inner_gap (4dp).

Link copied to clipboard

The start padding for the default trailing (clear) button touch target. COUI coui_search_bar_edittext_end_gap (4dp).

Link copied to clipboard

The circular touch target size of the default trailing (clear) button. COUI coui_search_bar_inner_search_icon_size (36dp).

Link copied to clipboard

The visual circle size of the default trailing (clear) button, matching the 9dp-radius circle of ic_edit_text_delete_search_view.

Functions

Link copied to clipboard
fun searchBarColors(backgroundColor: Color = COUITheme.colorScheme.secondaryContainer, labelColor: Color = COUITheme.colorScheme.onSurfaceSecondary, iconColor: Color = COUITheme.colorScheme.onSurfaceSecondary, clearIconColor: Color = COUITheme.colorScheme.onSurfaceContainerHigh): SearchBarColors

Creates a SearchBarColors with the default colors of the InputField, following COUISearchBar (coui_search_view_selector_color_normal capsule, couiColorLabelSecondary hint, couiColorSecondNeutral glyph, couiColorHintNeutral clear circle).