> For the complete documentation index, see [llms.txt](https://knowledgebase.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.ajaxsearchpro.com/hooks/javascript-hooks/asp_compact_width.md).

# asp\_compact\_width

The final width of the [compact box](https://documentation.ajaxsearchpro.com/layout-settings/compact-search-box-layout), before it opens.

```javascript
WPD.Hooks.applyFilters('asp_compact_width', width, searchId, searchInstanceId);
```

#### Example

```javascript
window.addEventListener("load", () => {
	WPD.Hooks.addFilter('asp_compact_width', function(width){
		return '300px';
	}, 10);
});
```
