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
| Prop | Type | Default | Description |
|---|---|---|---|
valuerequired | string | — | The controlled value of the search field. |
onChangerequired | (value: string) => void | — | Callback fired when the input value changes. |
placeholder | string | "Search..." | Placeholder text shown when the field is empty. |
shortcut | string | — | Optional keyboard shortcut label displayed when empty. |
onClear | () => void | — | Optional callback fired when the clear button is clicked. |
className | string | — | Additional CSS classes. |