Skip to content

Interface: SearchResultsProps

Props for SearchResults.

optional className?: string

Extra class names for the container.


optional emptyMessage?: ReactNode

Message shown when there are no hits.


hits: object[]

The hits to render, most relevant first.

fields: Record<string, unknown>

id: string

optional index?: string

score: number


optional onSelect?: (hit) => void

Called when a hit is clicked.

Record<string, unknown> = ...

string = ...

string = ...

number = ...

void


optional renderHit?: (hit) => ReactNode

Render one hit row. Defaults to a title, fields, and a score badge.

Record<string, unknown> = ...

string = ...

string = ...

number = ...

ReactNode


optional showIndex?: boolean

Show each hit’s source index (useful for universal search).