Search Input

The SearchInput component provides a styled search field with clear and submit affordances.

Usage & Examples

Search With Button

search-with-button.tsx
<SearchInput
  label="Find components"
  defaultValue="chart"
  showSearchButton
/>

Props API

34 props
Columns
Search Input props API
Default
Description
autocompletebooleanNopropsfalseControls whether autocomplete is enabled. Pass true for "on" or false for "off".
classNamestringNostylingAdditional class name for the component root.
clearAriaLabelstringNoprops"Clear search"Accessible label for the clear button.
clearButtonClassNamestringNopropsAdditional class name for the clear button.
containerClassNamestringNopropsAdditional class name for the outer label/input container.
data-testidstringNotestingBackward-compatible alias for test ID attributes.
defaultValuestringNoprops""Initial search query for uncontrolled usage.
glassbooleanNopropsconfigured default glass setting (fallback: false)Whether to render glass styling.
iconSearchInputIconComponent | nullNopropsOptional icon component to render inside the search input. Pass null to hide the default search icon.
iconClassNamestringNopropsAdditional class name for the rendered icon.
iconPosition"left" | "right"Noprops"left"Position of the icon relative to the input text.
iconWrapperClassNamestringNopropsAdditional class name for the icon wrapper.