All posts
Platform migrations

Figma to Next.js: Turning Designs Into Production Code

Figma to Next.js: turn variables into tokens, components into React, and pages into server-rendered routes, with AI code generation and a QA checklist.

By Mehdi Hassan7 min read

The short answer

To turn a Figma design into a Next.js website, convert Figma variables into design tokens, build each Figma component as a React component, assemble pages as server-rendered routes, connect a headless CMS for editable content, and QA against the design at every breakpoint. AI tools can draft components from Figma, but a developer still owns structure and review.

Key takeaways

  • Start with tokens and components, not pages; pages are just components arranged in order.
  • Figma variables map to CSS variables or a Tailwind theme, so design changes flow into code.
  • AI tools that read Figma, such as Figma's MCP server, draft components fast but need review.
  • Render marketing pages on the server so search engines and AI crawlers see the full content.
  • QA visually against Figma at real breakpoints, then test accessibility and performance.

Part of Figma to Website: Framer, Webflow or Next.js?

How do you turn a Figma design into a Next.js website?

You turn a Figma design into a Next.js website by translating it in layers: tokens first, then components, then pages, then content and SEO. Each layer depends on the one before it, so getting the order right is most of the craft.

Next.js is the right target when the site needs logic or ownership that Framer and Webflow can't offer: product data, authentication, custom integrations, large programmatic page sets or a team that wants everything in a repository. If you're still choosing, read our Figma to website comparison first; if Framer fits, Figma to Framer is faster.

This guide is the developer's path we follow, including where AI tools help and where they don't. It assumes the App Router, React Server Components and a CSS approach such as Tailwind or CSS modules.

What's the best Figma to nextjs workflow?

The best Figma to nextjs workflow builds a small design system first and assembles pages from it. It's slower for the first page and much faster for every page after that, and it keeps the site consistent as it grows.

  1. Audit the Figma file

    Check that the file uses variables, components with variants and auto layout. Gaps here become guesswork in code. Our checklist for preparing Figma files for development lists what to fix.

  2. Extract design tokens

    Turn color, type, spacing, radius and shadow variables into CSS variables or a Tailwind theme.

  3. Build primitives

    Code the smallest pieces first: buttons, links, inputs, badges, headings and containers.

  4. Build sections

    Compose primitives into the sections the pages use: hero, feature grid, pricing, testimonials, FAQ, footer.

  5. Assemble routes

    Create each page as a route that renders sections, with metadata for SEO.

  6. Connect content

    Move editable copy into a headless CMS and render it on the server.

  7. QA and launch

    Compare against Figma at each breakpoint, then test accessibility, performance, forms and analytics.

How do you turn Figma variables into design tokens?

Export Figma variables, map them to named tokens and generate CSS variables or a Tailwind theme from them. Tokens keep the code tied to the design: change a brand color once, and every component follows.

Keep the naming consistent across both tools. If Figma has a variable called color/surface/primary, the code should have an equivalent token, not a hex value pasted into a component. Modes in Figma, such as light and dark, map to sets of CSS variables switched by a class or media query.

You can export variables with Figma's REST API, a token plugin or by hand for small systems. Our guide to syncing Figma variables with Tailwind walks through the setup in detail.

How do you build React components from Figma?

Build one React component per Figma component, with props that mirror its variants and properties. A Figma button with size and style variants becomes a Button component with size and variant props.

  • Mirror variants as props. Each Figma variant property becomes a prop with the same allowed values.
  • Translate auto layout. Direction, gap and padding become flexbox or grid utilities using your spacing tokens.
  • Use semantic HTML. A card that links somewhere is an anchor or contains one; a section heading is a real heading element.
  • Design for content. Components must handle long text, missing images and empty states that a Figma mockup never shows.
  • Keep server by default. Only add client-side JavaScript for interactive parts, such as menus, tabs or animation.

Figma's Dev Mode makes this faster by exposing measurements, tokens and component properties in a developer-friendly view. Our guide to Figma Dev Mode covers what it does and whether your team needs it.

Can AI convert Figma to React code?

AI can convert Figma frames into React code that's a useful first draft, especially when it reads the Figma file directly rather than a screenshot. It can't decide your architecture, data flow or accessibility, so treat its output as a draft for a developer to refine.

Approach

How it works

Best for

Watch out for

Figma's MCP server + coding agent

Agent reads frames, variables and components from Figma

Drafting components in your own codebase

Needs clear instructions and your existing tokens

Code Connect

Maps Figma components to your real code components

Teams with an existing component library

Setup effort; only as good as the mappings

Figma Make and design-to-code tools

Generate working prototypes or code from designs and prompts

Fast prototypes and experiments

Code often doesn't match your structure

Screenshot to code

Model infers layout from an image

Rough starts

Guessed spacing, no tokens, weak semantics

Our comparison of Figma to code with AI goes deeper on these tools. The same lesson holds for whole-site rebuilds, as covered in AI-assisted website migration: agents are fast at visible structure and weak at the invisible parts.

How we prompt an agent to build a component from Figma

We give the agent a narrow job: one component, a link to its Figma frame, the token file and an existing component to copy patterns from. We ask for props that match the Figma variants, semantic HTML, tokens instead of raw values and no client-side JavaScript unless the component needs it.

Then a developer reviews the result against the frame, fixes naming and structure, and adds the component to a page with real content. Asking an agent to build a whole page from one prompt gives faster output and much more cleanup.

How do you build pages, content and SEO in Next.js?

Build each page as a server-rendered route that assembles sections, set its metadata with Next.js's metadata API and pull editable content from a headless CMS. Server rendering is what makes a Next.js marketing site readable to search engines and AI crawlers.

A marketing page usually needs no client-side data fetching at all. Render it on the server or statically, so the full HTML arrives on the first request. Our guide to server-side rendering for AI crawlers explains why client-only rendering can make a React site invisible to some crawlers.

For content, a headless CMS such as Payload or Sanity lets marketers edit text, images and page sections without touching code. The Next.js documentation covers routing, metadata and rendering modes. Teams coming from a builder can see the full move in Squarespace to Next.js or rebuilding a Framer site in Next.js.

How do you QA a Figma to Next.js build?

QA a Figma to Next.js build by comparing it against Figma at real breakpoints, then testing what designs don't show: accessibility, performance, content edge cases, forms and analytics. Visual accuracy is the visible half; the rest decides whether the site works.

  1. Compare each page with its Figma frame at desktop, tablet and mobile widths, and at the widths in between.
  2. Check every component with long titles, missing images and empty CMS fields.
  3. Run keyboard navigation and a screen reader pass on menus, forms and modals.
  4. Check color contrast, heading order, alt text and focus states.
  5. Measure Core Web Vitals on a production build, not in development mode.
  6. Submit every form and confirm analytics events fire.
  7. Check titles, descriptions, canonical URLs and Open Graph images on every route.

Frequently asked questions

Is Next.js overkill for a marketing website?
Sometimes. If the site is mainly marketing pages edited by designers and marketers, Framer or Webflow is usually faster to build and easier to run. Next.js earns its cost when the site needs product logic, custom integrations, large programmatic page sets or full code ownership, or when engineers will maintain it anyway.
Should I use Tailwind for a Figma to Next.js build?
Tailwind works well because its theme maps cleanly to Figma variables: colors, spacing, type sizes and radii become tokens you use in every component. CSS modules or other approaches work too. What matters is that tokens come from Figma in one place, rather than raw values scattered across components.
How do marketers edit a Next.js site after launch?
Through a headless CMS connected to the site. Tools such as Payload, Sanity or Contentful let marketers edit text, images, blog posts and page sections in a web interface, and the site renders that content. Without a CMS, every text change needs a developer, which is usually the wrong trade for a marketing site.
Can a designer build a Next.js site with AI tools alone?
A designer can produce a working prototype with AI tools, and for a simple page it may be good enough. A production marketing site also needs sound structure, server rendering, accessibility, SEO metadata, forms and a CMS, which still benefit from a developer's review. AI shortens the build; it doesn't remove the need for engineering judgment.

· CEO & Design Director

Copywriter, designer and developer, and founder of Designify Studio. Over five years, 60+ projects across 14+ industries, for startups that have raised $300M+.

Want this done for you? Website, $8,000.

A multi-page marketing site, designed by us, developed in Next.js and animated. $8,000, one-time, up to 6 pages. Book a free 30-minute call to see if it fits.

Schedule Call