react-detect-outside-click-wrapper

A lightweight and reusable React wrapper component that detects clicks outside its children. Perfect for dropdowns, modals, popovers, or any UI that should close when the user clicks outside. Supports optional toggle button refs and TypeScript out of the

Browse on unpkg