Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
lowlighter/libs🔳 SVG-based QRcode generator
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
6 months ago (2.0.1)
🔳 QR Code generator
📑 Examples
SVG output
import { qrcode } from "./mod.ts" const svg = qrcode("https://example.com", { output: "svg" }) console.assert(svg.includes("</svg>"))
Console output
import { qrcode } from "./mod.ts" qrcode("https://example.com", { output: "console" })
Array output
import { qrcode } from "./mod.ts" const array = qrcode("https://example.com") console.assert(Array.isArray(array))
✨ Features
- Support for
array
,console
andsvg
outputs out-of-the-box. - Support for custom colors and error correction level (ECL).
- Has a modern implementation using TypeScript and EcmaScript modules.
- Has no external dependencies (not even the DOM's
<canvas>
element)! - Is runtime agnostic (and even works in browsers)!
📜 License and credits
Copyright (c) Simon Lecoq <@lowlighter>. (MIT License) https://github.com/lowlighter/libs/blob/main/LICENSE Copyright (c) Project Nayuki. (MIT License) https://www.nayuki.io/page/qr-code-generator-library
This library is based on the awesome work of @nayiki.
Please take a look at their articles about QR Codes:
Built and signed on
GitHub Actions
Add Package
deno add jsr:@libs/qrcode
Import symbol
import * as qrcode from "@libs/qrcode";
Import directly with a jsr specifier
import * as qrcode from "jsr:@libs/qrcode";
Add Package
pnpm i jsr:@libs/qrcode
pnpm dlx jsr add @libs/qrcode
Import symbol
import * as qrcode from "@libs/qrcode";
Add Package
yarn add jsr:@libs/qrcode
yarn dlx jsr add @libs/qrcode
Import symbol
import * as qrcode from "@libs/qrcode";
Add Package
npx jsr add @libs/qrcode
Import symbol
import * as qrcode from "@libs/qrcode";
Add Package
bunx jsr add @libs/qrcode
Import symbol
import * as qrcode from "@libs/qrcode";