Description
Lean QR is a small library for generating QR codes in the browser and on the server. The README says it runs in Node.js and all recent browsers, and it includes wrapper components for React, Preact, Vue and native Web Components. The core package is under 4 kB compressed with no dependencies, and an even smaller nano export is around 2 kB compressed, with some features removed. The library is ISO 18004 compliant and supports the standard encodings, including Unicode and Shift-JIS. It can encode data automatically in the way that gives the smallest output, and it accepts custom modes for special requirements. Output formats include canvas, PNG, SVG and plain text. The README says the API has sensible defaults for every setting, and it is fast enough for live editing as the user types. You can try it online or from the terminal with a command line option. For Jest tests that run in JSDOM, the README explains a known bug where TextEncoder is missing, with a fix to place in the test setup rather than in application code. The full documentation covers a quickstart for each platform, the API reference, the source and a comparison with other libraries.…
Highlights
- QR code generation in browsers and Node.js
- Under 4 kB compressed with no dependencies
- Nano export for a smaller build
- ISO 18004 compliant
- Canvas, PNG, SVG and text output
- Wrappers for React, Preact, Vue and Web Components
Ratings & Reviews
No ratings yet
Be the first to rate lean-qr.
People also visit
lean-qr FAQ
What is Lean QR?
A small JavaScript library for generating QR codes in browsers and on the server.
Is it free?
The source is public on GitHub and listed as open source.
What output formats does it support?
The README lists canvas, PNG, SVG and text output.
Does it work with React?
Yes. The README lists a wrapper component for React, as well as Preact, Vue and native Web Components.
What are the best lean-qr alternatives?
Popular alternatives to lean-qr include qrcode.react, @lglab/react-qr-code and qrcode.vue. See all lean-qr alternatives















