Showing posts from January, 2020

How To Create/ Generate QRcode In SPFx Web Part

A QR Code is a 2-dimensional bar code, which is generally used to encode a URL so that the user can scan the code using his/her smartphone to visit the concerned site. The camera/s of the latest smartphones can scan the QR code without having to install a separate app. Paytm is an example of how people started using QRCode widely nowadays.InstallationInside your SPFx project folder, run the below command from the terminal or node command promptnpm install --save qrcodeor, install it globally to use the QR Code from the command line to save QR code images or generate ones you can view in your terminal.npm install -g qrcodeUsageIn your SPFx web part code, in the component file(.tsx/.ts), add the QR Code reference as below. var QRCode = require('qrcode');   In the render() method, add the image tag to render the QR Code image. <img id="myQRcode" height="100%" width="100%" />   Instead of using the canvas element, the publisher here is using an imag…