Skip to main content

Figma Storybook

Tooltip

Displays brief contextual information on hover or focus of a UI element. Use to clarify icon-only buttons or provide supplementary detail. Don't put essential information in a tooltip — it must be accessible without hover.

Figma Storybook Docs

Description

What it does

Shows a small floating label with supplementary text when a user hovers over or focuses a trigger element. The tooltip disappears when the user moves away or shifts focus.

Where it appears

Icon-only action buttons in data tables (such as edit, archive, or export stakeholder records), form field labels that need brief clarification, and toolbar controls in the consultation builder.

Why it exists

Government interfaces often require dense layouts where full button labels would consume too much horizontal space. Tooltips let teams use icon-only controls without sacrificing clarity, while keeping the interface uncluttered for experienced users.

Dependencies

Button, Icon

Anatomy

PartRequired?Notes
Trigger Required The interactive element — button, icon, or link — that the tooltip is anchored to. Must be focusable and receive the aria-describedby pointing to the tooltip.
Tooltip container Required The floating surface that holds the label text. Positioned above the trigger by default, with automatic repositioning if it would overflow the viewport.
Label text Required Short, plain-language description. Maximum two lines. Should not duplicate the visible label if the trigger already has one.
Arrow / caret Optional A small directional indicator pointing from the tooltip container toward the trigger. Helps clarify the relationship when the tooltip repositions to a non-default placement.

Variants

Default

Neutral informational label

Use for the majority of tooltip needs — clarifying an icon button action, providing a short hint for a form field, or surfacing a full value that is truncated in the UI.

Top placement

Tooltip appears above the trigger

Default placement. Use when there is sufficient vertical space above the trigger and the content below must remain unobstructed.

Bottom placement

Tooltip appears below the trigger

Use when the trigger is near the top of the viewport or a scrollable region and the tooltip would otherwise be clipped.

Start (left) placement

Tooltip appears to the left of the trigger

Use for triggers at the right edge of a panel or column where vertical placements would overflow.

End (right) placement

Tooltip appears to the right of the trigger

Use for triggers at the left edge of a sidebar or navigation rail.

States

State Behaviour
Hidden Default state. The tooltip container is not rendered in the visible layout. The trigger is interactive as normal.
Visible (hover) Tooltip appears after a short delay (approximately 300ms) when the pointer enters the trigger. Dismissed immediately when the pointer leaves the trigger or the tooltip container.
Visible (focus) Tooltip appears immediately when the trigger receives keyboard focus, with no delay. Dismissed when the trigger loses focus.
Persistent (touch) On touch devices, a single tap toggles tooltip visibility. A second tap on the trigger, or a tap elsewhere, dismisses it.
Disabled trigger If the trigger element is disabled, the tooltip must still be reachable by keyboard. Wrap a disabled button in a focusable container (e.g. a span with tabindex='0') and attach the tooltip to the wrapper, not the button.

Usage guidelines

When to use

  • Clarifying the action of an icon-only button, such as an archive or export icon in the stakeholder table.
  • Providing a short hint for a form field label where inline helper text would add too much visual weight.
  • Revealing the full value of truncated text in a narrow table cell, such as a long stakeholder organisation name.
  • Explaining abbreviations or status codes used in consultation dashboards that may not be familiar to all staff.

When not to use

  • Do not place essential information — required field indicators, error messages, or critical instructions — inside a tooltip. Use inline helper text, validation messages, or visible labels instead.
  • Do not use a tooltip to replace a visible label on an interactive element if space permits. Visible labels are always preferable for accessibility and discoverability.
  • Do not use a tooltip for content longer than two short lines. Consider a popover or side panel for richer contextual content.
  • Do not attach a tooltip to non-interactive elements such as plain text or decorative icons. Screen reader users navigating by keyboard will not encounter them.

Do / Don't

Do

Keep tooltip text concise — a single verb phrase or short sentence. For example: 'Archive stakeholder' or 'Consultation closes 30 June'.

Don't

Don't write multi-sentence explanations or include links, form controls, or rich content inside a tooltip.

Do

Ensure the tooltip trigger has a visible focus indicator meeting the 3px --op-color-interactive-focus ring requirement.

Don't

Don't rely solely on the tooltip to convey state — for example, don't use tooltip text as the only indicator that a button is disabled.

Do

Use the tooltip to complement an aria-label on icon-only buttons, not replace it. The aria-label names the button; the tooltip can add brief context.

Don't

Don't omit the aria-label on an icon-only button and expect the tooltip alone to provide an accessible name.

Was this page helpful?

Updated 9 September 2026