SearchBar
<searchBar>
is a UI component that provides a user interface for entering search queries and submitting requests to the search provider.
See also:
import * as React from "react";
<searchBar hint="Search hint" text="searchPhrase" onTextChange={onTextChanged} onSubmit={onSubmit} onClose={onClose} />
Props
Name | Type | Description |
---|---|---|
hint | string | Sets placeholder text for the input area. |
text | string | Sets the value of the search query. |
textFieldBackgroundColor | Color | Sets the background color of the input area. |
textFieldHintColor | Color | Sets the color of the placeholder text. |
onTextChange | (args: EventData ) => void | Emitted when the text is changed. |
onSubmit | (args: EventData ) => void | Emitted when the search input is submitted. |
onClose | (args: EventData ) => void | Emitted when the search bar is closed. |
onClear | (args: EventData ) => void | Emitted when the current search input is cleared through the X button in the input area. |
Native Component
Android | iOS |
---|---|
android.widget.SearchView | UISearchBar |