Skip to main content

Tooltip

A Tooltip is a small, non-interactive overlay that displays brief informational text when hovering over or focusing on an element. It is built on top of the Popover component.

Key Characteristics

  • Hover-Triggered: Automatically shows on hover with configurable delay.
  • Non-Interactive: Unlike Popover, tooltips are meant for displaying simple text hints, not interactive content. Still it's possible to interact with the tooltip content if/when needed via hoverableContent prop.
  • Accessible: Works with keyboard focus and follows accessibility best practices.

Import

import { Tooltip } from '@andrejground/lab';

Usage

Placement

Delay Show

Control the delay before showing the tooltip with delayShow prop.

Delay Hide

Control the delay before hiding the tooltip with delayHide prop.

Hoverable Content

Use hoverableContent prop to keep the tooltip visible when hovering over the tooltip content.

Controlled

Open: false