compacto-ui

Search documentation

Jump to a page or a component.

Tooltip

A hint, never the only place information lives.

Preview

Installation

No install — ask an AI agent to copy this component from registry.json.

import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";

Notes

  • Tooltip mounts its own provider, so a single tooltip works standalone. Mount a TooltipProvider higher up when a group should share hover timing — that is what makes the second tooltip in a toolbar appear instantly.
  • A tooltip is a hint, never the only place information lives. An icon-only control still needs its own aria-label.
  • Capped at 16rem so a hint stays a hint.

Props

The props worth knowing. Everything else passes straight through to the underlying element, including className, which is merged last so it always wins.

PropTypeDefaultDescription
delayDuration (Provider)number200Hover time before opening. Long enough not to fire on a pointer passing through.
sideOffset (Content)number8Gap between trigger and panel, in px.