---
title: Box component (Deprecated)
slug: '1282'
canonical_url: https://docs.coveo.com/en/1282/
collection: coveo-for-salesforce
source_format: adoc
---
# Box component (Deprecated)
> **Deprecated**
>
> This feature is still available, but no longer supported as of the August 2023 release of Coveo for Salesforce version [5.2](https://docs.coveo.com/en/n5bj0150.md#august-2023-release-v5-2-initial-release).

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

It inherits from a [SearchInterface component](https://coveo.github.io/search-ui/components/searchinterface.html) and therefore also supports all of its options.

## Options

### withAnalytics

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`.

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

### enableBoxStateHistory

Saves and reloads 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`.

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

## Methods

### resize

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.

```javascript
$('#MyCoveoBox').coveo('resize');
```

## Usage

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