vue-qrcode
QR code component for Vue 3, bases on node-qrcode. For Vue 2, check out the
v1
branch.
Main npm package files
dist/
โโโ vue-qrcode.js (UMD, default)
โโโ vue-qrcode.min.js (UMD, compressed)
โโโ vue-qrcode.esm.js (ECMAScript Module)
โโโ vue-qrcode.esm.min.js (ECMAScript Module, compressed)
โโโ vue-qrcode.d.ts (TypeScript Declaration File)
Getting started
Installation
Using npm:
npm install vue@3 qrcode@1 @chenfengyuan/vue-qrcode@2
Using pnpm:
pnpm add vue@3 qrcode@1 @chenfengyuan/vue-qrcode@2
Using Yarn:
yarn add vue@3 qrcode@1 @chenfengyuan/vue-qrcode@2
Using CDN:
<script src="https://unpkg.com/vue@3"></script><!-- Vue.js is required -->
<script src="https://unpkg.com/[email protected]/build/qrcode.js"></script><!-- qrocde is required -->
<script src="https://unpkg.com/@chenfengyuan/vue-qrcode@2"></script>
Usage
import { createApp } from 'vue';
import VueQrcode from '@chenfengyuan/vue-qrcode';
const app = createApp({});
app.component(VueQrcode.name, VueQrcode);
<vue-qrcode value="Hello, World!" :options="{ width: 200 }"></vue-qrcode>
Browser support
Same as Vue 3.
Versioning
Maintained under the Semantic Versioning guidelines.
License
MIT ยฉ Chen Fengyuan