CommunitySearchBox Lightning Component

The CommunitySearchBox Lightning component lets you change the search box in your Lightning community.

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 Visualforce component that should act as your search interface for your CommunitySeachBox component.

Default value is communitySearchCoveo.


The name of the search hub to enforce when authenticating a query with this search token, which can also be used in query pipeline condition statements.

This option should have the same value as name.


The placeholder text to put in the searchbox.

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 name of the community page your Coveo Search component is on.

Default value is empty.


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 Providing Facet Value Suggestions).

Default value is empty.

What's Next for Me?