Writing
2 min read
teiqr — QR codes you can prove are scannable
teiqr is on npm from today. It generates QR codes, styles them, and — the
part that is actually the point — checks that the styled result is still
scannable before you ship it.
Every QR library encodes and exports. What none of them tell you is whether the code you made is readable. Round the modules, punch a logo through the middle, drop the contrast to fit a brand palette, and you can produce something beautiful that no phone will scan. You find out from a customer.
npm install teiqrimport { qr } from 'teiqr';
const code = qr('https://teispace.com', {
moduleShape: 'rounded',
logo: { href: mark, sizeRatio: 0.22, excavate: true },
});
// The step nothing else does: rasterise it and read it back.
code.verify(); // throws if the styled code cannot be decoded
await writeFile('qr.png', code.png({ scale: 12 }));What is in it:
- Spec-conformant encoder
- Styled rendering
- Scannability check
- PNG · SVG · PDF · EPS
- Zero dependencies
- Node · Browser · Workers · Deno · Bun
The exports are the same artefact written four ways rather than four separate code paths, and the whole thing runs identically on every JavaScript runtime we could test it on. No native bindings, no canvas requirement, nothing to install alongside it.
Start here
Tell us what you are building
Or what is breaking, or what has to go faster. You will get a straight answer from an engineer who would do the work.