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

qrlinkgen

v1.0.0

Published

A lightweight floating QR code React component for mobile testing — scan to open your dev server URL on any device instantly

Readme

qrlinkgen

A lightweight floating QR code React component for mobile testing — scan to open your dev server URL on any device instantly. No manual URL typing, no copy-pasting IP addresses.

npm version npm downloads

Why qrlinkgen?

Testing on real mobile devices during development means finding your machine's local IP, typing it on your phone, and doing it again every time the port changes. qrlinkgen eliminates that friction — just drop in one component and scan.

  • One line of code — add <DevQrCode /> and you're done
  • Auto-detects your dev URL — picks up protocol, hostname, and port from window.location
  • Custom URL support — override with any URL via the customUrl prop
  • Zero CSS dependencies — all styles are inline, no Tailwind / CSS-in-JS / stylesheets required
  • Tiny footprint — minimal bundle impact for a dev-time utility
  • Fully typed — written in TypeScript with exported types
  • React 18 & 19 — works with both versions
  • Framework agnostic — works with Vite, Next.js, Create React App, Remix, and any React setup

Installation

npm install qrlinkgen
yarn add qrlinkgen
pnpm add qrlinkgen

Peer dependency: Requires react >= 18 and react-dom >= 18 (already in your project).

Quick Start

import { DevQrCode } from "qrlinkgen"

function App() {
  return (
    <div>
      <h1>My App</h1>
      <DevQrCode />
    </div>
  )
}

A small QR button appears in the top-left corner. Click it to reveal the QR code. Scan it with your phone — done.

Usage

Auto-detected URL (default)

The component reads window.location and generates a QR code for the current page URL. This is the most common use case when you're running a local dev server and want to open it on a mobile device connected to the same network.

<DevQrCode />

Custom URL

Pass a specific URL to encode:

<DevQrCode customUrl="https://192.168.1.10:3000/dashboard" />

Development-only rendering

Wrap with an environment check so it never ships to production:

{process.env.NODE_ENV === "development" && <DevQrCode />}

Next.js

"use client"

import { DevQrCode } from "qrlinkgen"

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html>
      <body>
        {children}
        {process.env.NODE_ENV === "development" && <DevQrCode />}
      </body>
    </html>
  )
}

Vite

import { DevQrCode } from "qrlinkgen"

function App() {
  return (
    <>
      {/* your app */}
      {import.meta.env.DEV && <DevQrCode />}
    </>
  )
}

API

<DevQrCode />

| Prop | Type | Default | Description | |------|------|---------|-------------| | customUrl | string \| undefined | — | URL to encode in the QR code. If omitted, the current page URL is auto-detected from window.location. |

Exported Types

import type { DevQRCodeProps } from "qrlinkgen"

How It Works

  1. A small dark QR button appears fixed in the top-left corner of the viewport (hidden on screens < 640px).
  2. Click it to expand a floating card showing the QR code and the encoded URL.
  3. Use the minimize button to collapse the card, or the close button to dismiss it entirely.
  4. Scan the QR code with any phone camera or QR scanner app to open the URL.

Browser Support

Works in all modern browsers (Chrome, Firefox, Safari, Edge). The responsive toggle uses window.matchMedia.

License

ISC

Contributing

Issues and pull requests are welcome.