Tooltip

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

import { Tooltip } from "@plexui/ui/components/Tooltip";

Examples

Overview

Simple text with tooltip

Different triggers

Inaccessible trigger

Conditionally enabled

Compact tooltips

API

PropTypeDefaultDescription
childrenReactElement—The trigger: a single element. Wrap plain text in Tooltip.TriggerDecorator
contentReactNode—Tooltip content (null = no tooltip)
compactbooleanfalseShort 1-3 word tooltips, inverse styling
interactivebooleanfalseContent is interactive, stays open when hovered
maxWidthnumber | "none"300Max width of tooltip
openDelaynumber150Delay before showing (ms)
side"top" | "right" | "bottom" | "left""top"Preferred side
sideOffsetnumber5Distance from trigger
align"start" | "center" | "end""center"Alignment
alignOffsetnumber0Alignment offset
gutterSize"sm" | "md" | "lg""md"Content padding
contentClassNamestring—Class for tooltip content
forceOpenboolean—Force open or closed
preventUnintentionalClickToClosetrue—Keeps the tooltip open when the trigger is clicked right after it opened

The tooltip content is the role="tooltip" element, and the trigger points at it with aria-describedby. Other props, such as onClick and onPointerDown, go to the trigger element. Tooltip.TriggerDecorator 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.