FieldSearch
A search field built on InputField: a leading
search icon, a pill-shaped ($round) border, and a clear ("reset") button that
only appears once the field is focused and has a value.
React Native
import { FieldSearch } from '@hoverinc/design-system-react-native';
<FieldSearch label="Search jobs" onChangeText={setQuery} value={query} />;label does double duty: it's both the visible placeholder text and the
fallback aria-label (pass aria-label explicitly if you need the accessible
name to differ from the placeholder).
Common Mistakes
placeholderisn't accepted as a prop — it's always thelabelvalue. Passing your ownplaceholderwon't do anything; TypeScript will flag it.- The clear button only shows up when the field is both focused and has a non-empty value. If a "clear" affordance disappeared, check whether the field lost focus rather than assuming the component is broken.
- The field is disabled-styled via
backgroundColor="$interactiveDisabled"automatically whenisDisabled— don't add a manual disabled background override, it'll fight with this. - Prefer uncontrolled usage (
defaultValue) overvalueunless you need to drive the query from outside — this is the team's default forFieldSearch/FieldPassword. Both were added specifically to replace inconsistent bespoke search/password inputs built directly onField. - The pill (
$round) shape is a deliberate, relatively recent design change to match Figma — don't overrideborderRadiusback to a squarer shape expecting to match older screenshots or examples elsewhere in the app.