Tooltip

A tooltip is a descriptive or supplementary element that is displayed when an object is focused or hovered over.

Introduction

The tooltip component provides contextual information when users hover over, focus on, or interact with an element. It enhances usability by offering additional details without cluttering the interface. Tooltips are especially useful for clarifying icons, abbreviations, or complex functionalities, ensuring users can access helpful explanations without disrupting their workflow.

Anatomy

Tooltip's anatomy
  1. 1.
    Container: it's the structure that holds the component's content. It appears near the target element when triggered and provides a contrasting background to ensure readability.
  2. 2.
    Icon: a small directional indicator, often in the form of a triangle or arrow, that visually connects the tooltip to the element it describes, reinforcing the relationship between them.
  3. 3.
    Label: the text content inside the component that provides additional context or information about the associated element, ensuring clarity without taking up permanent screen space.

Placing tooltips

Depending on the tooltip's placement relative to the object it describes, there are four possible configurations: top, right, bottom, and left.

Tooltip positions

Best practices

  • Use tooltips for clarification, not essential information: tooltips should provide additional context for UI elements but should not contain crucial instructions or actions users must take to complete a task.
  • Keep content short and clear: avoid long sentences or excessive details. The tooltip should be a quick reference, not a replacement for proper UI labels or descriptions.
  • Ensure tooltips are accessible: they should be triggered not only on hover but also on keyboard focus so that users navigating with assistive technologies can access them.
  • Place tooltips thoughtfully: they should not obstruct important content or interactive elements. Position them near the element they describe while maintaining readability.
  • Avoid excessive tooltips: overuse can clutter the interface and become distracting. If too many tooltips are needed, consider improving the overall UI clarity instead.
  • Use appropriate dismissal behavior: tooltips should disappear when users move away from the trigger but remain visible long enough to be read comfortably. A short delay before appearing can prevent accidental activations.
  • Do not use tooltips for critical messages: warnings, errors, or essential system feedback should be displayed using more persistent components like alerts, modals, or inline messages.