Skip to Content
Notion UI

Tooltip

Show a description when an element is hovered or focused.

Tooltip Demo

Installation

pnpm add @notion-kit/ui

Anatomy

Compose the Base UI tooltip parts directly when you need custom content or positioning. Use render to merge the trigger behavior into your button.

<TooltipProvider>
  <Tooltip>
    <TooltipTrigger render={<Button>Open search</Button>} />
    <TooltipContent>
      {...}
    </TooltipContent>
  </Tooltip>
</TooltipProvider>

TooltipDescription supports primary text, secondary text, and images:

<TooltipContent>
  <TooltipDescription text="Open search" />
  <TooltipDescription type="secondary" text="⌘ K" />
  <TooltipDescription type="image" text="/search-preview.png" />
</TooltipContent>

API Reference

TooltipProvider

Uses Base UI provider props. The default delay is 600 milliseconds. Use timeout to control how long subsequent tooltips skip the opening delay.

Tooltip

Uses Base UI root props, including open and onOpenChange.

TooltipTrigger

Uses Base UI trigger props. Pass a React element to render to avoid adding a wrapper around the trigger.

TooltipContent

Accepts Base UI popup props plus align, alignOffset, anchor, collisionPadding, side, and sideOffset. Its default sideOffset is 4.

TooltipDescription

Prop

Type

On this page