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

@acolby/lenz

v0.0.6

Published

Data attribute overlay tool forReact Applications

Readme

Lenz

A visual debugging and annotation overlay for React apps.
Lenz lets you decorate elements in your app with data-lenz attributes and view them through an interactive overlay, helping with inspection, debugging, and collaboration.

✨ Features

  • Overlay to inspect all elements marked with data-lenz
  • Custom metadata support via data-lenz-* attributes
  • Breadcrumb navigation for selected elements
  • Pluggable UI for rendering metadata (Comp)
  • Keyboard shortcuts and custom close behavior

🚀 Installation

npm install @acolby/lenz
# or
yarn add @acolby/lenz

🧠 Usage

In your React app:

import { Lenz } from "@acolby/lenz";

function AppWrapper() {
  const [showLenz, setShowLenz] = useState(false);

  return (
    <>
      <Lenz
        show={showLenz}
        Comp={({ item }) => (
          <div className="border-2 border-blue-500 rounded-lg p-4 bg-white shadow-lg m-2 max-w-lg overflow-auto">
            <h3 className="text-lg font-semibold text-blue-700 mb-2">
              {"Whatever you want to render using the item of interest"}
            </h3>
          </div>
        )}
        onKeypress={(e) => {
          if (
            e.key === "Escape" ||
            e.key === "Delete" ||
            e.key === "Backspace"
          ) {
            setShowLenz(false);
          }
          if (e.ctrlKey && e.key === "l") {
            setShowLenz((prev) => !prev);
          }
        }}
        onCloseClicked={() => setShowLenz(false)}
      />

      <YourApp toggleLenzOverlay={() => setShowLenz((prev) => !prev)} />
    </>
  );
}

🏷️ Marking Elements

Use data-lenz to annotate elements:

<div
  data-lenz="ProductCard"
  data-lenz-owner="Aaron"
  data-lenz-type="UI"
/>

These attributes are detected by Lenz and shown in the overlay when active.

🧭 Breadcrumbs

When an item is selected, Lenz displays a breadcrumb trail in the top-left corner of the page, giving context about where you are in the DOM/data-lenz hierarchy.

🛠 Customization

You can supply a custom Comp to render info about the selected item. This can be anything from a debug inspector to a design system label.

⌨️ Default Shortcuts

  • Ctrl + L: Toggle Lenz overlay
  • Escape, Delete, Backspace: Close overlay

🧪 Development Status

Lenz is under active development and contributions are welcome! This tool is ideal for developers, designers, and PMs who want better visibility into the structure of a React app.

📄 License

MIT