Qr Code
Zero-dependency QR code encoder (byte mode, versions 1–10) that renders an SVG matrix using theme foreground and background colors.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
value | string | — | Text or URL to encode into the QR code. |
size | number | 200 | Width and height of the rendered SVG in pixels. |
level | string | M | Error correction level: L, M, Q, or H. |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/qr-code.js"></script> import "./pura/lib/qr-code.js";