Skip to content

AttachTooltipOptions

Defined in: ui/src/attachTooltip.ts:12

Options for attachTooltip.

content: () => UIElement

Defined in: ui/src/attachTooltip.ts:18

Builds the tooltip body, called once. Headless — return a styled node (e.g. a UIPanel/PanelNode with a background + padding) for visuals; nothing is added for you.

UIElement


optional maxWidth?: number

Defined in: ui/src/attachTooltip.ts:32

Cap the bubble width (px). Long content wraps instead of running off screen; the bubble always also clamps to the space available at the resolved side.


optional offset?: number

Defined in: ui/src/attachTooltip.ts:26

Gap in px between the anchor and the bubble. Default 6.


optional placement?: Placement

Defined in: ui/src/attachTooltip.ts:24

Preferred side, optionally aligned ("top", "bottom-start", …). Default "top" (center-aligned). The bubble flips to the opposite side and shifts along the cross axis to stay on-screen.