# getOverlay Type documentation

## TypeScript declaration

### [getOverlay](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L87-L98>)

**Kind:** function

```
import { getOverlay } from '@siemens/element-ng/common';
```

```
OverlayRef
```

```
getOverlay(elementRef: ElementRef<any>, overlay: Overlay, hasBackdrop: boolean, placement: "start" | "end" | "bottom" | "auto" | ConnectionPositionPair[] | "top", constrain?: boolean = false, center?: boolean = true, scrollStrategy?: ScrollStrategy): OverlayRef
```

#### Parameters

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [elementRef](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L88-L88>) | `ElementRef<any>` |  |  |
| [overlay](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L89-L89>) | `Overlay` |  |  |
| [hasBackdrop](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L90-L90>) | `boolean` |  |  |
| [placement](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L91-L91>) | `"start" \| "end" \| "bottom" \| "auto" \| ConnectionPositionPair[] \| "top"` |  |  |
| [constrain](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L92-L92>) (optional) | `boolean` | `false` |  |
| [center](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L93-L93>) (optional) | `boolean` | `true` |  |
| [scrollStrategy](<https://github.com/siemens/element/blob/main/projects/element-ng/common/helpers/overlay-helper.ts#L94-L94>) (optional) | `ScrollStrategy` |  |  |

**Returns:** [OverlayRef](<https://material.angular.dev/cdk/overlay/api#OverlayRef>)
