Tooltip
Data Display
@rockshin/tao-uiShows a brief informational popup when hovering or focusing an element.
When to use
Use Tooltip for short contextual hints on hover or focus. The popup is portaled and inherits the TaoProvider theme.
Recommended
- Keep tooltip text short and supplementary.
- Wrap exactly one focusable trigger element.
Avoid
- Do not put critical information or interactive content inside a Tooltip.
Examples
Basic usage
Placements
Arrow, color, and controlled visibility
Hide the arrow
Set arrow=false to remove the pointer.
Controlled tooltip
Synchronize visibility through open and onOpenChange.
Custom color
color customizes the background; retain readable contrast.
Hover delays
Delays use seconds; keyboard focus does not wait for a hover delay.
Conditional content
An empty title disables the tooltip so hints only appear when useful.