usePointerDownOutside

Detects pointer-down events outside a component tree.

Detects pointer-down events that occur outside a component's DOM tree. Returns a capture handler to attach to the component's root element.

Import#

import { usePointerDownOutside } from '@volue/wave-react';

Example#


API Reference#

Arguments#

Prop
Type
Default
onPointerDownOutside
(event: PointerDownOutsideEvent) => void

Returns#

{ onPointerDownCapture: () => void } — An object with a capture handler to attach to the root element.