Skip to main content

SearchInput

A Search component with debouncing support, internally it extends the TextInput and it's all props.

Usage

Search user
function SearchInputUsage() {
return (
<View>
<SearchInput
label="Search user"
placeholder="eg. Blossom"
size="medium"
/>
</View>
)
}

Size

Search user
Search user
Search user
function SearchInputSizes() {
return (
<View>
<SearchInput label="Search user" placeholder="eg. Blossom" size="small" />
<SearchInput
label="Search user"
placeholder="eg. Blossom"
size="medium"
/>
<SearchInput label="Search user" placeholder="eg. Blossom" size="large" />
</View>
)
}

Modes

Search user
Search user
function SearchInputModes() {
return (
<View>
<SearchInput label="Search user" placeholder="eg. Blossom" mode="flat" />
<SearchInput
label="Search user"
placeholder="eg. Blossom"
size="medium"
mode="outlined"
/>
</View>
)
}

Props

PropData TypeDefault ValueDescription
ExtendsTextInputProps--Inherits properties from TextInputProps
withClearIconboolean----
onQueryChange(query: string) => void----
debounceDelaynumber----
mode"outlined" | "flat"outlinedControl the different modes of the text input
denseboolean--Have a denser background in the text input
labelstring--Label text above the input
placeholderstring--Placeholder for the text input
captionstring--Caption text below the text input
errorstring--Error text in error status below caption text
labelStyleStyleProp<TextStyle>--Label text style
placeholderStyleStyleProp<TextStyle>--Placeholder text style
captionStyleStyleProp<TextStyle>--Caption text style
errorStyleStyleProp<TextStyle>--Error text style
containerStyleStyleProp<ViewStyle>--Container view style
inputStyleStyleProp<ViewStyle>--Input box style
textStyleStyleProp<TextStyle>--Input text style equivalent to react-native style for TextInput
disabledboolean--Set to true to disable the button
leftReactNode--Render Icon/JSX on the left of the button
rightReactNode--Render Icon/JSX on the right of the button
statusBlossomStatusprimary--
sizeBlossomSizemedium--