ts-qrcode

Pure TypeScript QRCode generator, for browser use.

Usage no npm install needed!

<script type="module">
  import tsQrcode from 'https://cdn.skypack.dev/ts-qrcode';
</script>

README

ts-qrcode

Pure TypeScript QRCode generator, for browser use.

usage

npm install ts-qrcode

and import QRCode. Or, add script tag for qrcode.min.js. Then, you can generate qrcode as follows:

QRCode.setCanvas('id-of-target-element', { text: 'qrcode-text' });

where first argument is the id of target element. Look at the sample/index.html for more information.

License

MIT

Note

This code was written with reference to jquery.qrcode.js. (Especially, qrcode.js as know as "QRCode for JavaScript", Copyright (c) 2009 Kazuhiko Arase)