Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-tooltip

Tooltip

Free

A short label shown on hover or focus that names an icon button or explains a control, for React and Tailwind CSS. Free, MIT.

Rest the pointer on the button or Tab to it: the tooltip shows; switch its side, its alignment, the wait, long words, or keep it open. The button opens nothing.

When to use

  • A short label shown on hover or focus that names an icon button or explains a control.
  • Also called: hint.

When not to use

  • For a panel with controls in it use Popover.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Tooltip on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/meadow-tooltip
PROMPT
Add the Goop Tooltip to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { TooltipPanel, TooltipPanelRow } from '@/components/ui/goop/tooltip';

import { IconButton, IconButtonIcon } from '@/components/ui/goop/icon-button';
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/goop/tooltip';

function TaskRowTools() {
  return (
    <TooltipProvider>
      <div className="flex items-center gap-1">
        <Tooltip>
          <TooltipTrigger asChild>
            <IconButton aria-label="Mark done">
              <IconButtonIcon icon="check" />
            </IconButton>
          </TooltipTrigger>
          <TooltipContent>Mark the task done</TooltipContent>
        </Tooltip>
        <Tooltip>
          <TooltipTrigger asChild>
            <IconButton aria-label="Copy link">
              <IconButtonIcon icon="copy" />
            </IconButton>
          </TooltipTrigger>
          <TooltipContent side="bottom">Copy the task's link</TooltipContent>
        </Tooltip>
      </div>
    </TooltipProvider>
  );
}
  • Fits: frame (its recipe); list, board: overlay.
  • width, padding, gap, corner, background, shadow, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
open?boolean
defaultOpen?boolean = false
onOpenChange?(open: boolean) => void
delayDuration?number
  • State: open (open / defaultOpen / onOpenChange); drawn by data-state=open
Parts
PartWhat it is
TooltipProviderShares the delay before a tooltip shows, and the window in which the next one shows at once, among the tooltips inside it; also takes delayDuration?: number
TooltipTriggerWhat the tooltip describes; takes asChild
TooltipPanelThe tooltip's panel alone, with no trigger and no placing of its own
TooltipPanelRowOne row of words in a TooltipPanel
TooltipContentThe label (role="tooltip", the words that describe its trigger), above its trigger, centred, 8 px off (side, align, sideOffset move it), shifting and flipping to stay 8 px inside the window (collisionPadding); container?: HTMLElement | null — Where the layer is portalled; the end of <body> when left out
  • data-slot values (to select a part by): tooltip-content, tooltip-inner, tooltip-panel, tooltip-panel-row, tooltip-trigger

Keyboard

KeyWhat it does
EscapeDismiss

Accessibility

  • The behaviour layer under the part answers keys, focus and dismissal: never write your own.

Its states are drawn from attributes and props, so assistive technology and your agent read the same thing:

StateDrawn by
openthe attribute data-state=open

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/tooltip.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-tooltip

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.