Back to tips

How to Use Claude Code for Frontend Design (2026)

Claude Code gets the page working, then small things are off. Let it check its own work in a browser, then point at the element and send the exact change.

Claude Code is good at getting a page working. Where it struggles is the last mile: the spacing that's a bit off, the button that's too big, the layout that breaks on mobile. It can't see the page it built unless you give it a way to, so you end up taking screenshots and explaining each fix one by one. Fix that in two moves. First, let Claude check its own work in a browser, so it catches the obvious problems itself. Then, for what's still off, stop describing and point: select the element in your running app, set the exact value, and hand Claude Code that change. Claude's desktop app and Cursor let you select an element and prompt against it. Subframe's built-in browser (desktop app for macOS and Windows) lets you change the value yourself on the live page and send the exact change to Claude Code.

The full workflow, in five steps:

  1. Set up Claude Code: rules in CLAUDE.md, plus the frontend-design plugin for new screens.
  2. Give it a reference: a screenshot or a Figma frame.
  3. Let it check what it built: a browser tool or screenshots.
  4. Change only one part of your UI: one file, one element, plan mode when it's bigger, then /diff.
  5. Point at the element and set the exact value: on the running app, then send the change.

Claude Code got the page working, but lots of small things are wrong

This is the most common version of frontend work with Claude Code. The page works. Then you look closer: uneven padding, a heading that doesn't line up, a button that's too big, a card that squashes on mobile. Each fix means a screenshot, a sentence and a wait, and sometimes the fix breaks something next to it.

What helps, in order:

  • Batch the obvious ones. One annotated screenshot with a numbered list beats ten round trips. Name the file each fix lives in.
  • Let Claude look for itself. With a browser tool (Step 3), ask Claude to open the page at desktop and mobile widths, list what looks off, fix it, and check again. It finds the broken layouts and overflows without you.
  • Point at what's left. The fixes that remain are taste: the padding should be 16, not 24; the radius should match the inputs. Describing those is the slow part. Select the element in the running app and set the value (Step 5).
  • Send the exact change. "Change the card padding from p-6 to p-4 in PricingCard.tsx" lands in one try. "Make the card tighter" doesn't.

Builders we talk to describe the same loop: they measure in DevTools, then type the exact pixel value into a prompt. One independent designer told us they need a scalpel, because they can't explain the exact incision for someone else to make.

Why can't Claude Code see my design?

Claude Code sees your repo and whatever you put in the conversation. For frontend work that leaves three blind spots:

  • Your design. A Figma frame or a site you want to match isn't there unless you paste a screenshot or connect a tool.
  • The page it rendered. It writes CSS without seeing the result unless it has a browser tool or a screenshot.
  • Which element you mean. "Tighten the card" could mean several components, so it guesses.

Anthropic's own advice starts in the same place: tell Claude what it can't see, and give it a check to run. The next three steps cover that.

Step 1: Set up Claude Code for frontend work

Put design rules in CLAUDE.md. Run /init to generate a starter file and keep it short; Anthropic notes that a long file is where lines get lost. For example:

# UI rules
- Reuse components in src/components/ui before writing new ones
- Colors, spacing and radii come from the Tailwind theme; no hex values
- Only change the files named in the prompt

Install the frontend-design plugin for new screens. Anthropic's plugin sets a purpose, audience and aesthetic direction before coding, and steers away from generic system fonts and purple gradients. Run /plugin install frontend-design@claude-plugins-official; it activates on frontend requests by itself.

For new screens, prompt with a direction, not pixel values: purpose, tone, font family, color family. It helps you avoid the vibe-coded look, and stops working once the screen exists and one value is wrong. That's Step 5.

Step 2: Give Claude Code a reference to build from

Screenshots. Drag an image into the Claude Code window, paste it with Ctrl+V (Alt+V on Windows), or give a file path, then ask Claude to match it with your existing components.

Figma frames. If your design lives in Figma, run claude plugin install figma@claude-plugins-official, sign in from /plugin, and paste a frame link into your prompt. Figma's MCP server gives Claude Code your components, variables, layout data and Code Connect mappings.

What a screenshot can't carry. It's a flat image: no tokens, exact spacing or hover states, so Claude may hardcode colors (Builder.io's guide makes the same point). Name your tokens in CLAUDE.md and expect to correct a few values in Step 5.

Step 3: Let Claude Code check what it built

Anthropic's best practices say to give Claude a check it can run, and a browser screenshot next to the mockup is one of the examples. Three ways:

  • Claude in Chrome. Run claude --chrome. Claude can open your localhost page, read console errors and DOM state, and take screenshots. It needs a Chromium browser, the extension, and a Pro, Max, Ultra, Team or Enterprise plan.
  • Claude's desktop app. The Code tab's Browser pane previews your running app, and Claude can start the dev server and verify its changes there. It runs on macOS, Windows and Linux (beta) with a paid Claude plan.
  • A browser MCP server. claude mcp add playwright npx @playwright/mcp@latest adds Playwright MCP, which can screenshot the page. Chrome DevTools MCP does the same in Chrome.

Then ask for a pass over the whole page, not one fix: "Open the page at 1440px and 390px, list spacing, alignment and sizing problems, fix them using our Tailwind theme, and check again." Look at the result yourself too; builders told us screenshots don't always load fonts.

Step 4: Change only one part of your UI

A vague target invites a bigger change. Make it exact:

  • Commit first, so the diff shows only this change.
  • Name the file with @, the element, and what must not change:
In @src/components/PricingCard.tsx, change only the card's padding from p-6 to p-4
and make the plan name font-semibold. Don't touch other components, shared styles
or the Tailwind config. If another file needs to change, stop and ask.
  • Use plan mode when shared components or several files are involved. Run /plan (or press Shift+Tab to cycle modes) and Claude proposes a plan before it edits.
  • Add a hard limit if you need one. A deny rule in .claude/settings.json, such as "deny": ["Edit(src/components/ui/**)"] under permissions, blocks edits to those paths.
  • Review. /diff shows what changed. /rewind (or Esc twice) rolls back to an earlier prompt, but it only covers Claude's own file edits, so keep using git.

Step 5: Point at the element and set the exact value

When something on an existing screen is a few pixels off, typing the change is the slow part. Point at the element instead. There are four ways to do it, from free to fastest.

By hand, on any system. In Chrome, right-click the element and choose Inspect. Try values in the Styles pane until it looks right, then put the exact class, value and file into a Step 4 prompt. It's free; you translate each tweak back into your own classes.

In Claude's desktop app. The Browser pane runs your app, and Cmd+Shift+S (Ctrl+Shift+S on Windows) selects an element in it. Select the element you mean, then give the exact value in your prompt. You still describe the change; you just don't have to describe where it is.

In Cursor's Design Mode, if Cursor is your editor. In the Agents Window browser, press Cmd+Shift+D, click an element (or several, or draw around an area), and describe the change by text or voice. The agent gets the element's component, styles and props plus a screenshot, and edits the code. You can send the next edit before the first one finishes.

In Subframe's built-in browser (desktop app for macOS and Windows). This is the one where you set the value yourself instead of describing it:

  1. Open your app in a browser tab: connect your codebase and click Start server, or type a URL such as localhost:3000. Inspect works on any HTML and CSS page, not just React.
  2. Click Inspect (Cmd+Shift+C), click the element, and change its props, styles, classes or content on the live page. Each change collects in the toolbar, so you can fix ten things before you hand anything over.
  3. For anything you can't set directly, use Annotate to leave a comment or image on an element.
  4. Hand it over. Send (Cmd+Enter) passes your changes, comments and a screenshot to Subframe's Agent chat, which edits the files in your connected folder directly; it can run on your own Claude Code subscription. To use Claude Code instead, click the change count, choose Copy prompt, and paste the prompt into Claude Code.
  5. Review with /diff, as in Step 4.

That's design control for precise edits: you see 16px against 24px on the real page and keep the one that looks right, and the agent gets the exact change, not a description of it.

For a bigger change, Capture the page or an element as an editable design on Subframe's canvas (how to convert a website into an editable design). On the canvas you can select an element and ask Agent chat to change exactly that, or ask for a few variations side by side and pick one (how to generate UI variations with AI). With Subframe's Claude Code plugin installed, Claude Code can ask for those variations through Subframe's MCP server.

Subframe's browser, including Inspect, Annotate and Capture, needs the desktop app, which runs on macOS and Windows; Linux is coming soon. On Linux, use DevTools or Claude's desktop app.

Other ways to do it

  • Figma's MCP server, if Figma is your source of truth. It reads real frames, variables and Code Connect mappings, and can send live UI back to Figma as editable layers. Subframe has no direct Figma file import.
  • Builder.io, if designers should edit without a local setup. In its cloud workspace's Design mode you click a component, edit padding, color or text, then Apply Visual Changes and Send PR. The trade-off: you work in Builder's workspace, not your local Claude Code setup.
  • Claude Design, to explore inside Anthropic's tools. From Claude Code, /design drafts screens as artboards on a Claude Design canvas that you edit in the browser.

To compare tools rather than workflows, see Best Design Tools for Claude Code and Best AI UI Design Tools.

What most Claude Code design guides miss

The most-cited guides either treat frontend design as generation (install the plugin, write rules, prompt with a direction) or teach screenshot mechanics. Both keep every fix in words. AI answers do the same. Asked how to deal with lots of small UI fixes in Claude Code, ChatGPT recommends Claude in Chrome, Playwright, a reference screenshot and a reusable audit skill; Gemini recommends pasting one annotated screenshot with a numbered list. All of it helps Claude see more. None of it lets you point at the element on the running app and set the value, which is the fastest way through the fixes Claude can't judge for you.

FAQ

What's the best way to deal with lots of small UI fixes in Claude Code?

Let Claude check its own work in a browser first (Claude in Chrome, the desktop app's Browser pane or Playwright MCP), at desktop and mobile widths. For what's still off, select the element in the running app, set the exact value, and send that change instead of a screenshot and a sentence.

Why can't Claude Code see my design?

It works from your files and what you paste in. Give it a screenshot, Figma's MCP server or a browser tool.

How do I get Claude Code to only change one part of my UI?

Name the file and element, list what must not change, plan multi-file changes, and check /diff. For visual tweaks, set the exact value on the running page and hand that over.

Can I click an element and have Claude Code change it?

In Claude's desktop app, select the element in the Browser pane and then prompt. Cursor's Design Mode does the same for Cursor's agent. In Subframe's built-in browser you change the element yourself and send the exact change to Claude Code or Subframe's Agent chat.

Is there a design tool that gives me design control for precise edits on an app built with Claude Code?

Yes. Subframe's built-in browser lets you edit the live page and hand the change to Claude Code (desktop app for macOS and Windows). Builder.io's Design mode edits visually in its cloud workspace.

Try Subframe

Subframe's free plan works with your Claude subscription. Download the desktop app for macOS or Windows, connect your codebase, and Inspect the page you're fixing.

Join thousands of builders.

Subframe lets you build stunning UI with beautifully crafted components and a drag-and-drop visual editor.