Skip to main content

SearchBarWithContent

Function SearchBarWithContent 

Source
pub fn SearchBarWithContent(
    input_field: View,
    expanded: bool,
    on_expanded_change: Rc<dyn Fn(bool)>,
    modifier: Modifier,
    leading_icon: Option<View>,
    trailing_icon: Option<View>,
    config: SearchBarConfig,
    content: View,
) -> View
Expand description

M3 Search Bar that manages expanded content with animated width and suggestions dropdown. Equivalent to CK’s SearchBar(inputField, expanded, onExpandedChange, ..., content) overload.

The bar itself is a passive surface (no click handling) -> expansion is driven by the InputField’s focus tracking inside input_field.