https://github.com/faustienf/use-lifo-click-outside
🎯 Detect clicks outside of elements and close components in reverse order
https://github.com/faustienf/use-lifo-click-outside
click-outside clickoutside react react-click-away react-click-outside typescript
Last synced: about 1 year ago
JSON representation
🎯 Detect clicks outside of elements and close components in reverse order
- Host: GitHub
- URL: https://github.com/faustienf/use-lifo-click-outside
- Owner: faustienf
- License: mit
- Created: 2021-11-13T22:56:22.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-21T18:19:59.000Z (almost 4 years ago)
- Last Synced: 2025-04-18T13:05:23.233Z (about 1 year ago)
- Topics: click-outside, clickoutside, react, react-click-away, react-click-outside, typescript
- Language: TypeScript
- Homepage: https://codesandbox.io/s/github/faustienf/use-lifo-click-outside
- Size: 2.09 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ⚛️ useLifoClickOutside()
[](https://npmjs.org/package/use-lifo-click-outside)
📡 Detect clicks outside of elements and close components in reverse order.
## Installation
```bash
npm i use-lifo-click-outside
```
## Usage
```tsx
import { useLifoClickOutside } from 'use-lifo-click-outside';
useLifoClickOutside(ref, onClose);
...
```