vite-plugin-react-feedback
v0.1.0
Published
Visual annotation tool for React + Vite — click any component, write feedback, copy structured output for LLMs
Downloads
103
Maintainers
Readme
vite-plugin-react-feedback
Visual annotation tool for React + Vite. Click any component in your running app, write what you want changed, then copy all annotations as structured text — ready to paste into Claude Code or any LLM.
Install
npm install vite-plugin-react-feedbackSetup
Add to your vite.config.ts:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import reactFeedback from 'vite-plugin-react-feedback'
export default defineConfig({
plugins: [
react(),
reactFeedback(), // dev only — automatically disabled in production
],
})Usage
- Run
npm run dev— your app works as normal - Press Ctrl+Shift+X to activate feedback mode
- Hover over elements — component names and hierarchy are shown
- Click an element — a text field appears
- Write your feedback, press Enter
- Repeat for as many elements as you want
- Click the Feedback indicator (bottom right) to see all annotations
- Click Copy All — structured text lands in your clipboard
- Paste into Claude Code / ChatGPT / any LLM
- Press Ctrl+Shift+X or Escape to exit
Options
reactFeedback({
shortcut: 'ctrl+shift+x', // customize the toggle shortcut
maxAncestors: 3, // max parent components shown in chain
})Output Format
## UI Feedback (2 Annotations)
1. Card > Button (src/components/Card.tsx:28)
→ "Change color to primary blue"
2. Navbar (src/components/Navbar.tsx:15)
→ "Logo should be left-aligned, not centered"How It Works
- Injects a lightweight overlay script via Vite's
transformIndexHtml(dev only) - Uses React's internal Fiber tree to resolve component names and source locations
- All UI lives in Shadow DOM — zero interference with your app's styles
- No changes to your application code required
