Skip to content
Site volume
Colourway

Components

Tooltip

A slab pill that repeats a control's name or nearby words, never the only copy of a fact.

Import from@maxgrits/overprint-react/tooltip
On this page

Example#

Look of this example
Copy link
Live render of examples/tooltip/basic.tsx

Usage#

Use a tooltip to repeat a control's name or nearby words on hover and focus, mostly for icon buttons. It is a slab pill that opens after a short wait and closes at once.

  • Never the only copy. A tooltip repeats what the control's name or the page already says. Anything people need to read lives on the page.
  • No touch. Tooltips do not show on touch screens; the name is still announced, which is why it must not hold anything new.
  • Behaviour. It opens after 400 ms (300 ms when moving between triggers), can be hovered, and closes on Escape (WCAG 1.4.13).
  • More than a line, or anything with a link or a control, is a Popover.

Anatomy#

Copy link
The parts of examples/tooltip/basic.tsx, numbered:
  1. PillThe slab with paper text in the label role, 280 px at most..mk-tooltip-popup
  2. Arrow8 px, pointing at the trigger..mk-tooltip-arrow
  3. TriggerThe control it describes..mk-button

Volume#

Reading layer: identical at every volume.

  • Quiet

    Copy link

    Docs, forms, legal and long reads. Flat inks, no art in motion.

  • Studio

    Copy link

    The site default. Art on its own plates, one display moment per view.

  • Press

    Copy link

    Hero moments, covers and campaigns. Halftone fields and the second ink.

  • Rave

    Copy link

    Launches, posters and the 404. Every ink, and the words still win.

Content#

  • Repeat the control's name in sentence case: "Copy link".
  • One line, a few words, no full stop.
  • Never instructions, prices, errors or anything a reader must know.

Do and don't#

Do

Copy link

Repeats the name.

Don't

Prices go up on 1 November

A fact nobody on a phone will ever see.

Touch screens never show tooltips, and many readers never hover. Anything worth knowing belongs on the page.

Accessibility#

  • Opens 400 ms after hover (300 ms while moving between triggers) and on keyboard focus; closes at once, on Escape, and stays open while hovered (1.4.13).
  • Touch never opens it; the trigger's own name is always announced.
  • Fades and grows from .96 in --mk-dur-menu; reduced motion keeps the fade only.
KeysWhat happens
TabFocusing the trigger opens the tooltip after 400 ms
EscapeCloses the tooltip; focus stays on the trigger

The colour pairs it prints, with their contrast on both papers:

TextSurfaceRoleBoneNight
--mk-ink--mk-paperlabel 16.49:1 · Lc 97.4, passes 16.21:1 · Lc 96.1, passes
--mk-ink--mk-paper-platelabel 18.42:1 · Lc 105.1, passes 15.02:1 · Lc 95.4, passes
--mk-on-slab--mk-slablabel 16.49:1 · Lc 98.7, passes 16.21:1 · Lc 95.1, passes
--mk-on-slab--mk-slabbody-ui 16.49:1 · Lc 98.7, passes 16.21:1 · Lc 95.1, passes
--mk-on-slab--mk-slablong 16.49:1 · Lc 98.7, passes 16.21:1 · Lc 95.1, passes

Process at Studio, normal contrast. Every look: the press check.

Props#

PropTypeDefaultDescription
content requiredReactNodenoneThe words; they equal or repeat the trigger's name or nearby text (20 §3).
children requiredReactElement<unknown, string | React.JSXElementConstructor<any>>noneOne focusable element: it becomes the trigger.
sideTooltipSidenone
openbooleannone
defaultOpenbooleannone
onOpenChange((open: boolean) => void)none
disabledbooleannone
containerHTMLElement | nulldocument.bodyPortal container (default `document.body`).
specimenbooleannoneDocs and press frames only: prints the open pill in place under the trigger, with no portal or timers.
classNamestringnone

Generated from TooltipProps in packages/overprint-react/src/reading/tooltip/tooltip.tsx.

Tokens#

System tokens (14)

Its own properties (3)

  • --mk-tooltip-arrow
  • --mk-tooltip-pad-block
  • --mk-tooltip-pad-inline

Scanned from its CSS at build and checked against its registry entry; 6 read but not declared there.

Changelog#

Arrived in 0.1.0.

0.1.024 October 2026

  • MinorreactThe reading layer's controls, overlays, forms and visitor prefs (P2-T1 to P2-T5): every Button is the comic hit key, with IconButton, Link and Tooltip; Input, Textarea, Select, Checkbox and CheckboxGroup, Radio and RadioGroup, Switch, Slider with the ruler, RulerReadout and SegmentedControl; Dialog, Drawer, NavSheet, Tabs, Disclosure, Faq and faqJsonLd on Base UI 1.9 where the platform falls short; Field, Fieldset, Form with the site's inline validation, ErrorSummary, Callout, Honeypot, FormTimestamp and QuoteForm; PrefsScript under 1 KB, usePref and setPref with cross-tab sync, ThemeToggle and the visitor VolumeDial; VisuallyHidden.