---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Tooltip

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

Free. Its export: `Tooltip`.

## Try it

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.

```sh
npx shadcn@4.23.1 add @goop/meadow-tooltip
```

```text
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

- `open?: boolean`
- `defaultOpen?: boolean = false`
- `onOpenChange?: (open: boolean) => void`
- `delayDuration?: number`

- State: open (open / defaultOpen / onOpenChange); drawn by data-state=open

### Parts

- `TooltipProvider` — Shares 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
- `TooltipTrigger` — What the tooltip describes; takes asChild
- `TooltipPanel` — The tooltip's panel alone, with no trigger and no placing of its own
- `TooltipPanelRow` — One row of words in a `TooltipPanel`
- `TooltipContent` — The 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

- Escape: dismiss

## Accessibility

- The behaviour layer under the part answers keys, focus and dismissal: never write your own.
- open: the 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.

## Related

- [Popover](/themes/meadow/components/popover): A small panel that opens from its button and floats over the page, which stays usable under it.
- [Icon button](/themes/meadow/components/icon-button): A button whose one visible label is a pack icon, for toolbars, rows and headers, with a spoken name.
- [Hover card](/themes/meadow/components/hover-card): A small card previewing a person or a record while the pointer rests on its name.
- [Dropdown menu](/themes/meadow/components/dropdown-menu): A menu of actions opened from its button.
