A short hint in a bubble beside its trigger: your own child element, or the tooltip's button when label is set. The ref reaches the trigger.
A Markdown brief for Claude, Cursor or v0: install, setup, props and a complete example.
For a short, optional hint about a control, like what an icon button does.
Anything people must read, or anything interactive? Put it on the page, or use Popover.
Shown on hover and on keyboard focus, dismissed with Escape, and tied to its trigger with aria-describedby.
import { Tooltip } from '@idyeah/diya'Stable since 1.0.0
childrenRequiredReactNodeWith label, noninteractive content for the tooltip's own button, such as an icon. Without it, your single trigger element, such as <Button iconOnly aria-label="Delete">, which gets the hover, focus and description wiring.
contentRequiredstringVisible text in the bubble: shown after a mouse rests on the trigger for 300ms, and at once on keyboard focus, a tap or with motion="off"; also read as the trigger's description.
labelstringAccessible name for the tooltip's own trigger button, not shown, such as 'Billing help'. Leave it out when the child is your own trigger.
placement"top" | "bottom" | "left" | "right"Preferred side for the bubble; it moves to stay on screen. Defaults to 'top'.
Default 'top'
Also takes every native <span> attribute, such as id, aria-* or data-*.