JavaScript and TypeScript
The @zymbol/qr package provides a typed API for browsers and Node.js. Its WebAssembly module is compiled from the Zig core.
terminal
npm install @zymbol/qrEncode and render
typescript
import { createZymbol } from '@zymbol/qr';
const qr = await createZymbol();
const symbol = qr.encode('https://example.com');
const svg = qr.renderSvg(symbol);
const png = qr.renderPng(symbol, { scale: 8 });Micro QR
Micro QR is selected explicitly. Capacity and error-correction support depend on the version. The encoder reports invalid combinations.
typescript
const micro = qr.encode('123456', {
family: 'micro',
errorCorrection: 'L',
});Decode an existing grid
typescript
const result = qr.decode(symbol);
const text = new TextDecoder().decode(result.bytes);The decoder takes a module grid, not a JPEG or camera frame. Return values contain their own JavaScript buffers.
Public TypeScript types