byronwade/ui
Application UI

Overlays · Application UI

Tooltip

A compound tooltip component built on Base UI that shows a floating label near a trigger element with animated entry/exit transitions.

Feature showcase

Installation

Features

  • 6 examples

    Default, Alignment, Rich Content, Sides, With Delay, With Icon.

API

Props

PropTypeDefaultDescription
side"top" | "bottom" | "left" | "right" | "inline-start" | "inline-end""top"Which side of the trigger the tooltip popup appears on.
sideOffsetnumber4Distance in pixels between the trigger and the tooltip popup.
align"start" | "center" | "end""center"Alignment of the tooltip relative to the trigger along the cross axis.
alignOffsetnumber0Offset in pixels along the alignment axis.
classNamestring-Additional CSS class names applied to the tooltip popup element.
childrenReact.ReactNode-Content rendered inside the tooltip popup.

Source and related

FilePath
Componentregistry/ui/tooltip.tsx
Default examplecontent/examples/tooltip/default.tsx
Alignment examplecontent/examples/tooltip/alignment.tsx
Rich Content examplecontent/examples/tooltip/rich-content.tsx
Sides examplecontent/examples/tooltip/sides.tsx
With Delay examplecontent/examples/tooltip/with-delay.tsx
With Icon examplecontent/examples/tooltip/with-icon.tsx