use-cases/frontend-designs.md +39 −95
11# Build responsive front-end designs | Codex use cases---
22 name: Build responsive front-end designs
33Codex use casestagline: Turn screenshots and visual references into responsive UI with visual checks.
44 summary: Use Codex to translate screenshots and design briefs into code that
55 matches the repo's design system, then use Playwright to compare the
66 implementation to your references for different screen sizes and iterate until
77 it looks right.
88 featured: true
99Codex use casecoverImage: /codex/use-cases/frontend-designs-use-case.png
1010 skills:
1111# Build responsive front-end designs - token: $playwright
1212 url: https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive
1313Turn screenshots and visual references into responsive UI with visual checks. description: Open the app in a real browser to verify the implementation and
1414 iterate on layout and behavior.
1515Difficulty **Intermediate**bestFor:
16
17Time horizon **1h**
18
19Use Codex to translate screenshots and design briefs into code that matches the repo's design system, then use Playwright to compare the implementation to your references for different screen sizes and iterate until it looks right.
20
21## Best for
22
23 - Creating new front-end projects from scratch16 - Creating new front-end projects from scratch
2417- Implementing already designed screens or flows from screenshots in an existing codebase - Implementing already designed screens or flows from screenshots in an
2518 existing codebase
2619# ContentsstarterPrompt:
20 body: >-
21 Implement this UI in the current project using the screenshots and notes I
22 provide as the source of truth.
27 23
28[← All use cases](https://developers.openai.com/codex/use-cases)
29 24
3025Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/frontend-designs/?export=pdf) Requirements:
31
32Use Codex to translate screenshots and design briefs into code that matches the repo's design system, then use Playwright to compare the implementation to your references for different screen sizes and iterate until it looks right.
33
34Intermediate
35
361h
37
38Related links
39
40[Codex skills](https://developers.openai.com/codex/skills)
41 26
4227## Best for - Reuse the existing design system components and tokens.
43 28
4429 - Creating new front-end projects from scratch - Translate the screenshots into this repo's utilities and component
4530- Implementing already designed screens or flows from screenshots in an existing codebase patterns instead of inventing a parallel system.
46 31
4732## Skills & Plugins - Match spacing, layout, hierarchy, and responsive behavior closely.
48 33
4934- [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive) - Respect the repo's routing, state, and data-fetch patterns.
50 35
5136 Open the app in a real browser to verify the implementation and iterate on layout and behavior. - Make the page responsive on desktop and mobile.
52 37
5338| Skill | Why use it | - If any screenshot detail is ambiguous, choose the simplest implementation
5439| --- | --- | that still matches the overall direction and note the assumption briefly.
55| [Playwright](https://github.com/openai/skills/tree/main/skills/.curated/playwright-interactive) | Open the app in a real browser to verify the implementation and iterate on layout and behavior. |
56 40
57## Starter prompt
58 41
59Implement this UI in the current project using the screenshots and notes I provide as the source of truth.
60 Requirements:
61 - Reuse the existing design system components and tokens.
62- Translate the screenshots into this repo's utilities and component patterns instead of inventing a parallel system.
63 - Match spacing, layout, hierarchy, and responsive behavior closely.
64 - Respect the repo's routing, state, and data-fetch patterns.
65 - Make the page responsive on desktop and mobile.
66- If any screenshot detail is ambiguous, choose the simplest implementation that still matches the overall direction and note the assumption briefly.
67 Validation:42 Validation:
68- Compare the finished UI against the provided screenshots for both look and behavior.
69- Use $playwright-interactive to check that the UI matches the references and iterate as needed until it does.
70 43
7144[Open in the Codex app](codex://new?prompt=Implement+this+UI+in+the+current+project+using+the+screenshots+and+notes+I+provide+as+the+source+of+truth.%0A%0ARequirements%3A%0A-+Reuse+the+existing+design+system+components+and+tokens.%0A-+Translate+the+screenshots+into+this+repo%27s+utilities+and+component+patterns+instead+of+inventing+a+parallel+system.%0A-+Match+spacing%2C+layout%2C+hierarchy%2C+and+responsive+behavior+closely.%0A-+Respect+the+repo%27s+routing%2C+state%2C+and+data-fetch+patterns.%0A-+Make+the+page+responsive+on+desktop+and+mobile.%0A-+If+any+screenshot+detail+is+ambiguous%2C+choose+the+simplest+implementation+that+still+matches+the+overall+direction+and+note+the+assumption+briefly.%0A%0AValidation%3A%0A-+Compare+the+finished+UI+against+the+provided+screenshots+for+both+look+and+behavior.%0A-+Use+%24playwright-interactive+to+check+that+the+UI+matches+the+references+and+iterate+as+needed+until+it+does. "Open in the Codex app") - Compare the finished UI against the provided screenshots for both look and
45 behavior.
72 46
7347Implement this UI in the current project using the screenshots and notes I provide as the source of truth. - Use $playwright-interactive to check that the UI matches the references
7448 Requirements: and iterate as needed until it does.
7549 - Reuse the existing design system components and tokens. suggestedEffort: medium
7650- Translate the screenshots into this repo's utilities and component patterns instead of inventing a parallel system.relatedLinks:
7751 - Match spacing, layout, hierarchy, and responsive behavior closely. - label: Codex skills
7852 - Respect the repo's routing, state, and data-fetch patterns. url: /codex/skills
7953 - Make the page responsive on desktop and mobile.---
80- If any screenshot detail is ambiguous, choose the simplest implementation that still matches the overall direction and note the assumption briefly.
81 Validation:
82- Compare the finished UI against the provided screenshots for both look and behavior.
83- Use $playwright-interactive to check that the UI matches the references and iterate as needed until it does.
84 54
85## Introduction55## Introduction
86 56
127Use additional screenshots or short notes if they help clarify states that are not obvious from one image.97Use additional screenshots or short notes if they help clarify states that are not obvious from one image.
128 98
129### Suggested follow-up prompt99### Suggested follow-up prompt
130
131[current implementation image] [reference image]
132This doesn't look right. Make sure to implement something that matches closely the reference:
133[if needed, specify what is different]
134
135## Related use cases
136
137[
138
139### Turn Figma designs into code
140
141Use Codex to pull design context, assets, and variants from Figma, translate them into code...
142
143Front-end Design](https://developers.openai.com/codex/use-cases/figma-designs-to-code)[
144
145### Generate slide decks
146
147Use Codex to update existing presentations or build new decks by editing slides directly...
148
149Data Integrations](https://developers.openai.com/codex/use-cases/generate-slide-decks)[
150
151### Make granular UI changes
152
153Use Codex to make one small UI adjustment at a time in an existing app, verify it in the...
154
155Front-end Design](https://developers.openai.com/codex/use-cases/make-granular-ui-changes)