Компоненты PrimeNG
Tooltip

Тултип

PrimeNG/Tooltip (opens in a new tab)

Директива всплывающей подсказки предоставляет консультативную информацию для компонента.

С чего начать

Подключите модуль

import { TooltipModule } from 'primeng/tooltip';

Встройте компонент с помощью директивы pTooltip.

Positions

Focus and Blur

Button

Sizes

Свойства

NameTypeDefaultDescription
pTooltipstringnullText of the tooltip.
tooltipPositionstringrightPosition of the tooltip, valid values are right, left, top and bottom.
tooltipEventstringhoverEvent to show the tooltip, valid values are hover and focus.
positionStylestringabsoluteType of CSS position.
tooltipDisabledbooleanfalseWhen present, it specifies that the component should be disabled.
appendTostringanyTarget element to attach the overlay, valid values are "body", "target" 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).
hideDelaynumbernullDelay to hide the tooltip in milliseconds.
showDelaynumbernullDelay to show the tooltip in milliseconds.
lifenumbernullTime to wait in milliseconds to hide the tooltip even it is active.
tooltipStyleClassstringnullStyle class of the tooltip.
escapebooleantrueBy default the tooltip contents are rendered as text. Set to false to support html tags in the content.
tooltipZIndexstringautoWhether the z-index should be managed automatically to always go on top or have a fixed value.

Стилизация

NameElement
p-tooltipContainer element.
p-tooltip-arrowArrow of the tooltip.
p-tooltip-textText of the tooltip.