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
93.9
Supply Chain
69.7
Quality
75.7
Maintenance
100
Vulnerability
100
License
TypeScript (75.82%)
JavaScript (24.18%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
10,602,072
Last Day
8,177
Last Week
45,083
Last Month
200,556
Last Year
2,827,287
MIT License
265 Stars
101 Commits
15 Forks
1 Watchers
4 Branches
6 Contributors
Updated on Nov 17, 2024
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
-0.3%
8,177
Compared to previous day
Last Week
1.5%
45,083
Compared to previous week
Last Month
34.2%
200,556
Compared to previous month
Last Year
-7.4%
2,827,287
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 dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/8 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
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
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
22 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-02-17
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