primitives/@mihcm/ui·v0.21.0·stable
SearchField
Sugar wrapper around Input that ships the magnifier glyph, a clear button, and role="search". Universal across web and native.
Props
The full prop API for SearchField. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.
| Prop | Type | Default | Description | Since |
|---|---|---|---|---|
value | string | — | Controlled value. Required. | 0.4.0 |
onValueChange | (value: string) => void | — | Fired on input change and clear-button press. Required. | 0.4.0 |
size | 'sm' | 'md' | 'lg' | 'md' | Input height. | 0.4.0 |
placeholder | string | 'Search…' | Placeholder copy. | 0.4.0 |
noClear | boolean | false | Hide the clear button even when value is non-empty. | 0.4.0 |
clearLabel | string | 'Clear search' | Accessible label for the clear button. | 0.4.0 |
trailingSlot | ReactNode | — | Optional element rendered after the clear button. | 0.4.0 |
Import
import { SearchField } from '@mihcm/ui/SearchField';