Integrated ResearchPicasso
Components

Tooltip

A short explanation attached to a control, on hover or focus.

{/* Generated by scripts/build-component-docs.mjs — do not edit. The source is the component folder: guidance.json, the doc block and the props. Change those. */}

A short explanation attached to a control, on hover or focus.

Import

import { TooltipProvider, Tooltip, TooltipTrigger, TooltipContent } from "@ir/ui";

Props

Takes the props of the element it renders, and nothing of its own — styling is the component's business, not the caller's.

Do and don't

Put it in the field's hint, where it is always visible.

Don't — Put something the person needs in order to finish the task in a tooltip.

A tooltip is invisible until you go looking for it, and on touch it may never appear at all.

Use a Popover for anything interactive.

Don't — Put links, buttons or a form inside a tooltip.

A tooltip closes when the pointer leaves, so nothing inside it can reliably be clicked.

Give the button an aria-label, and use the tooltip for the extra detail.

Don't — Rely on a tooltip to name an icon-only button.

A tooltip describes; it does not name. A control with no accessible name is unusable without one.

One sentence, up to about two lines.

Don't — Write a paragraph.

It sits over the content the person is reading, and it leaves as soon as they move.

Say what saving will do, or say nothing.

Don't — Tooltip a 'Save' button with 'Save'.

A tooltip that repeats the label teaches people that tooltips are not worth opening.

Accessibility

  • Radix points the trigger's aria-describedby at the content, so the tooltip describes the control rather than naming it.
  • A tooltip is never the only place something is said. It does not appear on touch, and it is not reachable as content — an icon-only button still needs its own aria-label.
  • The 300ms default delay is on the Provider. Lowering it per-tooltip makes a toolbar flicker as the pointer crosses it.

Where it is drawn

Figma — structure from figma, measurements from figma.

Open in Storybook

On this page