Tooltip
Tooltips display informative text on hover, focus, or tap, and automatically label the target element for accessibility.
For icon-only buttons, consider using HvIconButton
, which includes built-in tooltip behavior.
HvTooltip
uses Material UI’s tooltip under the hood. You can find more
information about the component in their
documentation.
If you’re looking for a tooltip on overflowing content, check out the
HvOverflowTooltip
component.
Disabled
To hide a Tooltip
, remove its title
.
Use disableFocusListener
or disableHoverListener
to disable showing it on focus or hover, respectively.
Custom elements
A Tooltip
can be placed on any side of an element using the placement
prop.
It requires the target component to hold a ref
and spread its props—if not, wrap it in a <div>
as a workaround.
Custom content
A Tooltip
grows to fit its content.
Since it labels the target element and isn’t keyboard-navigable, avoid complex or interactive content in the tooltip.