Tooltip
Brief hint shown on hover or focus of a single trigger. Prefer tooltips for supplemental labels — not essential instructions. Tooltip is the compound Root (Tooltip.Trigger / Tooltip.Popup). The trigger child must forward DOM props — there is no render prop.
The popup is a native popover element positioned with CSS anchor positioning, rendered in place (no portal). State attributes and onOpenChange details are documented in Overlay lifecycle.
Examples
Compound parts
Compose Trigger and Popup.
import { Button, Tooltip } from '@var-ui/react';
<Tooltip>
<Tooltip.Trigger>
<Button>Save</Button>
</Tooltip.Trigger>
<Tooltip.Popup>Save changes</Tooltip.Popup>
</Tooltip>Minimal
The usual arrangement: one trigger and one popup.
import { Button, Tooltip } from '@var-ui/react';
<Tooltip>
<Tooltip.Trigger>
<Button>Save</Button>
</Tooltip.Trigger>
<Tooltip.Popup>Save changes</Tooltip.Popup>
</Tooltip>Placement and delay
Set placement on Tooltip.Popup (top, bottom, start, end, optionally with start/center/end alignment, e.g. bottom start). Set openDelay and closeDelay (ms) on Tooltip; the default open delay is 500ms. After one tooltip closes, the next opens immediately for about half a second.
import { Button, HStack, Tooltip } from '@var-ui/react';
<HStack gap="md" wrap>
<Tooltip openDelay={200}>
<Tooltip.Trigger>
<Button>Bottom · 200ms</Button>
</Tooltip.Trigger>
<Tooltip.Popup placement="bottom">Below the trigger</Tooltip.Popup>
</Tooltip>
<Tooltip>
<Tooltip.Trigger>
<Button>End</Button>
</Tooltip.Trigger>
<Tooltip.Popup placement="end">After the trigger</Tooltip.Popup>
</Tooltip>
</HStack>Props
Accessibility
Tooltips appear on hover and keyboard focus (focus-visible only; touch is ignored), stay open while the pointer is over the tooltip, and close on Escape. The popup has role="tooltip" and the trigger gets aria-describedby while it is open. Pass disabled on the Root to suppress it. Keep copy short; do not put interactive content in a tooltip (use HoverCard or Popover instead). The trigger must already have an accessible name — tooltips supplement, they do not replace labels.