Qrim
Qrim (QR Image Maker), a JavaScript library for generating QR Code images.
Origianly forked from qrcode.js. Removed legacy code, refactored to support ES modules, included UTF8 character support, and added stylization options.
Usage
<div id="qrcode"></div>
<script type='module'>
import { QRCode } from 'qrim';
const qr = new QRCode(document.getElementById("qrcode"), "http://www.code.com");
</script>
Options
Parameters object, all properties are optional
import { QRCode } from 'qrim';
const qr = new QRCode(document.getElementById("qrcode"), {
text: "http://www.domain.com",
size: 1024,
colorDark : "#000000",
colorLight : "#ffffff",
border: 1,
padding: 1,
opacity: 1,
style: QRCode.Styles.Square,
correctLevel: QRErrorCorrectLevel.H,
});
Methods
qr.makeCode("http://www.newcode.com");
const params = {
text: "http://www.newcode.com",
size: 2048,
opacity: 0.5,
};
qr.makeCode(params);