API Reference
Rockets React API
react-material-ui
functions
SearchField

Function: SearchField()

SearchField(props): Element

The SearchField component is a custom text field with additional functionality for debounced search input and clearable input field. It supports customization of the search icon placement and integrates with Material-UI components.

Parameters

ParameterTypeDescription
propsSearchFieldPropsSearchField component props

Returns

Element

See

Storybook - SearchField (opens in a new tab)

Example

<SearchField
  searchIconPlacement="start"
  defaultValue="Initial search"
  wait={300}
  onDebouncedSearchChange={(value) => console.log(value)}
  onClear={() => console.log('Cleared')}
  placeholder="Search something..."
/>

Defined in

packages/react-material-ui/src/components/SearchField/SearchField.tsx:65 (opens in a new tab)