# Tooltip

> A short ink label on hover or focus: `foreground` fill with `background` text, 12px, 150ms in after an 80ms delay, 50ms out (`.t-tt`).

## Facts

- **Product**: Max
- **Family**: Overlays
- **Global**: `window.DigitalCrew.Tooltip`
- **Source**: `max-agent: src/components/ui/tooltip.tsx`
- **Import in the app**: `import { Tooltip } from "@/components/ui/tooltip";`
- **Live preview**: /design/components/tooltip/preview.html
- **Page**: /design/components/tooltip

## Guidelines

**Use it for** naming icon-only buttons and showing a value's detail ("Warm-up: day 9 of 14"). Anything someone must read to act goes on the page, not in a tooltip; explanations of a field use [**HelpTooltip**](/design/components/help-tooltip.md).

**What you provide**: `TooltipTrigger` (via `asChild` on a focusable element) and `TooltipContent` with a few words. Wrap the app once in `TooltipProvider`. An icon-only button still needs its own `aria-label`.

## API

```ts
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): any;
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): any;
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): any;
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): any;
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
```

## Example

```html
<div id="root" class="p-6"></div>
<script>
(function () {
  var h = React.createElement, DC = window.DigitalCrew, I = DC.Icons;
function App() {
  return h("div", { className: "flex items-end justify-center gap-6 pt-12" },
    h(DC.Tooltip, { defaultOpen: true },
      h(DC.TooltipTrigger, { asChild: true }, h(DC.Button, { size: "icon", variant: "outline", "aria-label": "Warm-up" }, h(I.Flame))),
      h(DC.TooltipContent, null, "Warm-up: day 9 of 14")),
    h(DC.Button, { size: "icon", variant: "outline", "aria-label": "Settings" }, h(I.Settings)));
}
  ReactDOM.createRoot(document.getElementById("root")).render(h(DC.TooltipProvider, { delayDuration: 80 }, h(App)));
})();
</script>
```

## More in Overlays

- [AlertDialog](/design/components/alert-dialog.md): A blocking confirmation for irreversible or costly actions; same motion and surface as **Dialog**, no close ×, no click-outside dismissal.
- [Command](/design/components/command.md): A keyboard-first search-and-act list (cmdk); the ⌘K menu and the core of every searchable picker.
- [ConfirmDialogProvider](/design/components/confirm-dialog-provider.md): App-wide confirmations through one hook: wrap the app in `ConfirmDialogProvider`, then call `useConfirm().confirm({...})` anywhere.
- [Dialog](/design/components/dialog.md): A modal for focused tasks that need an answer before going on; opens in 250ms from 96% scale and closes in 150ms (`.t-modal`).
- [DiscardChangesDialog](/design/components/discard-changes-dialog.md): An alert dialog that asks the user to confirm throwing away unsaved edits.
- [Drawer](/design/components/drawer.md): A panel that slides in from the bottom edge (or any edge), built on vaul, with a drag handle and swipe-to-dismiss.
- [DropdownMenu](/design/components/dropdown-menu.md): A menu of actions for one object, opening from a button; 250ms in from 97%, 150ms out to 99%.
- [Popover](/design/components/popover.md): A light panel anchored to its trigger; opens in 250ms from 97% scale (`.t-dropdown`).
- [Sheet](/design/components/sheet.md): A panel that slides in from an edge; opens in 400ms and closes in 350ms on the smooth-out ease (`--panel-*`).
