1.0.0 • Published 1 year ago

qrcode-web v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

QRCode.js

QRCode.js is javascript library for making QRCode. QRCode.js has no dependencies.

Basic Usages

<div id="qrcode"></div>
<script type="text/javascript">
new QRCode(document.getElementById("qrcode"), "website or text");
</script>

or with some options

<div id="qrcode"></div>
<script type="text/javascript">
var qrcode = new QRCode(document.getElementById("qrcode"), {
	text: "website or text",
	width: 128,
	height: 128,
	colorDark : "#000000",
	colorLight : "#ffffff",
	correctLevel : QRCode.CorrectLevel.H
});
</script>

and you can use some methods

qrcode.clear(); // clear the code.
qrcode.makeCode("http://naver.com"); // make another code.

or use as a webcomponent

<y-qrcode style="display: block; width: 100px; height: 100px">hello</y-qrcode>

License

MIT License

Thanks

Most of the code is based on the work of @davidshimjs https://github.com/davidshimjs/qrcodejs