MindeesUI
ComponentsNavigation

GlobalSearch

Search trigger that opens a full-screen modal with an autofocused input and a scrollable, tappable results list driven by your own query handler.

GlobalSearch is an app-wide search entry point. It renders a compact search trigger that opens a modal containing an autofocused SearchInput and a scrollable results list. You supply results in response to the onSearch callback; selecting a result fires its handler and closes the overlay.

Import

import { GlobalSearch } from '@mindees/ui';

Usage

<GlobalSearch
  placeholder="Search projects…"
  onSearch={runQuery}
  results={results.map((r) => ({
    key: r.id,
    label: r.title,
    description: r.path,
    onPress: () => open(r.id),
  }))}
/>

Props

PropTypeDefaultDescription
onSearch(query: string) => voidCalled as the query changes; use it to populate results.
resultsGlobalSearchResult[]Result rows, each with key, label, optional description/icon, and onPress.
placeholderstring'Search…'Text shown in both the trigger and the overlay input.
openbooleanControlled open state; omit to let the component manage it.
onOpenChange(open: boolean) => voidCalled when the overlay opens or closes.
emptyMessagestring'No results'Shown in the overlay when there is a query but no results.
styleStyleProp<ViewStyle>Style applied to the trigger, not the overlay.

Accessibility

The trigger is accessibilityRole="search" labelled by the placeholder. Inside the modal the input is autofocused, the results scroll in a list, and each result is a button labelled by its label. When the query is empty the placeholder is shown; once there is a query with no matches the emptyMessage appears.

On this page