Skip to content
Calm motion: animations on this site only fade, with no movement

Tooltip ​

Hover/focus tip

A short hint for a control whose purpose is not obvious from its icon. Never put essential information or anything interactive in a tooltip. Touch screens rarely show it. For richer content, Popover.

Basic
Save (⌘S)Belowrich content, no delaya linkfocus me with Tab

Not inside <p>

The floating panel is a <div>. HTML closes a <p> at a <div>. For this reason, a trigger placed inside a paragraph renders differently on the server and the client. Wrap it in a <span> or <div> instead.

  • It shows on hover and on keyboard focus, and it describes the element inside it (the hint is read after the name). Esc hides it.
  • The pointer can move onto the tip without it disappearing. An icon-only button still needs its own name. The tooltip is a description, not the label.

Usage ​

ts
import { BlessTooltip } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
textstring—
placementPlacement"top"
delaynumber400

Slots

NameScopeDescription
default—
content—

Released under the MIT License. Character names and artwork belong to their owners.