Axinom Mosaic Libraries
    Preparing search index...

    Function useClickOutside

    • Hook to detect clicks outside of specified elements

      Parameters

      • refs: RefObject<HTMLElement>[]

        Array of refs to check if click is outside

      • handler: (event: MouseEvent | TouchEvent) => void

        Callback to execute when click is detected outside. Receives the event of the click.

      • enabled: boolean = true

        Whether the hook is active (default: true)

      Returns void