Skip to main content
  1. Docs
  2. Components
  3. Overlays

Tooltip

A short label for a control, most often an icon-only button. Never essential, never interactive.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<div role="tooltip">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Naming an icon-only control.
  • A shortcut beside a tool's name: "Bold (Ctrl+B)".
  • A detail nice to know: the full file name.
Not for
  • Anything essential, or interactivePopover
  • An error, or why something's disabledText field

02

Anatomy

  1. 1tooltip-popup<div role="tooltip">The text: short, on the side it opens on.
  2. 2tooltip-arrow<div>The pointer, facing the trigger; it follows it as the popup shifts.
  3. 3icon-button<button>Its trigger: one element that takes a ref.

03

Do and don't

A few words
DoA label, read at a glance.
Don'tA paragraph that vanishes when the pointer moves.

04

Content

  • A label or a shortcut: "Download invoice", "Bold (Ctrl+B)".
  • Sentence case, no full stop.
  • Never the only place something is said.
Next — TooltipAPI