SearchInput
A search input: the search form of TextInput, with a clear indicator appearing when the value is non-empty — click it to clear.
Basic usage
Because the field already holds a value, a × clear indicator shows on the right; clearing the value removes it again.
With labels and soft validation
label, labelPosition, invisibleLabel, validate and the rest follow TextInput's semantics.
This component is just a search box with clear capability. To show dropdown results live as you type, use SearchWidget (a search box combined with a results list).
Where props land
Same as TextInput: ...rest lands on the root <div>, props for the native <input> go through inputProps, and inputRef focuses the input. The clear indicator is taken over by the component, so type (always search), indicator and indicatorProps are not exposed.
API
Only the differences from TextInput are listed; the rest are in TextInput · API.
Unsupported props: type (always search), indicator / indicatorProps (the indicator slot is taken over by the clear logic).
See also
- The base single-line input's full capabilities (types, soft validation, prop placement): TextInput
- Search with a results list:
SearchWidget - How values flow between the component and your state: Controlled and uncontrolled