Skip to main content

Tooltip

A zero-dependency tooltip with shared warm-state handoff between sibling triggers, an origin-aware reveal, and full keyboard accessibility.

Glide across toolbar icons for shared-surface morphing

Customize

Open delay (ms)300
Side offset (px)6
Speed1

Installation

npx shadcn@latest add @kinetic/tooltip

Usage

Wrap a group of tooltips in a single TooltipProvider, then compose Tooltip, TooltipTrigger and TooltipContent.

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

export function SaveHint() {
  return (
    <TooltipProvider>
      <Tooltip>
        <TooltipTrigger asChild>
          <button type="button">Save</button>
        </TooltipTrigger>
        <TooltipContent>Save your changes</TooltipContent>
      </Tooltip>
    </TooltipProvider>
  );
}

Warm handoff

Tooltips under the same TooltipProvider share a warm state. After one tooltip opens, moving to a sibling trigger within skipDelayDuration shows the next tooltip instantly instead of waiting for delayDuration. Both values are in milliseconds and default to 300.

<TooltipProvider delayDuration={500} skipDelayDuration={200}>
  ...
</TooltipProvider>

Placement

Set side (top, bottom, left, right), align (start, center, end) and sideOffset on TooltipContent.

<TooltipContent side="bottom" align="start" sideOffset={10}>
  ...
</TooltipContent>

Hoverable content

By default the pointer can move from the trigger onto the tooltip without closing it. Set disableHoverableContent on TooltipProvider or Tooltip to close the tooltip as soon as the pointer leaves the trigger.

<Tooltip disableHoverableContent>...</Tooltip>

Controlled state

Use open with onOpenChange to control a tooltip, or defaultOpen to start it open. A per-tooltip delayDuration overrides the provider value.

<Tooltip delayDuration={0}>...</Tooltip>

Motion preferences

The reveal is a pop from the trigger edge with a short blur. Use speed and blurPx on Tooltip or TooltipContent to tune it. Timing follows the current Kinetic tempo, and the animation is simplified when reduced motion is enabled.

API Reference

TooltipProvider

Coordinates warm-state handoff so moving between sibling tooltips skips the initial hover delay.

PropTypeDefaultDescription
delayDurationnumber300Initial hover delay in milliseconds before showing the first tooltip.
skipDelayDurationnumber300Window in milliseconds during which hovering another trigger opens immediately.
disableHoverableContentbooleanfalseCloses the tooltip immediately when pointer leaves the trigger.

Tooltip / TooltipContent

Zero-dependency tooltip root and portaled content bubble with origin-aware pop reveal.

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right""top"Preferred placement side relative to the trigger.
sideOffsetnumber6Pixel spacing between trigger and tooltip.
speednumber1Enter and exit animation speed multiplier.

Notes

Always mount TooltipProvider above Tooltip (typically at app or section root), wrap focusable elements with TooltipTrigger asChild, and avoid placing interactive controls inside TooltipContent.