Tooltip
Short, non-essential hints shown from hover or focus without replacing the trigger's accessible name.
Purpose
Use Tooltip for a short, non-essential hint that appears from hover or keyboard focus. It never replaces the trigger's own label or critical visible information.
Hover help
Installation
With the Siteplane registry alias configured, add the component and import the installed source from your app.
CLI
pnpm dlx shadcn@4.16.1 add @siteplane/tooltipImport
import { Tooltip } from "@/components/ui/tooltip";
import { TooltipCreateHandle, TooltipPopup, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { TooltipContent } from "@/components/ui/tooltip";Need the machine-readable source metadata? View registry JSON.
Usage
Use Tooltip to explain non-essential UI affordances on hover or focus. Do not use it for required instructions.
import { Tooltip, TooltipPopup, TooltipTrigger } from "@/components/ui/tooltip";
import { Button } from "@/components/ui/button";
export function Example() {
return (
<Tooltip>
<TooltipTrigger render={<Button variant="outline" />}>Hover</TooltipTrigger>
<TooltipPopup>Helpful context</TooltipPopup>
</Tooltip>
);
}Examples
Placement, disabled triggers, provider grouping, shared handles and icon-button hints are props and compositions of the same primitive.
Placement
The side prop positions the popup around the trigger. The built-in arrow follows automatically.
Disabled trigger
Disabled root and trigger keep the popup closed for disabled controls.
Grouped tooltips
TooltipProvider shares timing across a toolbar, so moving between triggers feels instant.
Icon button hint
A tooltip names an icon-only action. Critical status and instructions stay visible outside the tooltip.
API Reference
The reference lists the source-owned exports and props that are easy to miss in visual examples. Inherited Base UI props remain available unless the wrapper narrows them.
- Mount
TooltipProvideraround a dense tooltip group, then composeTooltip,TooltipTriggerandTooltipPopup. TooltipPopupacceptsside,align="start" | "center" | "end",sideOffset,alignOffset,anchorand popup props.anchorcan position the popup from another element or virtual position instead of the normal trigger.TooltipCreateHandlesupports detached trigger relationships;TooltipContentremains a compatibility alias forTooltipPopup.
Motion
Component motion uses the shared Siteplane motion contract. See the global motion guide for provider setup, tokens and reduced-motion behavior.
- Tooltip uses the shared floating-panel fade, scale and directional offset tokens.
- Grouped tooltips can skip the repeated opening delay after the first tooltip; reduced motion remains global.
Accessibility
- The trigger needs its own visible name or
aria-label; Tooltip content is supporting description only. - Do not place interactive controls inside
TooltipPopup. - Use visible helper text, Alert or Toast for critical and screen-reader-relevant messages.
Implementation Guidance
- Use
TooltipProviderfor dense groups such as toolbars, not as a replacement for visible labels. - Prefer the normal trigger relationship and use
anchororTooltipCreateHandleonly for a genuine detached case. - Keep portal, positioning and motion internals inside the primitive.