Gathering detailed insights and metrics for vue-qrcode-dynamic
Gathering detailed insights and metrics for vue-qrcode-dynamic
Gathering detailed insights and metrics for vue-qrcode-dynamic
Gathering detailed insights and metrics for vue-qrcode-dynamic
npm install vue-qrcode-dynamic
Typescript
Module System
Node Version
NPM Version
75.8
Supply Chain
99.1
Quality
75.6
Maintenance
100
Vulnerability
100
License
Total Downloads
1,428
Last Day
1
Last Week
6
Last Month
23
Last Year
283
Minified
Minified + Gzipped
Latest Version
3.0.3
Package Id
vue-qrcode-dynamic@3.0.3
Unpacked Size
755.44 kB
Size
181.96 kB
File Count
9
NPM Version
6.14.17
Node Version
14.19.3
Published on
Jan 17, 2023
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
500%
6
Compared to previous week
Last Month
-14.8%
23
Compared to previous month
Last Year
-5%
283
Compared to previous year
This package is developed thanks to qrcode.vue package.
The result of this component based on your data will be something like above.
npm install vue-qrcode-dynamic
Notice: Install the version 2 of this package if you use Vue 2. npm i vue-qrcode-dynamic@2
Notice: Install the version 3 of this package if you use Vue 3. npm i vue-qrcode-dynamic@3
1//On Vue 2 2import Vue from "vue"; 3import QRCode from "vue-qrcode-dynamic"; 4 5Vue.component("QRCode", QRCode); 6 7 8//On Vue 3 9import { createApp } from "vue"; 10import App from "./App.vue"; 11import QRCode from "vue-qrcode-dynamic"; 12 13const app = createApp(App); 14app.component("QRCode", QRCode);
You can call that on Vue2 or Vue3 according to the above commands. I have named this component to QRCode, you can change it any name.
Notice: Since we usually use QRCode on 1 component or a few components, it is better to call that locally, which is stated below.
These above commands must be written in the main.js file.
1import QRCode from "vue-qrcode-dynamic"; 2 3export default { 4 components: { QRCode }, 5 ... 6}
You can also define and use this component locally.
1 <QRCode 2 value="Hello World" 3 level="H" 4 :QRSize="194" 5 QRBackgroundColor="white" 6 :logoImg="require('@/assets/logo.png')" 7 :logoSize="47" 8 logoBackgroundColor="white" 9 />
Notice: All props are optional, but value, based on your demand. If you put no props and write <QRCode value="Hello World" />
, the qrcode will be displayed with the value of Hello World, and the default size of 200*200 px.
string
"Hello World"
The value content of qrcode. You can put static or dynamic content.
string
H
qrcode Error correction level (one of 'L', 'M', 'Q', 'H'). Know more, wikipedia: QR_code
If you use logoBackgroundColor props, I recommend to use level:H . Because you might deal with some issues to read the qrcode when you use others levels when you have a big logo with logoBackgroundColor props.
number
200
The pixel size of qrcode element. Its width and height will be the same size.
string
transparent
The background color of qrcode. You can specify any color, like "white" even hash type, like "#ffffff".
string
""
The image of middle of the qrcode. If you want to put a logo or specific photo in the middle of qrcode, you can put it static or dynamic by specifying its address.
Notice: If the logo doesn't get loaded during 5 seconds after loading the page, or appeared like broken image, the logo won't be displayed at all.
number
30
The pixel size of logo element. Its width and height will be the same size. Considering, the max size of the logo will be at most 1/3 of the QRCode size to make the qrcode readable. In other words, if you put :QRSize="180" and :logoSize="100", the max logo size will be set automatically on 60, due to stated reason.
string
transparent
The background color of logo. You can specify any color, like "white" even hash type, like "#ffffff". It will be set with a padding 2 pixel.
I hope these package will be useful for you. If you see any issue or concern in this case, please let me know through this email hami.khosravi@gmail.com. to get them fixed ASAP.
No vulnerabilities found.
No security vulnerabilities found.