Tooltip

Alignment target:@astryxdesign/core v0.7.1 · Tooltip

Usage #

Tooltip shows a short hint next to a trigger on hover or keyboard focus. The trigger keeps its own behavior.

Vue
<script setup lang="ts">
import { Button } from '@astryx-vue/core/Button'
import { Tooltip } from '@astryx-vue/core/Tooltip'
</script>

<template>
  <Tooltip content="Save your changes">
    <Button label="Save" />
  </Tooltip>
</template>

Anatomy

ElementDescription
Tooltip surfacePainted overlay surface that presents the tooltip.
Tooltip textTooltip content rendered within the surface.

Best practices #

GuidancePractices
DoKeep tooltip content concise: aim for under 140 characters of plain text.
DoAdd a tooltip to icon-only buttons and controls that lack a visible label.
Don'tPlace interactive elements like links or buttons inside a tooltip; use HoverCard or Popover instead.
Don'tUse tooltips for essential information that users must see to complete a task.

Examples #

Tooltip — Action bar

Open in Playground

Save, Cancel, and Delete, each with a hint above the button.

Tooltip — Hook

Open in Playground

A button named Using hook directly, with the hint Tooltip via hook.

Tooltip — Inline text

Learn more about our privacy policy and terms of service .
Open in Playground

privacy policy and terms of service sit in a sentence, each with its own hint.

Accessibility #

The tooltip bubble is a separate layer, and the component links it to the trigger with ARIA attributes so assistive technology can announce both the extra description attached to the trigger and the text inside the bubble:

  • The bubble has role="tooltip", which tells assistive technology to treat it as a hint.
  • The trigger receives aria-describedby pointing to the bubble's id.

The hint appears on mouse hover or keyboard focus. While it is showing, pressing Escape closes an uncontrolled tooltip; a controlled tooltip instead emits openChange(false), and the parent decides whether to close it.

A press inside the open bubble stays in the bubble: a clickable card, list row, or tree row around the trigger does not activate. Page-level listeners still receive the press.

Because the hint appears only on hover or focus and disappears again, users can easily miss it, and touch devices do not always trigger it. Keep essential information that users must see to complete a task out of tooltips.