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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@vkhangstack/veloqr

v1.2.5

Published

A high-performance React QR code and MRZ (passport/ID card) scanner library using WebAssembly, Rust

Readme

VeloQR

A high-performance React library for scanning QR codes using WebAssembly and Rust. Provides blazing-fast QR code detection with both live camera scanning and image file scanning capabilities.

Features

  • High Performance: Powered by WebAssembly compiled from Rust for near-native speed
  • 📷 Live Camera Scanning: Real-time QR code detection from webcam or device camera
  • 🖼️ Image File Scanning: Scan QR codes from uploaded image files
  • 🔍 Multiple QR Detection: Detect and decode multiple QR codes in a single frame
  • 🎨 Custom Styling: Fully customizable UI with styling props and overlay options
  • 📘 TypeScript Support: Full TypeScript definitions included
  • 📦 Lightweight: Optimized WASM binary for minimal bundle size

Installation

npm install @vkhangstack/veloqr

Quick Start

Live Camera Scanning

import React from 'react';
import { QRScanner, QRCodeResult } from '@vkhangstack/veloqr';

function App() {
  const handleScan = (results: QRCodeResult[]) => {
    console.log('QR Codes detected:', results);
    results.forEach((result) => {
      console.log('Data:', result.data);
    });
  };

  const handleError = (error: Error) => {
    console.error('Scanner error:', error);
  };

  return (
    <QRScanner
      onScan={handleScan}
      onError={handleError}
      scanDelay={500}
      showOverlay={true}
      highlightColor="#667eea"
    />
  );
}

export default App;

Image File Scanning

import React from 'react';
import { QRImageScanner, QRCodeResult } from '@vkhangstack/veloqr';

function App() {
  const handleScan = (results: QRCodeResult[]) => {
    console.log('QR Codes detected:', results);
  };

  return (
    <QRImageScanner
      onScan={handleScan}
      acceptedFormats={['image/jpeg', 'image/png', 'image/webp']}
      showPreview={true}
    />
  );
}

export default App;

API Reference

QRScanner Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | onScan | (results: QRCodeResult[]) => void | - | Callback when QR codes are detected | | onError | (error: Error) => void | - | Callback when an error occurs | | scanDelay | number | 500 | Delay between scans in milliseconds | | videoConstraints | MediaTrackConstraints | {} | Video constraints for camera | | className | string | '' | CSS class name | | showOverlay | boolean | true | Show scanning overlay |

QRImageScanner Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | onScan | (results: QRCodeResult[]) => void | - | Callback when QR codes are detected | | onError | (error: Error) => void | - | Callback when an error occurs | | acceptedFormats | string[] | ['image/*'] | Accepted image formats | | showPreview | boolean | true | Show image preview | | className | string | '' | CSS class name |

QRCodeResult

interface QRCodeResult {
  data: string;        // Decoded QR code data
  version: number;     // QR code version
  bounds?: number[][]; // Bounding box coordinates
}

Browser Support

  • Chrome/Edge 90+
  • Firefox 88+
  • Safari 15+
  • Mobile browsers with camera access

Technical Support

  • React 16.8+
  • Node.js 14+

Performance Tips

  1. Adjust scan delay: Increase scanDelay for better performance on low-end devices
  2. Use appropriate resolution: Don't request 4K video if not needed
  3. Safari optimization: The library automatically optimizes for Safari/iOS

Links

Donation

This project is open source and free to use. If you find it useful, consider supporting its development: https://www.buymeacoffee.com/vkhangstack

License

MIT © vkhangstack