Skip to content

Tooltip

Wraps its slotted trigger and shows a role="tooltip" popup on hover or keyboard focus (via focusin/focusout, not just mouse), per WCAG 1.4.13.

Known limitation: aria-describedby is applied to the <and-tooltip> host element, not to the slotted trigger itself (a custom element can’t reach into and mutate arbitrary slotted content). If your trigger is a focusable element like a <button>, consider also adding aria-describedby on it directly, pointing at this tooltip, for the most reliable screen-reader announcement.

Hover me
<and-tooltip content="Saves your changes" placement="top">
<and-button variant="outline">Hover me</and-button>
</and-tooltip>
PropertyAttributeDescriptionTypeDefault
closeDelayclose-delayDelay in ms before hiding the tooltip.number0
contentcontentText content of the tooltip (alternative: use the content slot).stringundefined
openDelayopen-delayDelay in ms before showing the tooltip.number0
placementplacementPreferred placement of the tooltip relative to its trigger."bottom" | "left" | "right" | "top"'top'