DS0
Components

Tooltip

A brief text label that appears on hover or focus to describe an element.

Overview

Tooltip renders a small floating label anchored to a trigger element. It appears on hover and focus, providing supplementary information without cluttering the interface. Tooltips are non-interactive — for rich or interactive overlays, use Popover.

Usage

<Tooltip>
  <Tooltip.Trigger><button>Hover me</button></Tooltip.Trigger>
  <Tooltip.Content>Helpful text</Tooltip.Content>
</Tooltip>

Delay

Default delay is 700ms. Set delayDuration={0} for instant:

<Tooltip delayDuration={0}>
  <Tooltip.Trigger><IconButton icon={<InfoIcon />} aria-label="Info" /></Tooltip.Trigger>
  <Tooltip.Content>Instant tooltip</Tooltip.Content>
</Tooltip>

On Icon Buttons

Tooltips are essential for icon-only buttons to provide an accessible label:

<Tooltip>
  <Tooltip.Trigger>
    <IconButton icon={<TrashIcon />} aria-label="Delete" />
  </Tooltip.Trigger>
  <Tooltip.Content>Delete item</Tooltip.Content>
</Tooltip>

Accessibility

Keyboard Interactions

KeyAction
TabShows the tooltip when trigger receives focus
EscapeCloses the tooltip

ARIA

  • Content has role="tooltip"
  • Trigger has aria-describedby pointing to the tooltip content
  • Tooltip is not focusable — it supplements the trigger's accessible name

API Reference

PropTypeDefaultDescription
delayDurationnumber700Delay before showing (ms)
childrenReactNodeTrigger and Content elements

Tooltip.Content Props

PropTypeDefaultDescription
side'top' | 'right' | 'bottom' | 'left''top'Preferred placement
classNamestringAdditional CSS classes

AI Decision Guide

Use Tooltip when:

  • Labeling icon-only buttons
  • Providing additional context for truncated text
  • Explaining what an element does on hover

Don't use Tooltip when:

  • Content needs interaction (links, buttons) → use Popover
  • Information is critical and must always be visible → use inline text
  • Content is lengthy → use Popover or Drawer
ComponentWhen to Use Instead
PopoverRich, interactive floating content
DialogModal content requiring user action

On this page