Skip to content

useTooltip

useTooltip(opts?): object

Defined in: react/components/overlay/tooltip.tsx:83

State helper for Tooltip: shows the tip after a hover delay and hides it on leave. Attach ref + spread triggerProps on the trigger, and spread props on <Tooltip>.

number

open: boolean

props: object

Spread on <Tooltip>: open + anchorRef.

anchorRef: RefObject<Widget | null>

open: boolean

ref: RefObject<Widget | null>

Ref to attach to the trigger widget.

triggerProps: object

Spread on the trigger: hover handlers + hover-interest opt-in.

hoverInterest: true

onMouseEnter: () => void

void

onMouseLeave: () => void

void