# PopupOptions

**Kind**: interface | **Module**: [Workspaces](https://docs.interop.io/desktop/reference/javascript/workspaces/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/workspaces/popupoptions/index.html

Options for creating a popup window.

## Properties

- **`focus`** (`boolean`, optional) default: `true` *(since io.Connect Desktop 10.0)*
  If `true`, the popup window will gain focus when shown and will hide automatically when it loses focus. If `false`, the popup window won't be on focus when shown and won't hide automatically if it gains and loses focus afterwards. If you set this to `false`, you will be responsible for implementing the conditions and the mechanism for hiding/closing the popup window.
- **`horizontalOffset`** (`number`, optional)
  Horizontal offset from the area around which the popup will appear (the area defined in the `targetBounds` property).
  Valid only if the target location of the popup window is set to `"left"` or `"right"`.
- **`size`** (`Size`, required)
  Size for the popup window.
- **`targetBounds`** (`Bounds`, required)
  Bounds of the area around which the popup window will appear.
- **`targetLocation`** (`PopupTargetLocation`, required)
  Location where the popup will appear relative to the area around which the popup window will appear (the area defined in the `targetBounds` property).
  If `"none"` is passed, the popup will appear at the top left corner of the area defined in the `targetBounds` property.
- **`verticalOffset`** (`number`, optional)
  Vertical offset from the area around which the popup will appear (the area defined in the `targetBounds` property).
  Valid only if the target location of the popup window is set to `"top"` or `"bottom"`.
- **`windowId`** (`string`, required)
  ID of the window which will be used as a popup window.

## Related types

- [Bounds](https://docs.interop.io/desktop/reference/javascript/workspaces/bounds/index.md)
- [PopupTargetLocation](https://docs.interop.io/desktop/reference/javascript/workspaces/popuptargetlocation/index.md)
- [Size](https://docs.interop.io/desktop/reference/javascript/workspaces/size/index.md)
