ComponentsTooltip

Tooltip

Tooltips display informative text when users hover over, focus on, or tap an element. Accessibility-wise, the tooltip automatically labels the `children` content. If you are looking to wrap an icon only button with a tooltip, take a look at the `HvIconButton` component which offers you thus behavior out of the box.

GitHub LogoSource Code

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; disableFocusListener and disableHoverListener disable focus or hover, respectively.

Custom elements

A Tooltip can be attached to any side (see placement) of any element or component that holds a ref and spreads its props.
If the component doesn’t do so, a workaround is to wrap it in a div.

UI Kit

Custom content

A Tooltip will grow to the size of its content. Keep in mind that the Tooltip title labels the content children
and is not keyboard-navigable, therefore it shouldn’t be too complex or contain interactable elements.