Rendering a QR code
just pass the string to the input attribute
change the size passing the px to the width attribute
Custom colors: using the host background-color and the ::part(canvas)
How to:
- Add the script tag
<script type="module" src="https://cdn.jsdelivr.net/npm/@dgrammatiko/qr-element/+esm"></script>
- Add the element tag
<qr-element input="some string" width="300px"></qr-element>