Vue playground

Nova v3.37.0

Preview

Vue

Tooltip

nv-tooltip

A short text hint that appears next to an element on hover or keyboard focus.

Live demo

Placement

Use a tooltip for a brief, helpful hint: what an icon button does, what an abbreviation means, or a shortcut. Keep it to a few words. Don't put essential information in a tooltip, because touch users may never see it, and don't put links or buttons inside one; use a popover for interactive content.

Anatomy

A tooltip reading Tooltip message. Callouts mark 1 the content and 2 the arrow below it.

The parts of a tooltip.
  1. Content: the message, with optional non-interactive detail in the content slot.
  2. Arrow: points to the trigger.

The trigger is the element in the default slot. It must be focusable, such as a button, or have tabindex="0".

Look and feel

Spark and Ocean provide the tooltip surface and arrow in light and dark modes. Keep custom content brief and non-interactive; if many elements need long explanations, improve the visible labels instead.

Placement

Use top, right, bottom or left, with optional -start or -end alignment; bottom is the default. Positioning adjusts when space is tight. Use strategy="fixed" when the tooltip needs to escape a scrolling or clipped container; the default is absolute. Check placement at viewport edges.

Behaviour

The tooltip opens when the pointer rests on the trigger or the trigger gets keyboard focus, after enterDelay milliseconds. It closes when the pointer leaves, focus moves away or Escape is pressed. openChanged reports when it opens and closes; there is no open property.

Accessibility

The message isn't linked to the trigger for assistive technology, so give every trigger its own accessible name.

Sources