Tooltip

v3.0

Tooltips provide a brief, helpful explanation when users hover over or tap a label.

  • CSS
  • Marko
  • React
Stylized artwork of a tooltip.

Anatomy

A descriptive tourtip diagram with 2 elements numbered: 1. Label, 2. Container.
  1. Label
  2. Container
An info tourtip diagram with 4 elements numbered: 1. Pointer tip, 2. Title (optional), 3. Body, 4. Container
  1. Title (optional)
  2. Body
  3. Container

Types

Tooltips reveal a label or additional information when a user interacts with a UI element. They are explicitly triggered and persist until dismissed.

Tooltips follow two semantic messaging structures:


  • Descriptive 
  • Info
Two types of tooltips are shown. The descriptive tooltip reads “Favorite this item”. The info tooltip has a title of “Pre-owned - Excellent” and a body of “This item has been previously worn; however, it is in excellent condition. Any signs of wear should be shown and described in the seller’s listing.”

Properties

Descriptive tooltip

A descriptive tooltip clarifies a UI element that lacks a visible label.

Label

The label is pulled directly from the anchor element's accessible label and should simply state the element or action.

  • Use sentence case
  • No ending punctuation
  • Aim for 1-3 words
Two tooltips. One with a ‘Save’ label and one with a ‘Favorite this item’ label.

Info tooltip

An info tooltip defines terms or provides secondary details users might need without requiring them to navigate away.

Title

Optional. Use a title only when the tooltip needs an introduction. It should succinctly summarize the rest of the content. Most tooltips don't need a title.

  • Use sentence case
  • No ending punctuation
  • Aim for 3-6 words

Body

Required. Use the body to define jargon and technical terms, or to provide additional context. Don't repeat content already on the page or include interactive elements like buttons or links.

  • Use ending punctuation
  • Max 3 lines
Two info tooltips. One with a title of “Pre-owned - Good” and body of “This item has been gently used but is in good condition. It might have a few signs of wear, but all imperfections should be shown and described in the seller’s listing.” The second with a body of “This item has been gently used but is in good condition. It might have a few signs of wear, but all imperfections should be shown and described in the seller’s listing.”

Behavior

Presentation

Tooltips appear after a 2 second delay while hovering or focusing on an anchor element. They fade out 1 second after the anchor element loses hover or focus.

A cursor hovers over an icon button, which displays a tooltip labeled ‘Customize’ situated above the icon.

Dismissing

Tooltips automatically disappear 1 second after the element loses hover or focus, or when another element receives hover or focus that reveals a tooltip.

A tooltip.

Text overflow

Tooltip labels should avoid wrapping where possible. When required, the label wraps to a new line when extending beyond the width of the container.

A tooltip with the label spanning two lines.

Placement

Tooltips appear to the side of the anchor element that has open space. The default position is below the anchor element.

Four tooltips surround a circle: one Above, Leading (to the left), Trailing (to the right), and Below. The Below tooltip is the default placement.

Screen sizes

Small

Tooltips appear on hover or focus on smaller screens or browser windows. They’re uncommon on native platforms.

A ‘Customize’ tooltip sits below a Customize icon button on the eBay app.

Medium

On medium screens, tooltips appear on hover or focus.

A cursor hovers over a Favorites icon button on a medium screen, with a tooltip labelled ‘Favorites’ situated below.

Large

On large screens, tooltips appear on hover or focus.

A cursor hovers over a Favorites icon button on a large screen, with a tooltip labelled ‘Favorites’ situated below.

Best practices

Multiple tips

Do only show a single tip at a time.

A cursor hovers over a Favorites icon button with a tooltip labelled ‘Favorites’ situated below.

Don’t override tip behavior to show multiple at once.

A ‘Favorites’ tooltip sits below a ‘Favorites’ icon button, next to a ‘Cart’ tool tip situated below a ‘Cart icon button.

Specs

A tooltip with specs is shown. The padding to the left and right of the tooltip is 16px, and the padding on the top and bottom is 8px.