pub struct SearchProps {
pub text: String,
pub prompt: String,
pub placement: SearchPlacement,
pub hides_on_scroll: bool,
pub initially_hidden: bool,
pub scopes: Vec<String>,
pub scope: usize,
pub suggestions: Vec<String>,
}Expand description
Search over a navigation surface (docs/search.md). The query itself stays an app-owned signal; this carries only what the toolkit must draw, so moving the field between placements never moves the state.
Fields§
§text: StringCurrent text. Two-way: the user typing emits Event::SearchChanged, and the app’s
own writes arrive as SearchPatch::Text.
prompt: StringEmpty-state prompt.
placement: SearchPlacement§hides_on_scroll: boolOpt into native scrolling search/title chrome on mobile. Default false keeps the field pinned. Desktop toolbar search is unchanged.
Start the UIKit navigation search drawer collapsed, with a compact toolbar title. Implies scrolling search on UIKit; ignored by other backends. Default false.
scopes: Vec<String>Scope titles, empty = no scope bar. One-of-N: a UISearchBar scope bar, a Material
ChipGroup of single-selection filter chips, an ArkUI SegmentButtonV2, an
NSSegmentedControl (docs/search.md has the per-backend table).
scope: usizeIndex into scopes; meaningless when scopes is empty.
suggestions: Vec<String>Completions offered for the current text. On a navigation surface these complete the field rather than replacing the list: the list is already the result set, so an overlay of results would cover the thing it is filtering.