Drop qr.js into your project and add a single
div
to display an interactive WalletConnect QR code.
project/
├── index.html
└── qr.js
</body> in your HTML file.
<!-- Before </body> --> <script src="./qr.js"></script>
div with class
qr-code
anywhere in your page body where you want the QR code to appear.
<div class="qr-code"></div>
window.QRWidget.init() after mounting new elements.
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Connect Wallet</title> </head> <body> <!-- Widget element --> <div class="qr-code"></div> <!-- Widget script (before </body>) --> <script src="./qr.js"></script> </body> </html>