Skip to content

CaiFanglin/vue-qrcode

 
 

Repository files navigation

vue-qrcode

Qrcode component for Vue.js. It is based on QRious.

Table of contents

Main

dist/
├── vue-qrcode.js        (75 KB, UMD)
├── vue-qrcode.min.js    (19 KB, UMD, compressed)
├── vue-qrcode.common.js (75 KB, CommonJS)
└── vue-qrcode.esm.js    (75 KB, ES Module)

Getting started

Download

  • Download the latest release.
  • Clone the repository: git clone https://github.com/xkeshi/vue-qrcode.git.
  • Install with NPM: npm install xkeshi/vue-qrcode.

Usage

  • Browser: window.VueQrcode
  • CommonJS: var VueQrcode = require('vue-qrcode')
  • ES2015: import VueQrcode from 'vue-qrcode'
Vue.component('qrcode', VueQrcode);
<qrcode value="Hello, World!" :options="{ size: 200 }"></qrcode>

⬆ back to top

Props

value

  • Type: String

The value of the qrcode.

options

  • Type: Object

The options for the qrcode generator. References the QRious's options.

tag

  • Type: String
  • Default: 'canvas'
  • Options: 'canvas' and 'img'

The tag of the component root element.

Browser support

  • Chrome (latest)
  • Firefox (latest)
  • Safari (latest)
  • Opera (latest)
  • Edge (latest)
  • Internet Explorer 9+

Versioning

Maintained under the Semantic Versioning guidelines.

License

MIT © xkeshi

⬆ back to top

Packages

No packages published

Languages

  • JavaScript 100.0%