Tooltip
Supplementary text on hover and on keyboard focus, dismissible with Escape.
Live preview
Source
The exact file rendered in the preview above.
components/demos/tooltip.tsx
components/ui/tooltip.tsx
Demo source — adapt to your project. Foundry is not published as a package.
Usage
For naming icon-only controls and adding a short hint. A tooltip must never hold the only copy of important information, and must never contain interactive content.
- Opens on focus as well as hover — a hover-only tooltip is invisible to keyboard users, and it is the single most common tooltip bug.
- Escape dismisses it, as required by WCAG 1.4.13.
- The trigger still needs its own accessible name; the tooltip describes, it does not name.
Variants and states
Every entry below is a genuine difference in behaviour or layout, and every one of them is visible in the preview above.
- Four sides
- Icon-only control labelling
- Longer explanatory content
Accessibility
- Description not name
- Wired with `aria-describedby`, so the button keeps its own label.
- Dismissible
- Escape closes it without moving focus.
- Delay
- A short open delay stops tooltips firing as a pointer crosses a toolbar.
Foundry implements published ARIA patterns and is tested against them. No WCAG certification is claimed — see the accessibility documentation for what is and is not covered.
Related
All componentsPopover
A non-modal layer with six CSS placements — the page behind stays interactive.
intermediate3 variantsButton
The complete action surface: nine variants, five sizes, and a loading state that preserves the control’s measured width.
starterFeatured7 variantsDropdown menu
The ARIA menu-button pattern with grouped items, roving focus, shortcuts and destructive styling.
intermediateFeatured6 variants