Function Tooltip

A tooltip that appears on hover or keyboard focus of its child trigger.

Powered by Radix UI under the hood, so accessibility (ARIA, focus, escape, group delay) is handled. The content is portalled to document.body, so it escapes stacking contexts and renders above modals/drawers.

Requires a <TooltipProvider> somewhere up the tree.

<TooltipProvider>
<Tooltip content="Save changes" side="bottom">
<Button>Save</Button>
</Tooltip>
</TooltipProvider>

Properties

$$typeof: symbol
defaultProps?: Partial<TooltipProps & RefAttributes<HTMLDivElement>>
displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.

propTypes?: WeakValidationMap<TooltipProps & RefAttributes<HTMLDivElement>>