Genesis
@beta

NativeSearchBar

SearchBar — text input with cancel + clear + optional voice trigger. Use as the search affordance for lists and result screens. iOS-style "Cancel" button slides in only when the input is focused and clears focus on press. The clear "✕" appears whenever there's a value. Voice support is opt-in: pass `onVoicePress` to render the voice button. The actual STT integration is the consumer's responsibility (e.g., expo-speech-recognition); this primitive only renders the trigger affordance.

packages/ui-native/src/components/search-bar.tsx

Import
Subpath export: @marktiderman/genesis-ui-native
import { NativeSearchBar } from "@marktiderman/genesis-ui-native";
Components
Auto-generated from TypeScript source via react-docgen-typescript.

NativeSearchBar

PropTypeDefaultDescription
onChange*(value: string) => void—
value*string—
cancelLabelstringCancelCancel button label. Default "Cancel".
classNamestring—
onSubmit((value: string) => void)—Submit handler (return key on the keyboard).
onVoicePress(() => void)—When provided, renders a microphone trigger.
placeholderstringSearch
placeholderTextColorstring—Color used for the placeholder text. Defaults to a token-aware muted value that matches NativeWind's `text-muted-foreground` resolution. Override per-call when an alternate brand demands a different shade.
showCancelbooleantrueShow the "Cancel" button when focused. Default true.
testIDstring—