GitHub

QR Code

SVG QR code generator with custom colors, sizes, and error correction.

<rhx-qr-code>

Examples

Basic

Large with High Error Correction

Custom Colors

Rounded Dots

Small

Error Correction Levels

L (7%)
M (15%)
Q (25%)
H (30%)

Properties

Property Type Default Description
rhx-value string - The text/URL to encode
rhx-label string - Accessible label for the QR code
rhx-size int 128 Width and height in pixels
rhx-fill string #000000 Color of the QR code modules
rhx-background string #ffffff Background color
rhx-error-correction string M Error correction level: L, M, Q, H
rhx-radius double 0 Dot corner radius (0 = square, 0.5 = rounded)

Accessibility

  • Renders an SVG with role="img" and aria-label from the rhx-label property.
  • Includes a <title> element inside the SVG for additional screen reader support.
  • QR codes are visual-only; always provide alternative text or a visible link alongside the QR code.