# SiPopoverDirective documentation

**Kind:** directive

**Selector:** `[siPopover]`

**Exported as:** `si-popover`

```
import { SiPopoverDirective } from '@siemens/element-ng/popover';
```

```
directive SiPopoverDirective implements OnDestroy
```

#### Input Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| [id](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L123-L123>) | `string` | `` `__popover-trigger_${this.popoverCounter}` `` | The ID of the trigger element. |
| [siPopover](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L46-L46>) | `TranslatableString \| TemplateRef<unknown> \| undefined` |  | The popover text to be displayed |
| [siPopoverContainerClass](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L80-L80>) | `string` | `''` | The class that will be applied to container of the popover |
| [siPopoverContext](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L94-L94>) | `unknown` | `undefined` | The context for the attached template |
| [siPopoverIcon](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L87-L87>) | `string \| undefined` | `undefined` | The icon to be displayed besides popover title |
| [siPopoverPlacement](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L53-L53>) | `"start" \| "end" \| "bottom" \| "auto" \| "top"` | `'auto'` | The placement of the popover. One of 'top', 'start', 'end', 'bottom' |
| [siPopoverScrollStrategy](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L101-L103>) | `ScrollStrategy` | `defaultConnectedOverlayScrollStrategy()` | CDK scroll strategy used for the popover overlay. |
| [siPopoverTitle](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L73-L73>) | `TranslatableString \| undefined` | `undefined` | The title to be displayed on top for the popover |

#### Output Properties

| Name | Type | Description |
| --- | --- | --- |
| [siPopoverVisibilityChange](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L108-L108>) | `boolean` | Emits `true` when the popover is shown, `false` when the popover is hidden. |

#### Attributes and Methods

##### hide

[Source for hide](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L162-L164>)

Hides the popover and emits 'hidden' event.

```
hide(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### placementInternal

[Source for placementInternal](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L55-L66>)

**Modifiers:** readonly

**Type:** `Signal<"start" | "end" | "bottom" | "auto" | "top">`

**Default:** `...`

##### show

[Source for show](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L143-L157>)

Displays popover and emits 'shown' event.

```
show(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

##### updatePosition

[Source for updatePosition](<https://github.com/siemens/element/blob/main/projects/element-ng/popover/si-popover.directive.ts#L169-L171>)

Updates the position of the popover based on the position strategy.

```
updatePosition(): void
```

**Returns:** [void](<https://www.typescriptlang.org/docs/handbook/2/functions.html#void>)

### Types Documentation

### [TranslatableString](<https://github.com/siemens/element/blob/main/projects/element-translate-ng/translate-types/global.types.ts#L18-L18>)

**Kind:** type alias

```
import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';
```

Represents a translatable string. This can either be a translation key, e.g. `ACTIONS.EDIT` that will be automatically translated when displayed on the UI or a pre-translated string, e.g. `Edit`. Equivalent to a normal string in usage and functionality.

```
type TranslatableString = string & Translatable
```
