use-cases/frontend-designs.md +40 −94
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
7144Implement this UI in the current project using the screenshots and notes I provide as the source of truth. - Compare the finished UI against the provided screenshots for both look and
7245 Requirements: behavior.
7346 - Reuse the existing design system components and tokens.
7447- Translate the screenshots into this repo's utilities and component patterns instead of inventing a parallel system. - Use $playwright-interactive to check that the UI matches the references
7548 - Match spacing, layout, hierarchy, and responsive behavior closely. and iterate as needed until it does.
7649 - Respect the repo's routing, state, and data-fetch patterns. suggestedEffort: medium
7750 - Make the page responsive on desktop and mobile.relatedLinks:
7851- If any screenshot detail is ambiguous, choose the simplest implementation that still matches the overall direction and note the assumption briefly. - label: Codex skills
7952 Validation: url: /codex/skills
8053- Compare the finished UI against the provided screenshots for both look and behavior.---
81- Use $playwright-interactive to check that the UI matches the references and iterate as needed until it does.
82 54
83## Introduction55## Introduction
84 56
125Use 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.
126 98
127### Suggested follow-up prompt99### Suggested follow-up prompt
128
129[current implementation image] [reference image]
130This doesn't look right. Make sure to implement something that matches closely the reference:
131[if needed, specify what is different]
132
133## Related use cases
134
135[
136
137### Turn Figma designs into code
138
139Use Codex to pull design context, assets, and variants from Figma, translate them into code...
140
141Front-end Design](https://developers.openai.com/codex/use-cases/figma-designs-to-code)[
142
143### Generate slide decks
144
145Use Codex to update existing presentations or build new decks by editing slides directly...
146
147Data Integrations](https://developers.openai.com/codex/use-cases/generate-slide-decks)[
148
149### Add iOS app intents
150
151Use Codex and the Build iOS Apps plugin to identify the actions and entities your app should...
152
153iOS Code](https://developers.openai.com/codex/use-cases/ios-app-intents)