Turn Figma designs into code | Codex use cases
Need
Design source
Default options
Why it's needed
A concrete frame or component selection keeps the implementation grounded.
7 added, 110 removed.
Need
Design source
Default options
Why it's needed
A concrete frame or component selection keeps the implementation grounded.
11name: Turn Figma designs into code# Turn Figma designs into code | Codex use cases
2tagline: Turn Figma selections into polished UI with structured design context
3 and visual checks.
4summary: Use Codex to pull design context, assets, and variants from Figma,
5 translate them into code that matches the repo's design system, then use
6 Playwright to compare the implementation to the Figma reference and iterate
7 until it looks right.
8skills:
9 - token: figma
10 url: https://github.com/openai/plugins/tree/main/plugins/figma
11 description: Implement designs in code, create Code Connect mappings between
12 published components and source files, and generate project-specific
13 design system rules for repeatable Figma-to-code work.
14 - token: $playwright
15 url: https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive
16 description: Check responsive behavior and verify the implemented UI in a real browser.
17bestFor:
18 - Implementing already designed screens or flows from Figma in an existing
19 codebase
20 - Teams that want Codex to work from structured design context
21starterPrompt:
22 title: Implement a Design System-Aware UI
23 body: >-
24 Implement this Figma design in the current project using the Figma skill.
25 2
3Need
26 4
275 Requirements:Design source
28 6
297 - Start with `get_design_context` for the exact node or frame.Default options
30 8
319 - If the response is truncated, use `get_metadata` to map the file and then[Figma](https://www.figma.com/)
32 re-fetch only the needed nodes with `get_design_context`.
33 10
3411 - Run `get_screenshot` for the exact variant before you start coding.Why it's needed
35 12
3613 - Reuse the existing design system components and tokens.A concrete frame or component selection keeps the implementation grounded.
37 14
38 - Translate the Figma output into this repo's utilities and component
39 patterns instead of inventing a parallel system.
40
41 - Match spacing, layout, hierarchy, and responsive behavior closely.
42
43 - Respect the repo's routing, state, and data-fetch patterns.
44
45 - Make the page responsive on desktop and mobile.
46
47 - If Figma returns localhost image or SVG sources, use them directly and do
48 not create placeholders or add new icon packages.
49
50
51 Validation:
52
53 - Compare the finished UI against the Figma reference for both look and
54 behavior.
55
56 - Use Playwright to check that the UI matches the reference and iterate as
57 needed until it does.
58 suggestedEffort: medium
59relatedLinks:
60 - label: Codex skills
61 url: /codex/skills
62 - label: Model Context Protocol
63 url: /codex/mcp
64techStack:
65 - need: Design source
66 goodDefault: "[Figma](https://www.figma.com/)"
67 why: A concrete frame or component selection keeps the implementation grounded.
68
69## Introduction
70
71When you have an exact Figma selection, Codex can turn it into polished UI without ignoring the patterns already established in your project.
72
73With the Figma skill, Codex can use the Figma MCP server to pull structured design context, variables, assets, and the exact variant it should implement.
74
75With the Playwright interactive skill, Codex can open the app in a real browser, compare the implementation to the Figma reference, and iterate on layout or behavior until the result is closer to the target.
76
77## Set up your Figma project
78
79The cleaner your Figma file is, the better the first implementation will be. To improve the handoff:
80
81- Use variables or design tokens wherever possible, especially for colors, typography, and spacing
82- Create components for reusable UI elements instead of repeating detached layers
83- Use auto layout as much as possible instead of manual positioning
84- Keep frame and layer names clear enough that the main screen, state, and variants are obvious
85- Keep real icons and images in the file when possible so Codex does not need to guess
86
87This gives Codex better structure to translate into a robust, production-ready UI.
88
89## Be specific
90
91The more specific you are about the expected interaction patterns and the style you want, the better the result will be.
92
93If a state, breakpoint, or interaction matters, call it out. If the file contains multiple close variants, tell Codex which one should be treated as the source of truth.
94
95The more explicit you are about what needs to match exactly and where repo conventions should win, the easier it is for Codex to make the right tradeoffs.
96
97## Prepare the design system
98
99Codex works best when the target repo already has a clear component layer. Codex can automatically use your existing component and design system instead of recreating them from scratch.
100
101If you think it's necessary, specify to Codex which primitives to reuse, where your tokens live, and what the repo considers canonical for buttons, inputs, cards, typography, and icons.
102
103Treat the Figma MCP output, which often looks like React plus Tailwind, as a structural reference rather than final code style. Ask Codex to translate that output into the project's actual utilities, component wrappers, color system, typography scale, spacing tokens, routing, state management, and data-fetch patterns.
104
105## Workflow
106
107### Start from a Figma selection
108
109Copy a link to the exact Figma frame, component, or variant you want implemented. The Figma MCP flow is link-based, so the link needs to point to the exact node you want rather than a nearby parent frame.
110
111### Prompt Codex to use Figma
112
113Figma should drive the first pass. Ask Codex to follow the Figma MCP flow before it starts implementing.
114
115Things to include in your prompt:
116
117Once the first implementation is in place, Codex will use Playwright to verify the UI in a real browser and tighten any remaining visual or interaction mismatches.