Skip to content

Tooltip ​

Hover/focus tip

A short hint for a control whose purpose isn't obvious from its icon. Never put essential information or anything interactive in a tooltip; touch screens rarely show it. For richer content, Popover.

Basic
a link

Not inside <p>

The floating panel is a <div>. HTML closes a <p> when it meets a <div>, so a trigger placed inside a paragraph renders differently on the server and the client. Wrap with <span>/<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.