The SearchBox headless controller offers a high-level interface for designing a common search box UI controller with highlighting for query suggestions.

Example: search-box.fn.tsx

interface SearchBox {
    state: SearchBoxState;
    clear(): void;
    selectSuggestion(value: string): void;
    showSuggestions(): void;
    submit(): void;
    subscribe(listener: () => void): Unsubscribe;
    updateText(value: string): void;
}

Hierarchy (View Summary)

Methods

Properties

The state of the SearchBox controller.