Search Field

A text input with a search icon, clearable value, and optional keyboard shortcut hint.

Basic

<SearchField
  value={query}
  onChange={setQuery}
  placeholder="Search components..."
  shortcut="/"
/>

API Reference

PropTypeDefaultDescription
value
required
stringThe controlled value of the search field.
onChange
required
(value: string) => voidCallback fired when the input value changes.
placeholderstring"Search..."Placeholder text shown when the field is empty.
shortcutstringOptional keyboard shortcut label displayed when empty.
onClear() => voidOptional callback fired when the clear button is clicked.
classNamestringAdditional CSS classes.