Skip to content

Tooltip

Overview

Tooltip provides a brief, informative message that appears when a user hovers over or focuses on an element. Follows WAI-ARIA tooltip pattern with role="tooltip".

Usage

<button aria-describedby="tip-1">Hover me</button>
<div id="tip-1" role="tooltip" class="pm-tooltip pm-tooltip--top">
Helpful description
</div>

Guidelines

  • Keep tooltip content short (1-2 sentences max)
  • Never put essential information in tooltips
  • Use aria-describedby to associate the tooltip with its trigger
  • Tooltips should not contain interactive content

API

PropTypeDefaultDescription
placementTooltipPlacement"top"Position relative to the trigger