This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@billogram/use-click-outside
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

@billogram/use-click-outside

A React hook for handling clicks outside of an element

Install

yarn add @billogram/use-click-outside

Usage

import useClickOutside from '@billogram/use-click-outside';

See types for exported types.

useClickOutside

const node = React.useRef<HTMLDivElement>(null);
useClickOutside(node, function onClickOutside() {
    // do something when a click outside event occurs
});

Note

This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i @billogram/use-click-outside

Weekly Downloads

7

Version

1.2.0

License

MIT

Unpacked Size

10.8 kB

Total Files

15

Last publish

Collaborators

  • andreagylling
  • ewakosciukiewicz
  • irynaziruikina
  • jamesbillo
  • jmfederico
  • miriamlarsson
  • oscarekholm