Skip to content

Tooltip

The Tooltip component surfaces additional information for an element in a small overlay that appears on hover or focus. It supports a title, a scrollable body, a fixed footer, an arrow, and positioning on any side. Every Tooltip must have a TooltipProvider ancestor — typically wrapped around the entire app.

Playground

Variations

Vertical scroll

Content scrolls when it exceeds the max height.

Horizontal scroll

Content scrolls when it exceeds the max width.

Both horizontal and vertical scroll

Content scrolls when it exceeds the max height and max width.

Installation

import { Tooltip, TooltipProvider } from "@harnessio/ui/components";
// TooltipProvider typically wraps the entire app.
<TooltipProvider>
<Tooltip title="Title" content={<p>This is a tooltip</p>}>
<Button variant="secondary">Hover me</Button>
</Tooltip>
</TooltipProvider>;