npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@manufosela/qr-code

v2.0.0

Published

QR code generator web component

Readme

@manufosela/qr-code

QR code generator web component. Built with Lit.

Installation

npm install @manufosela/qr-code

Usage

import '@manufosela/qr-code';
<qr-code data="https://example.com"></qr-code>

Features

  • Pure JavaScript QR generation (no external dependencies)
  • Canvas-based rendering
  • Customizable colors
  • Multiple error correction levels
  • Download as PNG
  • Responsive sizing
  • CSS custom properties for theming

Attributes

| Attribute | Type | Default | Description | | ------------------ | ------ | --------- | ------------------------------ | | data | String | '' | Text or URL to encode | | size | Number | 200 | QR code size in pixels | | error-correction | String | 'M' | Error correction level (L/M/Q/H) | | color | String | #000000 | Foreground (module) color | | background | String | #ffffff | Background color |

Methods

| Method | Description | | ----------------------- | ------------------------------------- | | toDataURL(type?) | Returns QR code as data URL | | download(filename?) | Downloads QR code as PNG image |

Error Correction Levels

| Level | Recovery Capacity | | ----- | ----------------- | | L | ~7% | | M | ~15% | | Q | ~25% | | H | ~30% |

Higher levels allow more damage/obstruction tolerance but result in denser QR codes.

Examples

Basic

<qr-code data="Hello World"></qr-code>

Custom Size

<qr-code data="Small QR" size="100"></qr-code>
<qr-code data="Large QR" size="400"></qr-code>

Custom Colors

<qr-code
  data="Styled QR"
  color="#3b82f6"
  background="#eff6ff">
</qr-code>

Dark Mode

<qr-code
  data="Dark Mode"
  color="#f8fafc"
  background="#1e293b">
</qr-code>

High Error Correction

<qr-code
  data="Resilient QR"
  error-correction="H">
</qr-code>

URL Encoding

<qr-code data="https://github.com/manufosela"></qr-code>

WiFi QR Code

<qr-code data="WIFI:T:WPA;S:NetworkName;P:password123;;"></qr-code>

Email QR Code

<qr-code data="mailto:[email protected]"></qr-code>

Phone QR Code

<qr-code data="tel:+1234567890"></qr-code>

Download QR Code

const qr = document.querySelector('qr-code');

// Download as PNG
qr.download('my-qrcode.png');

// Get as data URL
const dataUrl = qr.toDataURL();
console.log(dataUrl);

// Get as JPEG
const jpegUrl = qr.toDataURL('image/jpeg');

CSS Custom Properties

| Property | Default | Description | | ----------- | --------- | --------------------- | | --qr-size | 200px | QR code container size| | --qr-fg | #000 | Foreground color | | --qr-bg | #fff | Background color |

Styling Example

qr-code {
  --qr-size: 250px;
}

vCard Example

<qr-code data="BEGIN:VCARD
VERSION:3.0
N:Doe;John
FN:John Doe
ORG:Company Name
TEL:+1234567890
EMAIL:[email protected]
END:VCARD"></qr-code>

Compared to Original

| Feature | @nickmitchko/qr-code | @manufosela/qr-code | | ------- | -------------------- | ------------------- | | Lit version | Lit 2.x | Lit 3.x | | Dependencies | qrcode-generator | None (built-in) | | TypeScript | No | No | | Tests | No | Yes | | CSS Properties | Limited | Full theming | | Download | No | Yes | | Error Correction | Limited | All levels |

License

Apache-2.0