Skip to main content

SearchInput

<SearchInput
ref={searchInputRef}
testID={'searchInput'}
placeholder={'Search'}
onDismiss={onDismiss}
/>
TIP
This component extends the TextInput props.
APIThis is the list of additional props for the component

cancelButtonProps
ButtonProps

Props for the cancel button

containerStyle
ViewStyle

Override styles for the input

customLoader
React.ReactElement

custom loader element to render instead of the default loader

customRightElement
React.ReactElement

Custom right element

inaccessible
boolean

Turn off accessibility for this view and its nested children

onClear
() => void

On clear button callback.

onDismiss
() => void

callback for dismiss action

schemeColor
string | null

The SearchInput colors (affects the search icon color and the cancel button color)

showLoader
boolean

Whether to show a loader instead of the left search icon.

style
ViewStyle

Override styles for container

useSafeArea
boolean

in case the SearchInput is rendered in a safe area (top of the screen)