Gathering detailed insights and metrics for react-click-outside-hook
Gathering detailed insights and metrics for react-click-outside-hook
Gathering detailed insights and metrics for react-click-outside-hook
Gathering detailed insights and metrics for react-click-outside-hook
react-outside-click-hook
A React hook that handles clicks outside of a given element and calls a provided function.
react-cool-onclickoutside
React hook to listen for clicks outside of the component(s).
@types/react-click-outside-hook
TypeScript definitions for react-click-outside-hook
@souvik666/react-outside-click-hook
A React hook for capturing outside click events. The useOutsideClick hook allows you to detect when a user clicks outside of a specific element on your website. It returns a reference to the element, which you can attach to a DOM node using the ref attrib
npm install react-click-outside-hook
Typescript
Module System
Node Version
NPM Version
67.1
Supply Chain
80.9
Quality
75.4
Maintenance
100
Vulnerability
100
License
JavaScript (90.67%)
CSS (9.33%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,239,956
Last Day
93
Last Week
2,786
Last Month
10,214
Last Year
134,202
MIT License
10 Stars
51 Commits
2 Forks
1 Watchers
5 Branches
2 Contributors
Updated on Nov 22, 2022
Minified
Minified + Gzipped
Latest Version
1.1.1
Package Id
react-click-outside-hook@1.1.1
Unpacked Size
18.75 kB
Size
4.99 kB
File Count
7
NPM Version
6.7.0
Node Version
10.15.0
Cumulative downloads
Total Downloads
Last Day
32.9%
93
Compared to previous day
Last Week
13.1%
2,786
Compared to previous week
Last Month
30.2%
10,214
Compared to previous month
Last Year
-25.4%
134,202
Compared to previous year
react-click-outside-hook
🎣React Hook implementation with click outside functionality.
pointer
and touch
eventsInstall using Yarn:
1yarn add react-click-outside-hook
or NPM:
1npm install react-click-outside-hook --save
useClickOutside
1const [ref, hasClickedOutside] = useClickOutside()
The new React Hooks make it easier than ever to monitor the hasClickedOutside
state of
your components. Call the useClickOutside
hook which will return an array containing a ref
and the
hasClickedOutside
status.
Simply assign the ref
to the DOM element you want to monitor and the hook will
report the status.
1import React from 'react' 2import { useClickOutside } from 'react-click-outside-hook' 3 4function Component() { 5 const [ref, hasClickedOutside] = useClickOutside() 6 return <div ref={ref}>{hasClickedOutside.toString()}</div> 7}
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 1/12 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
103 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-10
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More