Box component

In this article

This component represents the container that includes all other box components.

It inherits from a SearchInterface component and therefore also supports all of its options.



Specifies if the box should automatically include an analytics component.

If you already have one on the page, then it’s not added twice. However, setting it to false removes it from the page on initialization.

The default value is true.

<div data-with-analytics="true"></div>


Specifies if you want to save and reload the Box state when the page is closed and reopened.

This saves the current state of the current tab that’s selected.

If set to false, the tab reverts to the default one at each page load.

If set to true, each time you reload the page, the last tab that you selected will be automatically selected.

The default value is true.

<div data-enable-box-state-history="true"></div>



Triggers a resize of the box so that it occupies the full page height and width. This is automatically called whenever the page is resized.



<div class='CoveoBox'></div>