Skip to content

Tooltip

Edit on GitHub
@volvo-cars/css v2.3.0@volvo-cars/react-tooltip v0.2.2

A tooltip shows helpful text when users hover their cursor over an element.

Tooltip anatomy showing container, label, and pointer arrow

  1. Container
  2. Label
  3. Pointer arrow

Use tooltips to display brief descriptive text when users hover over UI elements, explaining their purpose and making the interface more user-friendly.

Tooltip displayed with a color picker

Displaying tooltip together with color picker.

  • Use tooltips for unlabelled UI elements such as icon buttons.
  • Use tooltip sparingly and only when necessary.
  • Don’t use tooltips when the UI element already has label text.
  • Don’t use tooltips if the explanation can’t be kept short — use overlays instead.
  • Don’t use tooltip for critical information. Instead show that directly on the page.
  • Tooltips must be triggered by user action. Popups that automatically appear to showcase new features or explain functionality are not considered tooltips.
  • Avoid using tooltips on touch devices – they’re not reliably accessible without hover interactions.

For maximum contrast, we use dark colors in light mode and light colors in dark mode.

Tooltip in light mode with dark container

Displaying tooltip on light mode.

Tooltip in dark mode with light container

Displaying tooltip on dark mode.

The spacing between the end of the pointer and the UI element is 4px.

Tooltip spacing showing 4px gap between pointer arrow and trigger element

Tooltips have a maximum width of 24 characters. Text that exceeds this width wraps onto a second line.

Tooltip at maximum width spanning two lines of text

Showing a tooltip at its maximum width that spans two lines of text.

When the label is too long for the available horizontal space, it wraps to form another line.

Tooltip with overflowing label text wrapping to a second line

Write clear, concise tooltip text that explains the UI element’s purpose. Limit the text to 1–2 short sentences. For longer explanations, use a modal dialog instead.

End a tooltip with a period if it’s a complete sentence or multiple sentences. Skip the period for short phrases, tool names, actions, or icon labels.

Tooltips should not contain interactive elements like buttons or links — these elements are inaccessible since tooltips do not receive focus.

Tooltips appear when the user hovers over a clickable element or when the element receives keyboard focus. They disappear when the cursor moves outside of the clickable area or the element loses focus.

Animated tooltip showing hover and focus behaviour

Example of a tooltip being used with a color picker

Example of a tooltip being used with a color picker.

Example of a tooltip used with icon buttons

Example of a tooltip used with icon buttons.

Example of a tooltip used with accordions

Example of a tooltip used with accordions.

Example of a tooltip shown on table row hover

Example of a tooltip shown on table row hover.

Web Core Library – Figma

Tooltip – Storybook

Breaking changes

  • 🔴 inverted prop has been removed, and the Tooltip will now render with a data-color-mode aware theme that renders the component dark on light mode (the opposite of current behaviour)
  • 🟢 A positional arrow has been added by default. While the arrow is recommended, it can be disabled where necessary by setting withArrow={false}