Tooltip

On this page 7

A tooltip is a small, transient text label that appears next to an interface element when a user hovers over it with a pointer or moves keyboard focus to it, and disappears when that interaction ends. In UI design, tooltips provide supplementary information on demand, such as the name of an icon-only button, a keyboard shortcut or a short clarification of a field.

Tooltips are deliberately minimal: they contain plain text only, carry no interactive controls and should never hold information a user needs to complete a task. Their value lies in reducing visual clutter while keeping secondary details one gesture away.

How a tooltip works in an interface

A tooltip is triggered by a trigger element and rendered as a floating layer anchored to it. On desktop, the usual triggers are pointer hover and keyboard focus; the tooltip appears after a short delay, stays visible while the trigger remains active and closes when the pointer leaves, focus moves away or the user presses Escape.

Timing is central to a good implementation. A brief show delay prevents tooltips from flashing while the pointer crosses the screen, and a short hide delay lets the user move the pointer onto the tooltip without it vanishing. Many design systems also apply a warm-up behavior: once one tooltip has opened, neighboring tooltips open instantly as the user scans a toolbar.

The table below summarizes the parameters that most design systems define for tooltips, with typical value ranges.

ParameterTypical rangeWhat it affects
Show delay300 to 700 msPrevents accidental flashes during pointer travel
Hide delay0 to 300 msAllows the pointer to reach the tooltip
Maximum width200 to 320 pxKeeps text in short, readable lines
Offset from trigger4 to 8 pxSeparates the tooltip from the anchor
Text lengthOne phrase to two short sentencesDetermines whether a tooltip is appropriate at all
Typical tooltip parameters and their effects

Positioning is handled by a placement algorithm that prefers one side, typically above or below the trigger, and flips or shifts the tooltip when it would overflow the viewport. A small arrow, often called a caret or beak, points at the anchor so that the relationship remains clear in dense layouts.

Types of tooltips and their purposes

Tooltips fall into a few functional types, distinguished by what the text does for the user. The type determines length, wording and the accessibility pattern used to connect the tooltip to its trigger.

TypePurposeTypical content
Label tooltipNames an icon-only controlBold, Share, Delete
Description tooltipAdds context to a labeled controlExports the current view as a PDF
Shortcut hintTeaches a faster input methodUndo (Ctrl+Z)
Truncation revealShows text cut off by an ellipsisThe full file name or table cell value
Data tooltipReveals values in a chart or mapA date and the exact figure at that point
Functional tooltip types

Data tooltips in charts are a special case. They often contain several values and may follow the pointer, but they still follow the core rule that nothing inside a tooltip should be clickable.

Tooltip compared with popover, toast and modal dialog

A tooltip differs from related overlay components mainly in trigger, persistence and interactivity. Confusing these components is one of the most frequent errors in interface specifications, because a tooltip that grows links or buttons becomes inaccessible to keyboard and touch users.

ComponentTriggerInteractive contentDismissal
TooltipHover or focusNoAutomatic when trigger is left, or Escape
PopoverClick or tapYes, such as links and formsClick outside, close button or Escape
Toast notificationSystem eventOptional single actionTimeout or manual close
Modal dialogUser action or system eventYes, and it blocks the pageExplicit choice by the user
Tooltip and neighboring overlay components

The practical rule is simple: if the content needs links, buttons, images or more than about two sentences, it belongs in a popover or inline help text, not in a tooltip. Some systems use the term toggletip for a click-triggered bubble that holds brief text, which bridges the gap for touch screens.

Accessibility requirements for tooltips

Accessible tooltips must be reachable by keyboard, readable by screen readers and controllable by the user. The WAI-ARIA Authoring Practices describe a tooltip pattern in which the floating element has the role tooltip and the trigger references it through aria-describedby, so assistive technology announces the text when the trigger receives focus.

WCAG 2.2 success criterion 1.4.13, Content on Hover or Focus, sets three requirements. Additional content must be dismissible without moving the pointer or focus, usually with Escape; it must be hoverable, so the pointer can move over it without it closing; and it must remain persistent until the user dismisses it or the trigger loses hover or focus.

RequirementMeaningImplementation hint
DismissibleUser can close it without moving awayClose on Escape key press
HoverablePointer can move onto the tooltipUse a hide delay and a continuous hover area
PersistentStays until dismissed or trigger is leftNever close on a fixed timer
WCAG 1.4.13 requirements applied to tooltips

For icon-only buttons, the accessible name should come from aria-label or visually hidden text on the button itself, with the tooltip mirroring that name visually. Relying on the tooltip alone to name a control is fragile, because the tooltip may not exist in the accessibility tree until it is shown.

When to use a tooltip and common mistakes

Tooltips work best for recognition aids on experienced users’ paths: icon toolbars, compact data tables and dense editors where labels would crowd the layout. They work poorly for essential instructions, because users must discover them, and touch devices have no hover state, so many users never see them.

SituationRecommended patternReason
Icon-only toolbar buttonLabel tooltip plus accessible nameNames the control without adding clutter
Password rules on a formPersistent helper textUsers need the rules before typing
Long explanation with a linkPopover or toggletipTooltips cannot contain interactive content
Truncated cell in a tableTruncation tooltipReveals the full value on demand
Mobile-first interfaceVisible labels or tap-to-open helpHover does not exist on touch screens
Deciding whether a tooltip is the right pattern
  • Do not place critical or required information in a tooltip.
  • Do not attach tooltips to disabled buttons without a focusable wrapper, since disabled elements often cannot receive focus.
  • Do not repeat the visible label word for word; a redundant tooltip adds noise.
  • Do not let tooltips cover the content the user is trying to read or edit.

The idea in brief

A tooltip is like a small sticky note that appears only when you point at something. When you rest your mouse on an unfamiliar icon, a short label pops up and tells you what it does. Move the mouse away and the note disappears, so the screen stays tidy.

The main point is that tooltips are helpers, not instructions. They are handy for names and quick hints, but anything people must know should be visible on the screen from the start.

A practical scenario

A design team is building the editing toolbar of a web-based document editor. To save space, the toolbar uses 24 icon-only buttons for formatting, comments and sharing. Usability tests show that new users hesitate over several icons, while expert users find text labels distracting.

The team adds label tooltips with shortcut hints, such as Bold (Ctrl+B), with a 500 ms show delay and an instant warm-up so users can scan the toolbar quickly. Each button keeps its own aria-label, tooltips open on keyboard focus as well as hover, and Escape closes them, in line with WCAG 1.4.13. On tablets, the toolbar switches to a long-press label because hover is unavailable.

In follow-up testing, first-time users identify the comment and share functions noticeably faster, and keyboard users report learning shortcuts directly from the hints. The outcome confirms that tooltips work best as on-demand labels that support, rather than replace, a clear interface.