AhaSlides Design
v0.52.0React · Vue · Lit

Components · Data Display

Tooltip

A short, transient hint shown on hover or focus of its trigger.

Examples

Placement
Colour
Arrow
Help trigger
Hover or focus a trigger · placements + a brand fill · the data-probe one is forced open for the scorecard

API

PropTypeDefaultNotes
textstringThe hint text shown in the bubble
placement'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end'topWhich side of the trigger the bubble + arrow sit on. The 4 cardinal values centre the bubble; the 8 edge-aligned values (…-start / …-end) align it to the trigger's start/end edge with the arrow offset near that edge (AntD naming)
color'dark' | 'brand'darkBubble fill: dark-navy #1A1A2E or brand color-primary #6A1EBB
arrowbooleantrueShow the caret pointing at the trigger; arrow="false" hides it
trigger'hover' | 'focus' | 'click'hoverHow it opens: hover+focus · focus only · click to toggle
openbooleanfalseForce the bubble visible (demos/tests); otherwise the trigger opens it
helpbooleanfalseRender a built-in `?` help trigger — a focusable button carrying the DS <aha-icon name="system-question-mark"> (16px, muted → brand on hover/focus) — instead of requiring a slotted trigger. The settings-label help-glyph pattern; shows on focus as well as hover

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-tooltip';   // registers <aha-tooltip>

Agent feed for this component (absolute, fetchable anywhere): tooltip.agent.json · tooltip.md · tooltip.llms.txt

When to use

When to use
  • Tooltip — a brief, non-essential hint — an icon-only button's name, a ? help elaboration
  • help text — a must-see consequence that is hard to undo — put it inline, not in a tooltip
  • Popover — richer content or interactive controls — a tooltip is text only
Never hide essential information in a tooltip — it is unavailable on touch and to keyboard users who don't focus the trigger. Keep it to a short phrase; the trigger must be focusable.
Surfaces
editor dashboard settings audience

Spec

Bubble dark-navy #1A1A2E (or brand #6A1EBB), white text, radius 6, padding 6 10 · Text Plus Jakarta 12/18 · Arrow anchored to the trigger, matches the fill; `arrow=false` hides it · Placement top (default) · bottom · left · right centred, PLUS 8 edge-aligned (top-start/-end, bottom-start/-end, left-start/-end, right-start/-end) — same side, aligned to the trigger edge with the arrow offset near it · Trigger hover + focus (default) · focus · click (toggle, Esc/click-away to close); `open` forces it visible · Help `help` renders a built-in `?` trigger — a DS <aha-icon name="system-question-mark"> at 16px, muted (--aha-icon-muted #8A8A8A) → brand (#6A1EBB) on hover/focus — the settings-label help glyph; focusable, so it shows on focus, not hover-only · a11y role=tooltip, aria-describedby wired to the active trigger (slotted, or the built-in help button), shows on focus, no leaked listeners