A Vue component for QR code generation.
Install vue-qrcode-image
with your favorite package manager:
$ npm i vue-qrcode-image
# or
$ yarn add vue-qrcode-image
# or
$ pnpm i vue-qrcode-image
# or
$ bun add vue-qrcode-image
<script lang="ts" setup>
import { ref } from 'vue';
import QrcodeImage from 'vue-qrcode-image';
const qrcode = ref('https://www.npmjs.com/search?q=vue-qrcode-image');
</script>
<template>
<QrcodeImage :value="qrcode" />
</template>
- Type:
number
- Default:
6
<QrcodeImage :value="qrcode" :size="5" />
- Type:
number
- Default:
24
<QrcodeImage :value="qrcode" :margin="18" />
- Type:
[R: number, G: number, B: number]
- Default:
[0, 0, 0]
<QrcodeImage :value="qrcode" :foreground="[99, 102, 241]" />
- Type:
[R: number, G: number, B: number]
- Default:
[255, 255, 255]
<QrcodeImage :value="qrcode" :background="[99, 102, 241]" />