-
Notifications
You must be signed in to change notification settings - Fork 0
SearchInput
Paulo Gomes da Cruz Junior edited this page Nov 19, 2025
·
1 revision
The SearchInput component is a reusable search field built on Carbon's Search component. It provides a controlled input for search queries, with custom mouse tracking logic and keyboard handling for accessibility.
| Name | Type | Required | Description |
|---|---|---|---|
id |
string |
✅ | Unique identifier for the search input |
label |
string |
✅ | Accessible label for the search input |
placeholder |
string |
✅ | Placeholder text for the input field |
value |
string |
✅ | The current value of the search input |
onChange |
(value: string) => void |
✅ | Callback fired when the input value changes |
import SearchInput from '@/components/Form/SearchInput';
<SearchInput
id="search-users"
label="Search users"
placeholder="Type a name..."
value={searchValue}
onChange={setSearchValue}
/>