OpenQRL SDK

Generate QR codes from any website — no framework needed

Quick Start

Add the script and call OpenQTR.generate():

<script src="https://cdn.jsdelivr.net/npm/@satirr/openqtr/dist/sdk.js"></script>
<div id="qr"></div>
<script>
  OpenQTR.generate({
    text: "https://example.com",
    element: "#qr",
    size: 250,
  });
</script>

Installation

CDN (recommended):

<script src="https://cdn.jsdelivr.net/npm/@satirr/openqtr/dist/sdk.js"></script>

Self-host: Use /openqtr-sdk.js if running the OpenQTR app locally.

Options Reference

OptionTypeDefaultDescription
textstringData to encode (required)
elementstring | HTMLElementCSS selector or element ref (required)
sizenumber200QR code size in px
format"png" | "svg""png"Output format
fgColorstring"#000000"Foreground color
bgColorstring"#ffffff"Background color
errorCorrectionLevelstring"M"L | M | Q | H

Examples

SVG with custom colors:

OpenQTR.generate({
  text: "Hello World",
  element: "#qr",
  size: 400,
  format: "svg",
  fgColor: "#e94560",
  bgColor: "transparent",
  errorCorrectionLevel: "H",
});

Expert guide

For the full API reference, error handling details, rendering internals, browser support, and build-from-source instructions, open the comprehensive markdown guide:

Read the full expert guide (GUIDE-API.md)