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.
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.
Extract design tokens
Turn color, type, spacing, radius and shadow variables into CSS variables or a Tailwind theme.
Build primitives
Code the smallest pieces first: buttons, links, inputs, badges, headings and containers.
Build sections
Compose primitives into the sections the pages use: hero, feature grid, pricing, testimonials, FAQ, footer.
Assemble routes
Create each page as a route that renders sections, with metadata for SEO.
Connect content
Move editable copy into a headless CMS and render it on the server.
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.
- Compare each page with its Figma frame at desktop, tablet and mobile widths, and at the widths in between.
- Check every component with long titles, missing images and empty CMS fields.
- Run keyboard navigation and a screen reader pass on menus, forms and modals.
- Check color contrast, heading order, alt text and focus states.
- Measure Core Web Vitals on a production build, not in development mode.
- Submit every form and confirm analytics events fire.
- Check titles, descriptions, canonical URLs and Open Graph images on every route.
