
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-grab-visbug-copy
Advanced tools
Track visual edits made with VisBug and copy them with file paths for AI agents
Track visual edits made with VisBug and copy them with file paths to give to AI agents.
This tool combines VisBug's visual editing capabilities with React Grab's selection system to help you:
npm install react-grab-visbug-copy
# or
pnpm add react-grab-visbug-copy
# Clone or download this repository
git clone https://github.com/jacksonkasi1/react-grab-visbug-copy.git
Add this to your app/layout.tsx:
import { Script } from "next/script";
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<head>
{process.env.NODE_ENV === "development" && (
<>
<Script
src="https://unpkg.com/react-grab/dist/index.global.js"
strategy="beforeInteractive"
/>
<Script
src="https://unpkg.com/react-grab-visbug-copy/dist/client/standalone.js"
strategy="lazyOnload"
/>
</>
)}
</head>
<body>{children}</body>
</html>
);
}
Add this to your pages/_document.tsx:
import { Html, Head, Main, NextScript } from "next/document";
import Script from "next/script";
export default function Document() {
return (
<Html lang="en">
<Head>
{process.env.NODE_ENV === "development" && (
<>
<Script
src="https://unpkg.com/react-grab/dist/index.global.js"
strategy="beforeInteractive"
/>
<Script
src="https://unpkg.com/react-grab-visbug-copy/dist/client/standalone.js"
strategy="lazyOnload"
/>
</>
)}
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
);
}
Add this to your index.html in the <head>:
<script type="module">
if (import.meta.env.DEV) {
import("react-grab");
import("react-grab-visbug-copy");
}
</script>
Or import in your main entry file:
// src/main.tsx or src/main.jsx
if (process.env.NODE_ENV === "development") {
import("react-grab");
import("react-grab-visbug-copy");
}
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
const root = ReactDOM.createRoot(document.getElementById("root")!);
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
);
Add to your webpack config or HTML template:
<script src="https://unpkg.com/react-grab/dist/index.global.js"></script>
<script src="https://unpkg.com/react-grab-visbug-copy/dist/client/standalone.js"></script>
Or use dynamic import in your entry file:
if (process.env.NODE_ENV === "development") {
import("react-grab");
import("react-grab-visbug-copy");
}
<!doctype html>
<html lang="en">
<head>
<script src="https://unpkg.com/react-grab/dist/index.global.js"></script>
<script src="https://unpkg.com/react-grab-visbug-copy/dist/client/standalone.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
Try these interactive examples to see VisBug Copy in action:
| Example | Description | Demo |
|---|---|---|
| 01-basic-button.html | Simple button with hover effects | Click the button, edit styles with VisBug |
| 02-card-component.html | Card UI components | Edit cards with images and text |
| 03-navigation-bar.html | Navbar and hero section | Edit navigation and CTA buttons |
| 04-form-elements.html | Form inputs and buttons | Edit form styling and focus states |
# Clone the repository
git clone https://github.com/jacksonkasi1/react-grab-visbug-copy.git
# Open any example in your browser
open examples/web/01-basic-button.html
# or
cd examples/web && python3 -m http.server 8080
# Then visit http://localhost:8080/01-basic-button.html
Cmd+C (Mac) or Ctrl+C (Windows) to activate React Grab overlayT to track the element's original stylesC to copy the changesWhen you copy changes, you'll get output like:
Track which file contains this component
• background-color: rgb(102, 126, 234) → rgb(214, 135, 92) • font-size: 16px → 24px
button.btn {
background-color: rgb(214, 135, 92);
font-size: 24px;
}
<button class="btn" style="background-color: rgb(214, 135, 92); font-size: 24px;">Click me</button>
Tracked with React Grab VisBug Copy
Copy the output and paste to your AI:
I changed the button background color to rgb(214, 135, 92) and increased the font size to 24px. Please apply these changes to the actual codebase.
Here are the changes:
[PASTE THE OUTPUT FROM VISBUG COPY]
| Shortcut | Action |
|---|---|
Cmd/Ctrl + C | Activate React Grab |
T | Track selected element |
C | Copy visual changes |
X | Clear tracked changes |
// Get the global API
const api = window.__REACT_GRAB_VISBUG_COPY__;
// Track an element manually
api.track(element);
// Get all tracked elements
const elements = api.getTrackedElements();
// Clear all tracked changes
api.clear();
react-grab-visbug-copy/
├── src/
│ └── client/
│ └── standalone.ts # Main source code
├── dist/
│ └── client/
│ ├── standalone.js # ES module build
│ └── standalone.cjs # CommonJS build
├── examples/
│ └── web/
│ └── with-visbug-extension.html # Demo page
├── package.json
└── README.md
Include visual change diffs in PR descriptions to show what was modified.
Describe visual changes to AI and let it apply them to your codebase.
Track visual changes during design iteration and document them.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE for details.
⭐ Star this repo if it helps you!
FAQs
Track visual edits made with VisBug and copy them with file paths for AI agents
We found that react-grab-visbug-copy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.