Tooltip

Frond
Name or detail on hover and focus. Takes a shortcut.
Search K

Usage

The import, then a use to start from. Both copy as they are.

Import
import { Search } from "@/components/icons";import { Button } from "@/components/ui/button";import { Tooltip } from "@/components/ui/tooltip";
Example
<Tooltip content="Search" shortcut={["mod", "K"]}>    <Button variant="ghostMuted" size="iconSm" aria-label="Search">        <Search />    </Button></Tooltip>

When to use

Use it for

  • Name an icon-only control, or add a detail that doesn't fit: a full date, a truncated path.
  • Pass shortcut to show the keys beside the label.
  • side when the default placement covers what the person is reading.
  • It needs a TooltipProvider above it; the app shell has one.

Avoid

  • Anything needed to finish the task. Tooltips don't show on touch, so put it on the page.
  • Links or buttons inside a tooltip: use a Popover.

Accessibility

Checks

  • It opens on keyboard focus as well as hover.
  • The trigger keeps its own aria-label; the tooltip repeats it for sighted users.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

Tooltip

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsTOOLTIP_CONTENT_CLASSTooltipProviderTooltipTag
VariantsDefaultTopBottomLeftRightLongContentEmptyContentWithShortcutWithTaggedRow

Keep going

Accessibility
Fern supports accessibility standards out of the box.