AddThisFeature

Tooltip System

Give every control the same short, reachable explanation on hover and on focus.

moderate Components & Primitives

What it adds

One tooltip component with consistent timing, placement, accessible naming, and dismissal across the app.

What your agent is told to do

5
  1. 1

    Find every ad-hoc hint in the app — native title attributes, hand-rolled bubbles, help text hidden behind an icon — and replace them with one component so timing and styling stop varying by screen.

  2. 2

    Show tooltips on pointer hover and on keyboard focus alike. A tooltip only a mouse can reach is invisible to a portion of your users.

  3. 3

    Use a short opening delay and a shorter closing one, and share the delay across the group so moving along a row of icon buttons does not replay the opening delay for each.

  4. 4

    Decide per tooltip whether its text names the control or describes it, and associate it accordingly — an icon-only button usually needs a name, a labelled field usually needs a description.

  5. 5

    Placement, flipping, and viewport clamping belong to the Popover Positioning Engine. Consume it rather than writing a second set of offset calculations here.

Edge cases it handles

7
  • Anything the user must read to complete the task — a validation rule, a required format, a warning about a destructive action — does not belong in a tooltip. Tooltips are unreachable on touch, invisible when printed, and gone the moment the pointer moves; put essential instructions in persistent text.
  • Touch devices have no hover state, so a tooltip bound to hover either never appears or appears on tap and then sticks until the user taps elsewhere. Decide explicitly: suppress it on touch, or bind it to a deliberate long-press that dismisses on the next tap anywhere.
  • A tooltip near the edge of the window must flip or shift to stay fully visible, and must never be clipped by an overflow-hidden ancestor such as a table cell or a card.
  • Escape must dismiss a visible tooltip without closing the surrounding dialog or menu, and the tooltip must never take focus, since a tooltip the user can tab into is a menu wearing the wrong clothes.
  • A tooltip must not obscure the control it describes, nor the next control the user is heading for.
  • The tooltip must disappear when its trigger is disabled, removed, or scrolled out of view, rather than lingering over unrelated content.
  • A control that already has a visible text label rarely needs a tooltip repeating it; duplicating the label makes screen readers announce the same words twice.

Definition of done

9
  • Every hint in the app is rendered by the one tooltip component, with no native title attributes left behind.
  • Tooltips appear on keyboard focus as well as pointer hover.
  • No essential instruction or validation rule exists only inside a tooltip.
  • Touch interaction has a defined behaviour that leaves no bubble stuck on screen.
  • Tooltips stay within the viewport and are never clipped by an ancestor.
  • Escape dismisses the tooltip only, and the tooltip never receives focus.
  • Positioning is delegated to the shared positioning engine.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.