Skip to content

Figma to website guide

How Do I Turn a Figma Design into React Code?

Figma has no built-in export to React. Dev Mode gives CSS, so the real routes are hand-building from Dev Mode, the Figma MCP server with a coding agent, Code Connect, or a third-party converter. Review the output of each.

Figment editorial teamPublished Updated

Publishing from Figma with Figment

The Figment plugin turns page frames in a Figma Design file into a hosted website.

Free planfigment.so address, Figment badge$0
Paid plansYour own domain, no badgeSee plans

Hosted publishing, not a code download.

Figma has no one-click "export to React" feature. There are four real routes, and each hands you a starting point that still needs review. You can build it by hand from Dev Mode's inspect panel. You can connect Figma's MCP server to a coding agent that writes React from your design context. You can use Code Connect so Dev Mode and the MCP server reference your own React component library. Or you can use a third-party converter built to output React.

Why is there no "Figma to React" button?

Dev Mode's code snippets stop at CSS and native-platform code. In the Inspect panel's Code section, the language dropdown offers three options: "CSS (Web)," "SwiftUI or UIKit (iOS)," and "Compose or XML (Android)" (Figma Learn, "Use code snippets in Dev Mode"). React is not one of them. Dev Mode gives a CSS box model (margin, border, padding, layout, typography) for the selection, not a React component. Figma frames snippets as implementation detail for a developer to work from, not a generated application.

How do I build it by hand from Dev Mode?

A developer selects an object in Dev Mode, reads its CSS snippet, layout data, typography and assigned variables, and writes the React component. This is the most manual route and the most durable. Dev Mode requires a paid Figma plan and a Full or Dev seat. The guide to Dev Mode covers plan and seat requirements.

Use this route when component structure, state and interaction logic matter more than matching every pixel automatically. A real React app with routing, data fetching and shared state usually needs a developer making those calls anyway, and Dev Mode keeps them from guessing at spacing and color values.

How do I use the Figma MCP server with a coding agent?

Connect an MCP-capable coding agent, link it to a frame, and prompt it for React. The MCP server exposes a Figma file's structure (components, variables, layout and, where set up, Code Connect mappings) to an agent over the Model Context Protocol, so the agent can "explore and implement designs quickly and accurately" instead of guessing from a screenshot (Figma Learn, "Guide to the Figma MCP server").

Figma documents two ways to run it: a remote server "available on all seats and plans" at https://mcp.figma.com/mcp, and a desktop server that needs "a Dev or Full seat" and runs through the Figma desktop app. You also need an MCP-capable client. Figma's list includes Claude Code, Cursor, VS Code, Windsurf, Codex and others, with different support for writing back to the canvas versus only reading it.

The workflow is link-based:

  1. Select a frame or layer in Figma and copy its link.
  2. Paste the link into your coding agent.
  3. Prompt it to generate code from that selection.

Figma describes the tools as letting you "generate code from selected frames" and "extract design context" (variables, components and layout data) into your editor. The framework and styling come from your agent and prompt, not a Figma default. Say that you want React and name your styling approach (Tailwind, CSS modules, styled-components or what your project uses).

This is an early, changing feature. Figma's guide says: "We're quickly improving how Figma supports AI agents. This will eventually be a usage-based paid feature, but is currently available for free during the beta period." Treat the output as a draft to review, like any AI-generated code.

What does Code Connect do?

Code Connect makes Figma point at React code you already have, instead of generating new code. Figma describes it as "a bridge between your codebase and Figma's Dev Mode, connecting components in your repositories directly to components in your design files." It also gives the MCP server "direct references to your actual code" (Figma Learn, "Code Connect"). It is "Available on the Organization and Enterprise plans" and "Requires a Full or Dev seat."

This is the route for a team that maintains a React design system, with real props, variants and states, and wants Dev Mode and any connected coding agent to reference that code instead of reconstructing an approximation. You set it up once per component, and later handoffs for that component show connected, accurate code.

Which third-party converters generate React?

Anima and Locofy are two examples, described from their own pages and not ranked.

  • Anima says "Turn Figma into clean code - React, HTML, Tailwind, and more," with React output framed as "efficient, readable, maintainable React code for individual components, entire screens, and full flows" (Anima, "Figma to Code"). Its guidance for better results is "use Auto Layout and well-named layers," though it states "Anima works with any Figma file."
  • Locofy describes "an AI-powered design-to-code tool that leverages AI to accurately convert Figma designs to clean, responsive React code with the touch of a button," using what it calls "Large Design Models," with "component-based React code" and data-binding support for a backend (Locofy, "Figma to React"). Its feature list says "LocoAI scans your design files and splits the code into reusable components with props."

Both are Figma plugins plus a separate web app, not part of Figma. Check each product's current plan and pricing page, because the conversion pages quoted above do not publish those details. Input quality matters: Auto Layout, consistent components and clear layer names give a converter more to work with than free-floating, ungrouped shapes.

Which route should I use?

RouteWhat you getBest forWhat it does not do
Dev Mode by handCSS and layout spec; a human writes the ReactProduction apps where a developer owns the resultGenerate React itself
MCP server + coding agentAgent-generated React from live design contextTeams already using an MCP-capable coding agentFix a framework or style; that depends on your prompt
Code ConnectYour real component code shown in Dev Mode and the MCP serverTeams with an existing React design systemCreate new components; it only maps existing ones
Third-party converter (Anima, Locofy and others)A generated React project or component set, from a link or pluginA fast first draft outside Figma's own toolingSkip review; output needs it before production, per each vendor's guidance

None of these routes replaces testing. Whatever produces the React, run it, check it at mobile and desktop widths, verify keyboard access and semantic markup, and confirm it builds in your project before you call the handoff done.

What if I need a live website and not a React codebase?

All four routes assume you will maintain a React codebase. If you only need a live website and nobody needs to own the source, How to Export Figma to HTML covers Figma Sites and direct-publish options, and Dev Mode's role. The Figment plugin is one direct-publish option for a Figma Design file: it publishes selected page frames as a hosted site, with a free figment.so address, and it does not give you React or other source code.