@polargold/pg-frontend-vue
    Preparing search index...

    Function useClickOutside

    • Calls back on any click that lands outside every given element. Structured like useFocusTrap (explicit activate/deactivate) - the caller is responsible for wiring deactivate() into its own onBeforeUnmount.

      Ported from luv-ui-library, found during the same follow-up re-scan that found useFocusTrap there. Fully generic (no brand coupling).

      Parameters

      • elements: Ref<HTMLElement | null | undefined, HTMLElement | null | undefined>[]
      • onClickOutside: (event: MouseEvent) => void

      Returns { activate: () => void; deactivate: () => void }