CommunitySearchBox Lightning Component

The CommunitySearchBox Lightning component lets you change the search box in your Experience Cloud site.

It takes care of wrapping and including the correct scripts and different resource references needed to do so.


Reference it in your Lightning component as you would for any other Aura component, using the namespace prefix of the Coveo package.

<aura:component implements='forceCommunity:searchInterface'>

Resources Included With This Component

This component includes the Coveo JavaScript Search Framework, the jQuery (latest 3.x.x version) library, and the Coveo for Salesforce specific assets.


Since Lightning Locker is automatically enabled on this component, the underscore result templates aren’t supported. You must use HTML templates instead.

Aura Event

This component doesn’t offer any Aura events.


The component offers the following options:


The name of the Coveo Search component you want to associate to your search box.

Default value is communitySearchCoveo.


It’s good practice to use the same name value as your Community Search component.


The name of the search hub used for Coveo Usage Analytics (Coveo UA) reports.

Default value is the same value as name.


It’s good practice to use the same searchHub value as your Community Search component.


The placeholder text to put in the search box when no query is entered.

Default value is empty.


Specifies whether to trigger a query when the search box is cleared.

Default value is true.


Specifies whether special characters should be interpreted as Coveo query syntax (see Querybox - enableQuerySyntax).

Default value is false.


Specifies whether to enable Coveo Machine Learning (Coveo ML) for query suggestions (see Omnibox - enableQuerySuggestAddon).

Default value is true.


The page where your search box should redirect.

Depending on your Salesforce version, the value should either be:

Before Winter '18: search/all/home/%40uri

Winter '18 and up: global-search/%40uri


Whether to use the non-minified versions of the different resources.

Default value is false.


Provides end users with scoped query suggestions based on the values of a specific facet-enabled field (see Facet Value Suggestion Fields).

Default value is empty.