Skip to content

Tooltip

The tooltip component.

  • Import
    import "@tapsioss/web-components/tooltip";
  • Tag
    <tapsi-tooltip></tapsi-tooltip>

Properties

NameDescriptionTypeDefault Value
placementThe position of the tooltip based on the anchor."top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end""top"
dismissibleWhether tooltip is dismissable or not.booleantrue
textThe text content of the tooltip.string""
visibleWhether the tooltip is visible or not.booleanfalse
no-hover-activationWhether to prevent showing tooltip on hover or not.booleanfalse
no-focus-activationWhether to prevent showing tooltip on focus or not.booleanfalse
no-escape-deactivationWhether to hide tooltip on escape or not.booleanfalse
anchorThe id of the anchor element.string""

Events

NameDescriptionType
showFires when the tooltip should be visible. (Cancelable)ShowEvent
hideFires when the tooltip should be hidden. (Cancelable)HideEvent

TIP

You can import custom event names:

ts
import { 
  ShowEvent,
  HideEvent
} from "@tapsioss/web-components/tooltip";

element.addEventListener(ShowEvent.type, handleTapsiTooltipShow);
element.addEventListener(HideEvent.type, handleTapsiTooltipHide);