Components
Search Input
Allows users to enter a search query. Wraps a text input in a search form with a built-in clear button.
Replacing soon
GitHubAnatomy
Anatomy
import {SearchInput} from '@staffbase/design';
<SearchInput />;Examples
Small size
API reference
| Name | Type | Description |
|---|---|---|
onClear | () => void | Called when the clear (×) button is clicked. Use this to reset the input value. |
onSubmit | () => void | Called when the search form is submitted (e.g. Enter key pressed). |
height | 32px40px | Controls the height of the search input. Default: '40px' |
cancelButtonTitle | string | The `title` and `aria-label` of the clear button. Default: 'Cancel' |
autoFocus | boolean | Focuses the input on mount. Default: false |
inputRef | RefObject<HTMLInputElement> | Ref for the underlying `<input>` element. |