Updated: November 16, 2021

Using Tooltips

Intro

Tooltips appear next to the mouse pointer when it hovers over an element that offers a tooltip. Tooltips are shown only for elements that do not have a label or, in rare cases, to display additional information.

Since tooltips are handled by the browser, the form of tooltips depends on the platform, the browser, and the respective platform and browser versions.

Tooltip for 'Notifications' button
Tooltip for 'Notifications' button

Usage

Use a tooltip if:

  • You have an element without a label.
  • You are showing an icon-only button.
  • You want to show in-place information within a map.
  • You are showing a button that contains only an icon and a number.

Do not use a tooltip if:

  • You want to show the full text for a truncated item. Instead, make more space for the item.
  • Text is truncated on a control that doesn’t support wrapping. Instead, show the full content with one click in a popup. See Wrapping and Truncating Text.
  • You don’t want to use a label. You should always use a label.
  • You want to offer an explanation or provide help. Instead, use the Web Assistant.
  • The content of the tooltip would be redundant.
  • The corresponding UI element is static, such as layout containers, labels or inactive toolbars. Only add tooltips to interactive elements, such as buttons on toolbars.
  • On column headers of tables.
  • To display a shortcut for a button. Use the corresponding options instead.
Developer Hint
Short cuts for buttons are added via sap.ui.core.CommandExecution.
Don't
Don't duplicate text in a tooltip.
Don't duplicate text in a tooltip.
Don't

Responsiveness

Tooltips are usually invoked by a mouseover event, which is why they are limited to desktop devices. Most touch-only devices have no way of showing tooltips.

Because tooltips cannot be displayed on all devices, they should never contain critical information. They should also not contain redundant information.

Types

Icon-Only Buttons

Icon-only buttons must have a tooltip to indicate the action the button will trigger.

Sort button with tooltip
Sort button with tooltip

Icon-Only Buttons with Amounts

Icon-only buttons that contain numbers, but no text, must also have a tooltip.

Button with icon and number
Button with icon and number
Button with icon and badge
Button with icon and badge

Maps

Within maps, different areas and hotspots can show different tooltips to elaborate the current position.

Tooltips on a map
Tooltips on a map

Guidelines

Overwriting standard icon tooltips

The icon within an icon-only button usually comes with a standard tooltip. However, this default tooltip contains the technical icon name, which may not be the right term for the icon in your context. Always check all icons and overwrite the default tooltip texts with suitable texts for your specific use case.

Do
Icon with app-specific tooltip (default overwritten)
Icon with app-specific tooltip (default overwritten)
Don't
Icon with standard tooltip (default)
Icon with standard tooltip (default)
Warning
Ensure that your tooltips are maintained properly at all times, since they are also invoked for disabled items. Some browsers even invoke tooltips for keyboard actions, such as tabbing through the links.

Resources

Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.

Elements and Controls

Implementation