Skip to main content
The Search component provides a specialized input field for search functionality with a built-in search icon and optional clear button.

Basic usage

Props

Inherits all props from InputField except leadingIcon.
string
default:"'Search'"
Placeholder text for the search input.
string
The controlled value of the search input.
(event: React.ChangeEvent<HTMLInputElement>) => void
Callback fired when the input value changes.
boolean
Whether to show the clear button when there is a value.
() => void
Callback fired when the clear button is clicked.
'default' | 'borderless'
default:"'default'"
The visual variant of the search input.
'small' | 'large'
The size of the search input.
boolean
Whether the search input is disabled.
string | number
default:"'100%'"
Width of the search input.
string
Additional CSS classes to apply to the search input.

With clear button

Size variants

Borderless variant

Custom width

Disabled state

Search with live results

Search with debouncing

Search bar with filters

Searchable table

Accessibility

  • The Search component has role="search" for proper semantic meaning.
  • The magnifying glass icon is automatically included as a visual indicator.
  • The input has an aria-label set to the placeholder value.
  • The clear button has aria-label="Clear search" for screen reader users.
  • Keyboard navigation is fully supported.
  • The clear button can be activated with Enter or Space when focused.