Weftv0.4.0
GitHubFigma
Blade AI
Display & Navigation · Tooltipstable

Tooltip

A short text hint that appears on hover or focus of a trigger, with optional heading, four placements and start, center or end alignment.

Preview

#preview

Switch placement, alignment, heading and state. The tooltip is held open here; in an app it opens on hover and focus.

top · center · none · open
tooltip-example.tsx
import { Tooltip } from "@blade-ai/weft/components/tooltip";

export function RefundHint() {
  return (
    <Tooltip
      content="Refunds settle in 5 to 7 business days."
    >
      <Button variant="secondary">Refund</Button>
    </Tooltip>
  );
}

All states

#all-states

Each placement and alignment, shown open and inline, plus the heading variant.

Tooltip · 9 states · shown open and inline; trigger is a secondary button
Top · center
Top · start
Top · end
Bottom · center
Bottom · start
Bottom · end
Left
Right
With heading

Props

#props

Tooltip wraps a single focusable trigger and adds aria-describedby to it.

Prop
Type
Default
Description
content
ReactNode
—
The tooltip text. Keep it short; it cannot hold interactive content (use Popover). Required.
heading
string
—
Optional bold first line.
children
ReactElement
—
The trigger. A single focusable element; it receives aria-describedby. Required.
placement
"top" | "bottom" | "left" | "right"
"top"
Side of the trigger.
align
"start" | "center" | "end"
"center"
Alignment along the trigger edge. Ignored for left and right.
delay
number
300
Hover delay before showing, in ms. Focus shows immediately.
isOpen
boolean
—
Controlled visibility. Omit to open on hover and focus.
isDisabled
boolean
false
Never shows.
className
string
—
Extra classes on the anchor.

Usage

#usage

Short rules for choosing and writing tooltips.

Do
Explain an icon-only button or a truncated value.
Keep it to one short sentence.
Use a heading only when the hint has a second line of detail.
Use a trigger that is already focusable.
Don't
Do not put links, buttons or forms inside; use a Popover.
Do not hide required information in a tooltip.
Do not repeat the trigger label word for word.
Do not use it on touch-only flows; there is no hover.

Accessibility

#accessibility

role tooltip, linked to the trigger with aria-describedby. Focus shows it immediately; Esc dismisses it.

Keyboard
Key
Action
Tab
Focuses the trigger and shows the tooltip at once.
Esc
Dismisses the tooltip while it is open.
Hover
Shows the tooltip after the delay; leaving hides it.
ARIA
Element
Role / attribute
When
Tooltip
role="tooltip" · id
Rendered while visible.
Trigger
aria-describedby
Points at the tooltip while it is visible.
Arrow
aria-hidden
Always. Decorative.