useGraceArea
Creates a grace area polygon for smooth pointer transitions between trigger and content elements.
Creates an invisible buffer zone between a trigger element and its content, preventing accidental closure during pointer transitions. Used internally by hover-based components like tooltips.
Import#
import { useGraceArea } from '@volue/wave-react';
Example#
API Reference#
Arguments#
Prop | Type | Default |
|---|---|---|
triggerEl* | HTMLElement | null | — |
contentEl* | HTMLElement | null | — |
onClose | () => void | — |
onPointerInTransitChange | (inTransit: boolean) => void | — |
Returns#
void