MiHCM
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.

PropTypeDefaultDescriptionSince
valuestringControlled value. Required.0.4.0
onValueChange(value: string) => voidFired on input change and clear-button press. Required.0.4.0
size'sm' | 'md' | 'lg''md'Input height.0.4.0
placeholderstring'Search…'Placeholder copy.0.4.0
noClearbooleanfalseHide the clear button even when value is non-empty.0.4.0
clearLabelstring'Clear search'Accessible label for the clear button.0.4.0
trailingSlotReactNodeOptional element rendered after the clear button.0.4.0

Import

import { SearchField } from '@mihcm/ui/SearchField';