Skip to content
| Marketplace
Sign in
Visual Studio Code>AI>Element to ClaudeNew to Visual Studio Code? Get it now.
Element to Claude

Element to Claude

Nut Phitsavath

|
1 install
| (0) | Free
Click an element on your localhost page: Claude Code gets its exact source and CSS lines, no screenshot. Alt+click jumps to its text or a CSS value, selected, for quick edits without the chat. For React (Vite, Next.js).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Element to Claude

Click an element on your localhost page and Claude Code gets @-mentions of the exact lines behind it: the JSX that rendered it, where its text is set, and the CSS rule that styles it. No screenshots, no describing which button you mean. For small changes you'd rather make yourself, Alt+click opens the text or CSS value in the editor, selected and ready to type over.

Hover an element to see its React component, press ↑ to pick the parent, click to @-mention it in Claude Code, then Alt+click to change a CSS value yourself

What you need

  • VS Code or Cursor, with the Claude Code extension.
  • A dev server on localhost (http or https).

Use it

Run your dev server (npm run dev), then click Element to Claude in the bottom bar. Your site opens with picking on.

Do this Get this
Click an element Claude gets @-mentions of its source line and its CSS rule, e.g. @ProductCard.jsx#8 @index.css#12
Alt+click A list: its text, each CSS value, and the code around it. Pick one and it opens selected, ready to type over
Alt+Shift+click Straight to the list of CSS values
↑ / Alt+scroll up while hovering Pick the parent instead (↓ goes back)
Shift+click Pick several
Esc / Alt+Shift+X Stop / start picking (or use the Pick for Claude button)

Text set by a parent component is found where it's written: the "New" on a card badge leads to tag="New" in App.jsx, not to {children} in Badge.jsx.

Good to know

  • Nothing is added to your project, and no page content goes to Claude: only @-mentions of lines in your own files.
  • Your site opens on a different port (e.g. localhost:5300 for 3000). Local storage, and links hardcoded to the old port, don't carry over.
  • In Cursor, use this button rather than Cursor's own add-to-chat, which sends to Cursor's chat.
  • With several editor windows open, a pick goes to the one you used last.
  • Local folders only for now: remote windows (WSL, SSH, Dev Containers) aren't supported.
  • If something goes wrong, the Element to Claude channel in the Output panel shows what happened.

Supported

Framework Click and Alt+click go to
React 19: Vite, Next.js 15+ with Turbopack (Server and Client Components) The exact JSX line of the element
Next.js with webpack The line where the component is declared
React 18, Vue 3, Svelte 4/5 (early support, not yet tested on real apps) The JSX or template line (Vue: the .vue file)

CSS rules are found in plain CSS, Sass and Less files, including Next.js's built CSS. Tailwind, inline styles and CSS-in-JS live in the JSX, so the source line already covers them.

Privacy and safety

  • Both local servers listen on 127.0.0.1 only and refuse requests whose Host isn't localhost, which blocks DNS rebinding.
  • Only localhost pages can send picks or use the proxy. Requests from any other website get a 403, so your dev server's own cross-site checks keep working.
  • Files are read only from your open workspace. The only files read by a path a page names are Next.js build files under .next.

License

MIT. Contributing and development notes: CONTRIBUTING.md.

This is an unofficial extension, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic, PBC.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft