Gathering detailed insights and metrics for react-use-clipboard
Gathering detailed insights and metrics for react-use-clipboard
Gathering detailed insights and metrics for react-use-clipboard
Gathering detailed insights and metrics for react-use-clipboard
use-clipboard-copy
Lightweight copy to clipboard hook for React
use-clipboard-api
📋useClipboardApi is a React Hook that consumes Web Clipboard API.
use-clippy
A React hook for reading from and writing to the clipboard.
react-use-copy-to-clipboard
this hook is needed to copy text to the clipboard when clicking on any element
React hook that provides copy to clipboard functionality.
npm install react-use-clipboard
Typescript
Module System
Node Version
NPM Version
94.1
Supply Chain
68.9
Quality
75.7
Maintenance
100
Vulnerability
100
License
TypeScript (75.82%)
JavaScript (24.18%)
Total Downloads
11,341,022
Last Day
3,143
Last Week
70,941
Last Month
262,524
Last Year
2,741,462
MIT License
264 Stars
101 Commits
15 Forks
1 Watchers
4 Branches
6 Contributors
Updated on Jun 25, 2025
Minified
Minified + Gzipped
Latest Version
1.0.9
Package Id
react-use-clipboard@1.0.9
Unpacked Size
12.84 kB
Size
4.04 kB
File Count
13
NPM Version
6.14.16
Node Version
12.22.12
Cumulative downloads
Total Downloads
Last Day
-17.8%
3,143
Compared to previous day
Last Week
4.8%
70,941
Compared to previous week
Last Month
24.5%
262,524
Compared to previous month
Last Year
-8%
2,741,462
Compared to previous year
A React Hook that provides copy to clipboard functionality.
You can install react-use-clipboard
with NPM or Yarn.
1npm install react-use-clipboard
1yarn add react-use-clipboard
Here's how to use react-use-clipboard
:
1import useClipboard from "react-use-clipboard"; 2 3function App() { 4 const [isCopied, setCopied] = useClipboard("Text to copy"); 5 6 return ( 7 <button onClick={setCopied}> 8 Was it copied? {isCopied ? "Yes! 👍" : "Nope! 👎"} 9 </button> 10 ); 11}
You can reset the isCopied
value after a certain amount of time with the successDuration
option.
1import useClipboard from "react-use-clipboard";
2
3function App() {
4 const [isCopied, setCopied] = useClipboard("Text to copy", {
5 // `isCopied` will go back to `false` after 1000ms.
6 successDuration: 1000,
7 });
8
9 return (
10 <button onClick={setCopied}>
11 Was it copied? {isCopied ? "Yes! 👍" : "Nope! 👎"}
12 </button>
13 );
14}
This package only works in versions of React that support Hooks.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 1/8 approved changesets -- score normalized to 1
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
detected GitHub workflow tokens with excessive permissions
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
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
25 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-23
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