@anguless/angulux/tooltip
Tooltip
import
import { TooltipModule } from '@anguless/angulux/tooltip';Basic
aglTooltip attaches a tooltip to any element, with the text as its value.
<input aglInputText aglTooltip="Enter your username" placeholder="Hover or focus me" />Position
tooltipPosition places the tooltip on any of the four sides.
<agl-button label="Right" aglTooltip="Add" tooltipPosition="right" /><agl-button label="Top" aglTooltip="Add" tooltipPosition="top" /><agl-button label="Bottom" aglTooltip="Add" tooltipPosition="bottom" /><agl-button label="Left" aglTooltip="Add" tooltipPosition="left" />Delay
showDelay and hideDelay keep a tooltip from flickering on a passing cursor.
<agl-button label="Delayed" aglTooltip="Shown after a second" [showDelay]="1000" [hideDelay]="300" />API
Generated from the committed corpus, which check:corpus holds to the built library.
Tooltip
directive[aglTooltip]Tooltip directive provides advisory information for a component.
| Input | Type | Default | Description |
|---|---|---|---|
| tooltip | 'right' | 'left' | 'top' | 'bottom' | string | undefined | not documented | Position of the tooltip. |
| tooltip | '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. |
| position | string | undefined | not documented | Type of CSS position. |
| tooltip | string | undefined | not documented | Style class of the tooltip. |
| tooltip | 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. |
| show | number | undefined | not documented | Delay to show the tooltip in milliseconds. |
| hide | 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. |
| position | number | undefined | not documented | Specifies the additional vertical offset of the tooltip from its default position. |
| position | number | undefined | not documented | Specifies the additional horizontal offset of the tooltip from its default position. |
| auto | boolean | not documented | Whether to hide tooltip when hovering over tooltip content. |
| fit | boolean | not documented | Automatically adjusts the element position when there is not enough space on the selected position. |
| hide | boolean | not documented | Whether to hide tooltip on escape key press. |
| show | boolean | not documented | Whether to show the tooltip only when the target text overflows (e.g., ellipsis is active). |
| agl property content | string | TemplateRef<HTMLElement> | undefined | not documented | Content of the tooltip. |
| tooltip property disabled | boolean | false | When present, it specifies that the component should be disabled. |
| tooltip | TooltipOptions | undefined | not documented | Specifies the tooltip configuration options for the component. |
| append | 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). |
| pt deprecated — use pTooltipPT instead. | TooltipPassThrough | undefined | undefined | Used to pass attributes to DOM elements inside the Tooltip component. |
| p | TooltipPassThrough | undefined | undefined | Used to pass attributes to DOM elements inside the Tooltip component. |
| p | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
Inherited from BaseComponent
inherited| Input | Type | Default | Description |
|---|---|---|---|
| dt | Object | undefined | undefined | Defines scoped design tokens of the component. |
| unstyled | boolean | undefined | undefined | Indicates whether the component should be rendered without styles. |
| pt | PT | undefined | undefined | Used to pass attributes to DOM elements inside the component. Keys become attributes, and a key that names a DOM property is also assigned to that property. Values the browser would execute go through Angular's sanitizer first, as in a template binding: markup in `innerHTML`, `outerHTML` and `srcdoc`, and URLs in `href`, `src`, `action`, `formaction` and `xlink:href`. To write one of those unsanitized on purpose, pass a `DomSanitizer.bypassSecurityTrustHtml` or `bypassSecurityTrustUrl` value. An `on*` key must be a function, and any other value for it is ignored. Keys themselves are applied as given, so let data from users choose values, never keys. |
| pt | PassThroughOptions | undefined | undefined | Used to configure passthrough(pt) options of the component. |