# overlay

```ts
import { OverlayModule } from '@anguless/angulux/overlay';
```

## Overlay

`agl-overlay` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

This API allows overlay components to be controlled from the AnguluxConfig. In this way, all overlay components in the application can have the same behavior.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `hostName` | `string` | _not documented_ |  |
| `visible` | `boolean` | `false` | The visible property is an input that determines the visibility of the component. |
| `mode` | `OverlayModeType \| string` | `null` | The mode property is an input that determines the overlay mode type or string. |
| `style` | `{ [klass: string]: any } \| null \| undefined` | `null` | The style property is an input that determines the style object for the component. |
| `styleClass` | `string` | `null` | The styleClass property is an input that determines the CSS class(es) for the component. |
| `contentStyle` | `{ [klass: string]: any } \| null \| undefined` | `null` | The contentStyle property is an input that determines the style object for the content of the component. |
| `contentStyleClass` | `string` | `null` | The contentStyleClass property is an input that determines the CSS class(es) for the content of the component. |
| `target` | `string \| null \| undefined` | `null` | The target property is an input that specifies the target element or selector for the component. |
| `autoZIndex` | `boolean` | `false` | The autoZIndex determines whether to automatically manage layering. Its default value is 'false'. |
| `baseZIndex` | `number` | `null` | The baseZIndex is base zIndex value to use in layering. |
| `showTransitionOptions` | `string` | `.12s cubic-bezier(0, 0, 0.2, 1)` | Transition options of the show or hide animation. **Deprecated:** since v21.0.0. Use `motionOptions` instead. |
| `hideTransitionOptions` | `string` | `.1s linear` | The hideTransitionOptions property is an input that determines the CSS transition options for hiding the component. **Deprecated:** since v21.0.0. Use `motionOptions` instead. |
| `listener` | `any` | `null` | The listener property is an input that specifies the listener object for the component. |
| `responsive` | `ResponsiveOverlayOptions \| undefined` | `null` | It is the option used to determine in which mode it should appear according to the given media or breakpoint. |
| `options` | `OverlayOptions \| undefined` | `null` | The options property is an input that specifies the overlay options for the component. |
| `appendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| 'self' \| 'body' \| null \| undefined \| any` | `'self'` | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
| `inline` | `boolean` | `false` | Specifies whether the overlay should be rendered inline within the current component's template. |
| `motionOptions` | `MotionOptions \| undefined` | _not documented_ | The motion options. |
| `hostAttrSelector` | `string` | _not documented_ |  |

| Output | Type | Description |
| --- | --- | --- |
| `visibleChange` | `EventEmitter<boolean>` | This EventEmitter is used to notify changes in the visibility state of a component. |
| `onBeforeShow` | `EventEmitter<OverlayOnBeforeShowEvent>` | Callback to invoke before the overlay is shown. |
| `onShow` | `EventEmitter<OverlayOnShowEvent>` | Callback to invoke when the overlay is shown. |
| `onBeforeHide` | `EventEmitter<OverlayOnBeforeHideEvent>` | Callback to invoke before the overlay is hidden. |
| `onHide` | `EventEmitter<OverlayOnHideEvent>` | Callback to invoke when the overlay is hidden |
| `onAnimationStart` | `EventEmitter<AnimationEvent>` | Callback to invoke when the animation is started. |
| `onAnimationDone` | `EventEmitter<AnimationEvent>` | Callback to invoke when the animation is done. |
| `onBeforeEnter` | `EventEmitter<MotionEvent>` | Callback to invoke before the overlay enters. |
| `onEnter` | `EventEmitter<MotionEvent>` | Callback to invoke when the overlay enters. |
| `onAfterEnter` | `EventEmitter<MotionEvent>` | Callback to invoke after the overlay has entered. |
| `onBeforeLeave` | `EventEmitter<MotionEvent>` | Callback to invoke before the overlay leaves. |
| `onLeave` | `EventEmitter<MotionEvent>` | Callback to invoke when the overlay leaves. |
| `onAfterLeave` | `EventEmitter<MotionEvent>` | Callback to invoke after the overlay has left. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #content>` | `contentTemplate` | Content template of the component. |
