A Chrome extension that helps you capture and organize React components using react-grab, making it easy to provide context to AI assistants like Claude.
- Auto-Capture Components: Automatically captures React component contexts when you copy them with
Ctrl+C(orCmd+Con Mac) - Side Panel Interface: Opens as a convenient Chrome side panel for easy access while browsing
- Component Organization: Store and manage multiple component contexts in one place
- Edit & Delete: Easily modify or remove saved components
- Instructions for Claude: Add custom instructions to send along with your component contexts
- One-Click Copy: Format and copy all components with instructions for seamless AI interaction
- Persistent Storage: Your components and instructions are saved between sessions
- Google Chrome browser
- A React application with react-grab installed
-
Clone this repository
git clone https://github.com/svsairevanth12/PreciseUI.git
-
Open Chrome Extensions
- Navigate to
chrome://extensions/in Chrome - Enable Developer mode using the toggle in the top right corner
- Navigate to
-
Load the Extension
- Click Load unpacked
- Select the
react-grab-helper-extensionfolder from the cloned repository
-
Pin the Extension (optional)
- Click the puzzle piece icon in Chrome toolbar
- Pin "Precise UI" for easy access
-
Set up react-grab in your React application (see react-grab documentation)
-
Open your React app in Chrome
-
Hover over any element in your app and press
Ctrl+C(orCmd+Con Mac)- The extension will automatically detect react-grab contexts
-
The side panel opens automatically when a component is captured
- You can also click the Precise UI icon to open the side panel
- Add Component Manually: Click "Add Component" or press
Ctrl+N - Expand/Collapse: Click on a component card to expand and view full context
- Edit: Click the pencil icon to modify a component's name or context
- Copy Individual: Click the copy icon to copy just one component's context
- Delete: Click the trash icon to remove a component
- Add your captured components
- In the "Instructions for Claude" textarea, describe what you want to do with the components
- Click Copy All to copy everything formatted for Claude
- Paste into Claude and get AI-powered assistance!
| Shortcut | Action |
|---|---|
Ctrl/Cmd + N |
Add new component |
Ctrl/Cmd + Enter |
Copy all components and instructions |
Escape |
Close modal |
Ctrl + Enter (in modal) |
Save component |
PreciseUI/
├── README.md # This file
└── react-grab-helper-extension/ # Chrome extension
├── manifest.json # Extension manifest (v3)
├── background.js # Service worker for side panel handling
├── content.js # Content script for detecting react-grab
├── popup.html # Side panel HTML
├── popup.js # Side panel logic
├── styles.css # Extension styling
├── icon16.png # Extension icons
├── icon48.png
├── icon128.png
└── README.md # Extension-specific readme
- Content Script (
content.js) runs on all web pages and listens for copy events - When a react-grab context is detected (contains component file paths like
.tsx,.jsx), it notifies the background script - Background Script (
background.js) opens the side panel and passes the captured context - Side Panel (
popup.js) displays and manages all captured components - Components are stored in Chrome's local storage for persistence
- Modify the extension files in
react-grab-helper-extension/ - Go to
chrome://extensions/ - Click the refresh icon on the Precise UI extension card
- Test your changes
Icons can be regenerated using the included generate-icons.py script or by opening generate-icons.html in a browser.
This project is open source. See the repository for license details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you encounter any issues or have questions, please open an issue.