Tooltip

Hint bubble with an arrow that appears when you long-press a control. The rest of the screen dims while the control stays highlighted, then the hint fades away in place.

Preview

Installation

npx @lumioui/cli add tooltip

Usage

import { Tooltip } from "@/components/ui/tooltip/tooltip";
<Tooltip />

Examples

Eta

A parcel tracker.

Fees

An international transfer quote.

API reference

Prop Type Default
content* string

Tooltip text shown above the wrapped element.

—
children* React.ReactNode

Wrapped element; long-press reveals the tooltip.

—
dismissDelay number

Auto-dismiss delay in ms. Default 2000.

2000
className string

Extra classes for the tooltip bubble.

—
side "top" | "bottom"

Preferred side of the trigger. Flips when it doesn't fit. Default "top".

"top"
open boolean

Controlled visibility. Omit to let long-press + auto-dismiss manage it.

—
onOpenChange (open: boolean) => void —