# UseGridOverlayOptions

> _Since v1.4.0_

Options for useGridOverlay.

## Properties

| Property | Type | Description |
| -------- | ---- | ----------- |
| `open?` | <code>boolean</code> | Whether the overlay is currently open. |
| `gridElement?` | <code><a href="/grid/api/core/classes/datagridelement/">DataGridElement</a>&lt;any&gt; &#124; unknown</code> | Optional explicit grid element. When omitted, the hook resolves the grid by: |

### Property Details

#### `open`

Whether the overlay is currently open.

Set to `false` to unregister the panel without unmounting it (e.g. when
the consumer toggles visibility via CSS rather than conditional render).
Defaults to `true`.

---

#### `gridElement`

Optional explicit grid element. When omitted, the hook resolves the
grid by:

1. Walking up the DOM from `panelRef.current` via `closest('tbw-grid, [data-tbw-grid]')`
   (works for inline overlays).
2. Falling back to the `GridElementContext` populated by
   `<DataGrid>` / `<GridProvider>` (works for portal-rendered overlays
   whose DOM is detached from the grid subtree).

---
