For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

<GlobalSearchBox>

Search across conversations and messages.

View as Markdown

Search functionality is available on the Growth plan or higher.

The <GlobalSearchBox> component displays a text input which lets the user enter a search query.

interface GlobalSearchBoxProps

Props passed to the GlobalSearchBox theme component.

Method Overview

cancel

Cancels the current search

setQuery

Sets a search query for the global search

Properties

A collection of objects which are passed to all ConversationList theme components.

query
: string

Marks the given message ID or conversation ID as the currently selected search result.

cancel

globalSearchBoxProps.cancel()

Cancels the current search

Returns

void

setQuery

globalSearchBoxProps.setQuery(query)

Sets a search query for the global search

Parameters

query
: string

Returns

void

Example

In the default theme, the <GlobalSearchBox> component is implemented as follows:

1// loading...