Gathering detailed insights and metrics for v-clipboard3
Gathering detailed insights and metrics for v-clipboard3
Gathering detailed insights and metrics for v-clipboard3
Gathering detailed insights and metrics for v-clipboard3
npm install v-clipboard3
Typescript
Module System
Node Version
NPM Version
JavaScript (58.21%)
TypeScript (41.79%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
2 Stars
5 Commits
2 Forks
1 Watchers
2 Branches
1 Contributors
Updated on Mar 07, 2023
Latest Version
0.1.4
Package Id
v-clipboard3@0.1.4
Unpacked Size
49.22 kB
Size
12.41 kB
File Count
5
NPM Version
6.14.9
Node Version
14.3.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Easily copy to clipboard in Vue 3 (composition-api) using clipboard.js 📋
npm install --save v-clipboard3
For vue-cli user:
1import { createApp } from 'vue'; 2// If the directive scheme is not used, no global registration is required 3import Clipboard from 'v-clipboard3'; 4const app = createApp(App); 5app.use(Clipboard);
For standalone usage:
1<script src="vue.min.js"></script> 2<!-- must place this line after vue.js --> 3<script src="dist/v-clipboard3.min.js"></script>
1<div id="app"></div> 2 3<template id="t"> 4 <div class="container"> 5 <input type="text" v-model="message" /> 6 <button type="button" v-clipboard:copy="message" v-clipboard:success="onCopy" v-clipboard:error="onError">Copy!</button> 7 </div> 8</template> 9 10<script lang="ts"> 11 import { defineComponent } from 'vue'; 12 13 export default defineComponent({ 14 name: 'App', 15 setup() { 16 const message = '8888'; 17 function onCopy(params: any) { 18 console.log(params); 19 } 20 function onError(params: any) { 21 console.log(params); 22 } 23 return { onCopy, onError, message }; 24 }, 25 }); 26</script>
1<div id="app"></div> 2 3<template id="t"> 4 <div class="container"> 5 <input type="text" v-model="message" /> 6 <button type="button" @click="handleCopy">Copy!</button> 7 </div> 8</template> 9 10<script lang="ts"> 11 import { defineComponent } from 'vue'; 12 import { useClipboard } from 'v-clipboard3'; 13 14 export default defineComponent({ 15 name: 'App', 16 setup() { 17 const message = '8888'; 18 async function handleCopy() { 19 try { 20 await useClipboard(message); 21 alert('copy ok!'); 22 } catch (error) { 23 console.log(error); 24 alert('copy error!'); 25 } 26 }, 27 return { handleCopy, message }; 28 }, 29 }); 30</script>
PRs welcome, and issues as well! If you want any feature that we don't have currently, please fire an issue for a feature request.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/5 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
no SAST tool detected
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-06-30
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