# tooltip

```ts
import { TooltipModule } from '@anguless/angulux/tooltip';
```

## Tooltip

`[aglTooltip]` — directive

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

Tooltip directive provides advisory information for a component.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `tooltipPosition` | `'right' \| 'left' \| 'top' \| 'bottom' \| string \| undefined` | _not documented_ | Position of the tooltip. |
| `tooltipEvent` | `'hover' \| 'focus' \| 'both'` | _not documented_ | Event to show the tooltip. The default, 'both', shows it on hover and on keyboard focus: with hover alone, a keyboard user never saw it (WCAG 2.1.1). Focus moved by a script after a mouse click, as when a dialog focuses a control as it opens, does not show it. 'focus' shows it on any focus; 'hover' on hover only. |
| `positionStyle` | `string \| undefined` | _not documented_ | Type of CSS position. |
| `tooltipStyleClass` | `string \| undefined` | _not documented_ | Style class of the tooltip. |
| `tooltipZIndex` | `string \| undefined` | _not documented_ | Whether the z-index should be managed automatically to always go on top or have a fixed value. |
| `escape` | `boolean` | _not documented_ | By default the tooltip contents are rendered as text. Set to false to support html tags in the content. |
| `showDelay` | `number \| undefined` | _not documented_ | Delay to show the tooltip in milliseconds. |
| `hideDelay` | `number \| undefined` | _not documented_ | Delay to hide the tooltip in milliseconds. |
| `life` | `number \| undefined` | _not documented_ | Time to wait in milliseconds to hide the tooltip even it is active. |
| `positionTop` | `number \| undefined` | _not documented_ | Specifies the additional vertical offset of the tooltip from its default position. |
| `positionLeft` | `number \| undefined` | _not documented_ | Specifies the additional horizontal offset of the tooltip from its default position. |
| `autoHide` | `boolean` | _not documented_ | Whether to hide tooltip when hovering over tooltip content. |
| `fitContent` | `boolean` | _not documented_ | Automatically adjusts the element position when there is not enough space on the selected position. |
| `hideOnEscape` | `boolean` | _not documented_ | Whether to hide tooltip on escape key press. |
| `showOnEllipsis` | `boolean` | _not documented_ | Whether to show the tooltip only when the target text overflows (e.g., ellipsis is active). |
| `aglTooltip` | `string \| TemplateRef<HTMLElement> \| undefined` | _not documented_ | Content of the tooltip. _(property `content`)_ |
| `tooltipDisabled` | `boolean` | `false` | When present, it specifies that the component should be disabled. _(property `disabled`)_ |
| `tooltipOptions` | `TooltipOptions \| undefined` | _not documented_ | Specifies the tooltip configuration 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). |
| `ptTooltip` | `TooltipPassThrough \| undefined` | `undefined` | Used to pass attributes to DOM elements inside the Tooltip component. **Deprecated:** use pTooltipPT instead. |
| `pTooltipPT` | `TooltipPassThrough \| undefined` | `undefined` | Used to pass attributes to DOM elements inside the Tooltip component. |
| `pTooltipUnstyled` | `boolean \| undefined` | `undefined` | Indicates whether the component should be rendered without styles. |
