Optional
autoOptional
autoAutomatically focuses search bar on mount
android
Optional
barThe search field background color
Optional
cancelThe text to be used instead of default Cancel
button text
ios
Optional
disableSpecifies whether the back button should close search bar's text input or not.
android
Optional
headerThe search and close icon color shown in the header
android
Optional
hideIndicates whether to hide the navigation bar
ios
Optional
hideIndicates whether to hide the search bar when scrolling
ios
Optional
hintThe search hint text color
android
Optional
inputSets type of the input. Defaults to text
.
android
Optional
obscureIndicates whether to obscure the underlying content
Optional
onA callback that gets called when search bar has lost focus
Optional
onA callback that gets called when the cancel button is pressed
ios
Optional
onA callback that gets called when the text changes. It receives the current text value of the search bar.
Optional
onA callback that gets called when search bar is closed
android
Optional
onA callback that gets called when search bar has received focus
Optional
onA callback that gets called when search bar is opened
android
Optional
onA callback that gets called when the search button is pressed. It receives the current text value of the search bar.
Optional
placeholderText displayed when search field is empty
Optional
placementPosition of the search bar
Supported values:
automatic
- the search bar is placed according to current layoutinline
- the search bar is placed on the trailing edge of navigation barstacked
- the search bar is placed below the other content in navigation barDefaults to stacked
iOS (>= 16.0)
Optional
refReference to imperatively modify search bar.
Currently supported operations are:
focus
- focuses the search barblur
- removes focus from the search barclearText
- removes any text present in the search bar input fieldsetText
- sets the search bar's content to given valuecancelSearch
- cancel search in search bar.toggleCancelButton
- depending on passed boolean value, hides or shows cancel button (iOS only)Optional
shouldShow the search hint icon when search bar is focused
android
true
Optional
textThe search field text color
Optional
tintThe color for the cursor caret and cancel button text.
ios
The auto-capitalization behavior