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

inspect-react

v0.1.1

Published

Drop-in Figma-Dev-Mode-style inspect panel for React prototypes. Click any element to see its component, props, source location, layout, and styles.

Readme

inspect-react

Drop-in Figma-Dev-Mode-style inspect panel for React prototypes.

Click any element in your deployed prototype to see its component identity, props, source location, layout box, Tailwind classes, and computed styles — automatically, with zero manual documentation.

Install

npx inspect-react@latest init

The CLI detects your Next.js App Router project and inserts a <Script> tag in your root layout. It loads on your deployed prototype as well as in local dev — that's the point, since inspect-react is a handoff tool for deployed prototypes. Note that the panel exposes source paths, component names, and prop values to anyone who loads the page, so keep it to internal/shared prototypes rather than public production builds.

How selection works

Inspect React uses Figma's "enter container" model:

  • First click on an element inside a React component selects the enclosing component (e.g. clicking the avatar inside <UserCard> selects UserCard).
  • Subsequent clicks within the selected component drill down into DOM children.
  • Clicking outside the current component re-enters whichever component the new target lives in.
  • Esc clears selection completely.

What's in the panel

  1. Component identity — name, ancestry breadcrumb, props (with values)
  2. Source location — file path + line number, click to copy
  3. Layout box — Figma-style margin/border/padding/content diagram
  4. Tailwind classes — applied classes with custom token names resolved
  5. Computed styles — typography, colors, radii, shadows (curated, not everything)

Status

v0 — Next.js App Router + Tailwind v4 only. Pages Router, Vite, and a plugin system come later.

Development

Working on inspect-react itself:

git clone https://github.com/lavinejames/inspect-react
cd inspect-react
npm install
npm run dev          # rebuilds dist/ on change (runtime + CLI)

To test changes against a real prototype, serve the local bundle and point a prototype at it.

First, serve dist/ in another terminal in this repo:

npx serve dist -p 5180

Then wire the prototype to that local bundle. Don't use npx inspect-react@latest for this — the package may not be published, and even when it is, npx would fetch the published version instead of your local build. Instead, either run the locally-built CLI directly from your prototype repo:

# in your prototype repo (adjust the path to this repo)
node ../inspect-react/dist/cli.js init --src http://localhost:5180/runtime.iife.js

…or skip the CLI entirely and add the dev-only <Script> tag yourself, just inside <body> in your root layout:

{/* inspect-react (dev only) */}
{process.env.NODE_ENV === "development" && (
  <Script src="http://localhost:5180/runtime.iife.js" strategy="afterInteractive" />
)}

The --src flag (and the src above) overrides the default CDN URL so the prototype loads your local build. The port must match the serve port above (5180) — not Vite's 5173. Reload the prototype to pick up new builds.

Other scripts:

  • npm run typecheck — TS check without emit
  • npm run build — production build (CSS + ESM + IIFE + types)
  • npm run dev:css — watch Tailwind input only

License

MIT