A search field: a TextInput with type="search" and a magnifier icon.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For filtering or searching what is on the page or in the app.
A form field that happens to hold a query? Text Input.
type="search" with a label, so Escape clears it in most browsers and it is announced as a search field.
import { Search } from '@idyeah/diya'Stable since 1.0.0
labelRequiredstringVisible label above the input; also its accessible name. Hide it with hideLabel.
clearablebooleanShows a clear button while there is text; it empties the value and refocuses the input.
Default false
defaultValuestringThe starting text when uncontrolled; a form reset returns to it.
errorstringVisible error message below the input; marks the field invalid while set.
helperTextstringVisible hint below the input, announced with it; error replaces it while set.
hideLabelbooleanHides the label visually but keeps it as the input's accessible name.
Default false
onValueChange(value: string) => voidCalled with the new text on every edit and when cleared.
shape"rounded" | "pill"Corner style of the field; defaults to 'rounded', the same corners as every other control. 'pill' is fully round.
Default 'rounded'
size"small" | "medium" | "large"Control height and type size; defaults to 'medium'.
Default 'medium'
valuestringThe current text when controlled; pair it with onValueChange.
Also takes every native <input> attribute, such as name, id or data-*.