Tooltip
A short dark label for a control, shown when the pointer rests on it or keyboard focus reaches it. Built on ui-sdk's Tooltip: it names an icon button and describes anything else, closes on Escape, and opens in the top layer. Opens at once by default.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { SimpleTooltip, Tooltip, TooltipTrigger, TooltipContent } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Props
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Wrap an IconButton in SimpleTooltip for the common case: one label on one trigger, matching the button's aria-label. |
| Do | Pick the delay from tooltipDelay: quick names a control, deliberate suits form help and editor buttons, explanatory explains a label already on screen. |
| Do | Use size="rich" with TooltipTitle, TooltipText and TooltipHint for more than one line, like the time an opportunity has spent in a stage. |
| Don't | Put a link, a button or the only copy of an error in a tooltip. It closes when the pointer moves away; use Popover for actions or HoverCard for a preview. |
| Don't | Add a tooltip by hand to show a cut-off value. Use Truncate, which shows the whole value only while it is clipped. |
| Don't | Colour custom tooltip text with text-neutral-surface. The tooltip stays dark in dark mode, so use text-on-tooltip, as its parts do. |
Props
Tooltip also takes ui-sdk's Tooltip options (open, defaultOpen, onOpenChange, closeDelay, toggleable, closeOnPress, type, controller). TooltipContent takes its position props (collisionPadding, anchor, container), and TooltipTrigger takes render and payload.
SimpleTooltip
| Prop | Type | Default | Description |
|---|---|---|---|
| label * | ReactNode | — | What the tooltip says. Nothing (null, undefined or false) renders the trigger alone. |
| children * | ReactElement | — | The one element it labels, like an IconButton. |
| disabled | boolean | — | Keeps the trigger but never opens. |
| delay | number | — | How long the pointer rests before it opens. |
| shortcut | string | — | A keyboard shortcut to show after the label, like `"mod+s"`. |
| side | TooltipContentProps["side"] | — | Which side it opens on. It flips to the other when there isn't room. |
| align | TooltipContentProps["align"] | — | How it lines up along that side: start, center or end. |
Tooltip
| Prop | Type | Default | Description |
|---|---|---|---|
| delay | number | 0 | How long the pointer rests before it opens. |
TooltipContent
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | What it shows inside. |
| size | "plain" | "rich" | "plain" | Plain for a short label. Rich for a title with lines under it, built from TooltipTitle, TooltipText and TooltipHint. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
| side | TooltipContentProps["side"] | "top" | Which side it opens on. It flips to the other when there isn't room. |
| align | TooltipContentProps["align"] | "start" | How it lines up along that side: start, center or end. |
| sideOffset | unknown | 4 | The gap between it and what it opens from, in pixels. |
TooltipTitle
| Prop | Type | Default | Description |
|---|---|---|---|
| children * | ReactNode | — | What it shows inside. |
| meta | ReactNode | — | A quieter value after the title. |
TooltipText
| Prop | Type | Default | Description |
|---|---|---|---|
| children * | ReactNode | — | What it shows inside. |
TooltipHint
| Prop | Type | Default | Description |
|---|---|---|---|
| children * | ReactNode | — | What it shows inside. |
Code
What the playground shows, ready to copy.
import { Button, SimpleTooltip } from "@leap-crm/design-system";
<SimpleTooltip label="Add contact">
<Button intent="outline">Hover me</Button>
</SimpleTooltip>Icon buttons
The common case: SimpleTooltip around an IconButton. Move along the toolbar: once one tooltip is open, the next opens at once without animating, so nothing flickers. Shortcuts show in the platform's form.
Rich
More than one line: a title with a quieter value, secondary lines and a hint. Used on pipeline stages and avatar groups, below the trigger with 8 px between.
Wrapping
A long label wraps at 320 px rather than running off the page.
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { Bold, Italic, Link, List, Save, Settings, Strikethrough, Underline } from "lucide-react";
import { Button, IconButton, SimpleTooltip, Tooltip, TooltipContent, TooltipHint, TooltipText, TooltipTitle, TooltipTrigger, tooltipDelay } from "@leap-crm/design-system";
const formatting = [
{ label: "Bold", icon: <Bold />, shortcut: "mod+b" },
{ label: "Italic", icon: <Italic />, shortcut: "mod+i" },
{ label: "Underline", icon: <Underline />, shortcut: "mod+u" },
{ label: "Strikethrough", icon: <Strikethrough />, shortcut: undefined },
{ label: "Bulleted list", icon: <List />, shortcut: undefined },
{ label: "Link", icon: <Link />, shortcut: "mod+k" },
] as const;Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Tab | Focus on the trigger shows the tooltip. |
| Escape | Closes the tooltip and leaves focus on the trigger. |







