Skip to main content

Search Bar

Render a search bar with controlled search input, clear button and optional left section

Storybook Docs

Props

NameTypeDefaultDescription
clearButtonAriaLabelstring"Clear"Aria label of clear button
inputAriaLabelstring"Search"Aria label of input
inputPlaceholderstring-Placeholder of input
leftSectionReactNode-left section content
onChange(value: string) => void-Called when input changes
onSearchClear() => void-Called when clear button is clicked
onSearchSubmit(event: FormEvent) => void-Called when input is submitted
openedboolean-Controlled value that represents whether or not the SearchBar is considered active/visible and activates focus (does not actually affect visibility)
valuestring-Controlled value of input
...--Extends TextInput