Mobile › Navigation
SearchField
A search input. Use it on its own, or pass search to a NavBar with variant="search".
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { SearchField } from "plankui-mobile";
const [q, setQ] = useState("");
<SearchField value={q} onChangeText={setQ} placeholder="Search places" />iOS and Android
iOS: A grey rounded field with a magnifier; a Cancel button slides in while it has focus.
Android: Material 3 search bar: a full pill on the surface colour.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | The query. | |
| onChangeText | (v: string) => void | Called on every keystroke. | |
| placeholder | string | "Search" | Hint text. |
| ...TextInputProps | TextInputProps | – | Any other React Native TextInput prop, such as onSubmitEditing. |