---
url: /api/formats/interactions/src/functions/initResponsiveOverlay.md
---
[pantoken-root](../../../../index.md) / [formats/interactions/src](../index.md) / initResponsiveOverlay

# Function: initResponsiveOverlay()

> **initResponsiveOverlay**(`host`, `onCommand`): `void`

Wire open/close commands plus width-based responsive overlay switching onto a host: any
collapsible side panel (e.g. a drawer's tray) can import this interaction rather than each
component reimplementing it.

## Parameters

### host

`HTMLElement`

### onCommand

[`OnCommand`](../type-aliases/OnCommand.md)

## Returns

`void`
