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

ngx-qrcode-generator

v22.0.0

Published

A highly customizable, reactive Angular component for generating QR codes dynamically using QRious. Fully compatible with Angular 22 standalone features and signals.

Readme

NgxQrcodeGenerator

npm version license angular compatibility

A highly customizable, reactive Angular component for generating QR codes dynamically using the QRious library. Fully modernized to take advantage of Angular 22 standalone architecture, signal inputs, and property initializer injections.


Features

  • Angular 22 Native: Built on the absolute latest major framework version.
  • 🚦 Signal-Based Inputs: Uses Angular's modern input() signals and reactive effect() triggers for automatic updates and improved change detection.
  • 🏗️ Default Standalone: Designed as a standalone component, ready to be imported directly into other standalone components or classic NgModule architectures.
  • 🎨 Rich Customization: Fully customize background, foreground, padding, size, opacity, and error correction levels.
  • 🖨️ Dual Rendering Modes: Seamlessly render to either a native HTML <canvas> element or a standard <img> element.
  • 🔌 Lightweight & Clean: Built using the preferred inject() function with clean lifecycle-free reactive triggers.

Installation

Install the library using npm:

npm install ngx-qrcode-generator

Usage

1. Import the Component

For Standalone Components (Angular 19+ Default)

Import NgxQrcodeGeneratorComponent directly into your component's imports array:

import { Component } from '@angular/core';
import { NgxQrcodeGeneratorComponent } from 'ngx-qrcode-generator';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [NgxQrcodeGeneratorComponent],
  templateUrl: './app.component.html'
})
export class AppComponent { }

For NgModule Compatibility (Traditional Apps)

If you are using modules, import it into your module's imports array:

import { NgModule } from '@angular/core';
import { NgxQrcodeGeneratorComponent } from 'ngx-qrcode-generator';

@NgModule({
  imports: [NgxQrcodeGeneratorComponent],
  // ...
})
export class YourModule { }

2. Add to Template

<ngx-qrcode-generator
  [value]="'https://github.com/mustafaer/ngx-qrcode-generator'"
  [size]="200"
  [foreground]="'#1e3a8a'"
  [background]="'#f8fafc'"
  [level]="'H'"
></ngx-qrcode-generator>

API Reference

Input Properties

| Property | Type | Default | Description | | :--- | :--- | :--- | :--- | | value | string | '' | The text, URL, or data to encode inside the QR code. | | size | number | 100 | The width and height of the QR code element in pixels. | | canvas | boolean | false | If true, renders as a <canvas> element. If false, renders as an <img> element. | | background | string | 'white' | Background color of the QR code. | | backgroundAlpha | number | 1.0 | Opacity of the background color (0.0 to 1.0). | | foreground | string | 'black' | Color of the QR code blocks (foreground). | | foregroundAlpha | number | 1.0 | Opacity of the foreground blocks (0.0 to 1.0). | | level | 'L' \| 'M' \| 'Q' \| 'H' | 'L' | Error correction level (L low, M medium, Q quartile, H high). | | mime | string | 'image/png' | The image MIME type (when rendering in image mode). | | padding | number \| null | null | The padding around the QR code in pixels. Use null for default padding. |


Styling & Performance

The component dynamically re-renders when any of its input signals change, ensuring optimal rendering cycles without polluting the global change detection run. The generated elements inherit direct style customizability from their surrounding layout.


License

This project is licensed under the MIT License - see the LICENSE file for details.