Tooltip

Brief informative text shown on hover or focus, for any trigger element, with conditional enabling and a compact variant.

import { Tooltip, TooltipTriggerDecorator } from "@plexui/vue/components/Tooltip";

Examples

Overview

Different triggers

Conditionally enabled

Compact tooltips

API

PropTypeDefaultDescription
default slotVNode—The trigger: a single element. Wrap plain text in TooltipTriggerDecorator
contentstring | number | VNode | null—Tooltip content, or the #content slot (null = no tooltip)
compactbooleanfalseShort 1-3 word tooltips, inverse styling
interactivebooleanfalseContent is interactive, stays open when hovered
max-widthnumber | "none"300Max width of tooltip
open-delaynumber150Delay before showing (ms)
side"top" | "right" | "bottom" | "left""top"Preferred side
side-offsetnumber5Distance from trigger
align"start" | "center" | "end""center"Alignment
align-offsetnumber0Alignment offset
gutter-size"sm" | "md" | "lg""md"Content padding
content-class-namestring—Class for tooltip content
force-openboolean—Force open or closed
prevent-unintentional-click-to-closebooleanfalseKeeps the tooltip open when the trigger is clicked right after it opened
content slotVNode[]—Rich tooltip content; takes precedence over content

The tooltip content is the role="tooltip" element, and the trigger points at it with aria-describedby. Other attributes and listeners, such as @click and @pointerdown, go to the trigger element. TooltipTriggerDecorator turns text into an accessible trigger with the decorator style and a tab stop (focusable, default true).

Styling

Tooltip has no component tokens of its own. It reads the shared semantic color, typography and spacing tokens listed in Design tokens, so it follows theme changes made there.