Skip to content
angulux
@anguless/angulux/tooltip

Tooltip

1 declaration3 demostooltip.md
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.

InputTypeDefaultDescription
tooltipPosition'right' | 'left' | 'top' | 'bottom' | string | undefinednot documentedPosition of the tooltip.
tooltipEvent'hover' | 'focus' | 'both'not documentedEvent 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.
positionStylestring | undefinednot documentedType of CSS position.
tooltipStyleClassstring | undefinednot documentedStyle class of the tooltip.
tooltipZIndexstring | undefinednot documentedWhether the z-index should be managed automatically to always go on top or have a fixed value.
escapebooleannot documentedBy default the tooltip contents are rendered as text. Set to false to support html tags in the content.
showDelaynumber | undefinednot documentedDelay to show the tooltip in milliseconds.
hideDelaynumber | undefinednot documentedDelay to hide the tooltip in milliseconds.
lifenumber | undefinednot documentedTime to wait in milliseconds to hide the tooltip even it is active.
positionTopnumber | undefinednot documentedSpecifies the additional vertical offset of the tooltip from its default position.
positionLeftnumber | undefinednot documentedSpecifies the additional horizontal offset of the tooltip from its default position.
autoHidebooleannot documentedWhether to hide tooltip when hovering over tooltip content.
fitContentbooleannot documentedAutomatically adjusts the element position when there is not enough space on the selected position.
hideOnEscapebooleannot documentedWhether to hide tooltip on escape key press.
showOnEllipsisbooleannot documentedWhether to show the tooltip only when the target text overflows (e.g., ellipsis is active).
aglTooltip
property content
string | TemplateRef<HTMLElement> | undefinednot documentedContent of the tooltip.
tooltipDisabled
property disabled
boolean false When present, it specifies that the component should be disabled.
tooltipOptionsTooltipOptions | undefinednot documentedSpecifies the tooltip configuration options for the component.
appendToHTMLElement | 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
deprecated — use pTooltipPT instead.
TooltipPassThrough | undefined undefined Used to pass attributes to DOM elements inside the Tooltip component.
pTooltipPTTooltipPassThrough | undefined undefined Used to pass attributes to DOM elements inside the Tooltip component.
pTooltipUnstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.

Inherited from BaseComponent

inherited
InputTypeDefaultDescription
dtObject | undefined undefined Defines scoped design tokens of the component.
unstyledboolean | undefined undefined Indicates whether the component should be rendered without styles.
ptPT | 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.
ptOptionsPassThroughOptions | undefined undefined Used to configure passthrough(pt) options of the component.