Show HN: Use-outside-click – tiny framework-agnostic outside click utility
Category: library
Tags: react-hook, outside-click, typescript
Score: 5.5/10 (Innovation: 3, Technical: 5, Documentation: 8, Utility: 6)
A tiny, framework-agnostic React hook for detecting clicks outside an element, useful for dropdowns, modals, and tooltips. It offers zero dependencies, TypeScript support, SSR safety, and multiple ref handling in a ~300 byte gzipped package, providing a cleaner alternative to older class-based solutions.
Target audience: frontend devs
Repository: https://www.npmjs.com/package/@kitsunechaos/use-outside-click · TypeScript · MIT · 1 stars
View on Hacker News