@coveo/headless
    Preparing search index...

    Interface CoreSearchBoxInternal

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

    interface CoreSearchBox {
        state: SearchBoxState;
        clear(): void;
        selectSuggestion(value: string): void;
        showSuggestions(): void;
        submit(
            legacyAnalytics?: LegacySearchAction,
            nextAnalytics?: SearchAction,
        ): void;
        subscribe(listener: () => void): Unsubscribe;
        updateText(value: string): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Deselects all facets and triggers a search query.

      Parameters

      • OptionallegacyAnalytics: LegacySearchAction

        The legacy analytics action to log after submitting a query.

      • OptionalnextAnalytics: SearchAction

        The next analytics action to log after submitting a query.

      Returns void

    Properties

    The state of the SearchBox controller.