Skip to main content

Tooltip

Tooltip | Mouseover popup tooltip shadow

The Tooltip element is used to display a popup tooltip on mouseover and can be attached to various elements of a web page. It is easily customizable with attributes for content and location. The tooltip appears when the user hovers the mouse over the target element, and disappears when the mouse leaves the element.

Basic Usage

Attributes and Properties

active

DescriptionIf true, the tooltip is activated.
Attributeactive
Typeboolean
Defaultfalse

content

DescriptionDefines the content of the tooltip.
Attributecontent
Typestring
Defaultundefined

placement

DescriptionDefines where to display the tooltip relative to the parent element.
Attributeplacement
Type"bottom" | "left" | "right" | "top"
Default'top'

offset

DescriptionDefines the distance of the tooltip from its parent element in pixels.
Attributeoffset
Typestring
Defaultundefined

Events

NameDescription
changeCalled when the element state changes.

Methods

No public methods available for this component.

CSS Shadow Parts

NameDescription
nativeRefers to the div element inside the popup element.

CSS Custom Properties

NameDescription
--arrow-sizeSpecifies the size of the tooltip arrow.
--arrow-colorSpecifies the color of the tooltip arrow.

Slots

No slots available for this component.