On this page

Tooltip

Parts, tokens, sizes and spacing of Tooltip.

Tokens

Part Tokens and values
Container color.surface.inverse (graphite 12: near-black in light, near-white in dark), no border, no shadow
Text color.text.inverse, font.body.small (12/16, Vietnamese 12/20)
Padding space.075 (6 px) at the sides, space.050 (4 px) top and bottom
Corners radius.050 (4 px)
Width At most size.tooltip.max-width (240 px); longer text wraps
Distance from the trigger 8 px (space.100), clearing the 2 px focus ring set 2 px out
Layer z-index.tooltip
Arrow None

Why these

  • Dark container in 8 of 10 systems read (Atlassian, Ant, Primer, Carbon, PatternFly, GitLab, Spectrum, Material 3). It is the same colour as the primary button, as in GitLab; it carries no click target, small text and no border, so it does not read as a button (D19).
  • 240 px wide at most: the 240–250 px cluster of Atlassian, Fluent, Ant and Primer (D19).
  • 8 px away: systems whose focus ring sits outside the control, such as Atlassian, use 8 px; Primer and Fluent use 4 px because their ring sits inside.
  • No arrow, as Atlassian and Primer. The 8 px gap and the position next to the trigger show which control it belongs to.