npmreact-grep

react-grep

Hold to see React component names + file:line overlaid on any element.

Zero dependencies. Works with any React app in development mode.

Try it — hold and hover anywhere on this page
$ npm install react-grep
+hover

Inspect

See component names and source file locations overlaid on any element.

Shift

Toggle Source

Switch between the component definition and the call site.

Shift+Click

Copy Path

Copy file:line to your clipboard instantly.

Usage

ESM Import

import "react-grep";

The inspector activates automatically on import.

Script Tag

<script src="https://unpkg.com/react-grep/dist/index.global.js"></script>

Manual Control

import { init, destroy } from "react-grep";

init();    // start the inspector
destroy(); // stop and clean up