useTooltipTriggerState
Manages state for a tooltip trigger. Tracks whether the tooltip is open, and provides
methods to toggle this state. Ensures only one tooltip is open at a time and controls
the delay for showing a tooltip.
useTooltipTriggerState(
(props: TooltipTriggerProps
)): TooltipTriggerState
Properties
Name | Type | Description |
isOpen | boolean | Whether the tooltip is currently showing. |
Methods
Method | Description |
open(
(immediate: boolean
)): void | Shows the tooltip. By default, the tooltip becomes visible after a delay
depending on a global warmup timer. The immediate option shows the
tooltip immediately instead. |
close(
(immediate: boolean
)): void | Hides the tooltip. |
See the docs for useTooltipTrigger in react-aria for an example of useTooltipTriggerState
.