Click Outside
Listen for clicks outside of an element. Useful for modal or dropdown.
# API
# ClickOutsideConfig
Property | Description | Default |
---|---|---|
enabled? |
boolean | Readable<boolean> Whether the listener is active. |
true |
handler? |
(evt: PointerEvent) => void Callback when user clicks outside a given element. |
— |
ignore? |
Function | Element[] A predicate function or a list of elements that should not trigger the event. |
— |