tooltip

A small text label that appears when a control is hovered or focused, describing it briefly.

In more detail

A tooltip must contain no interactive content, must appear on keyboard focus as well as hover, must close on Escape and is linked to its trigger with aria-describedby (or supplies the name of an icon button). Anything interactive belongs in a popover instead.

Example

The course measures the anchor with getBoundingClientRect in useLayoutEffect, and renders tooltips in a portal so parent overflow does not clip them.

Related terms

Taught in

References