Back to articles

How to build astonishing UI with Codex

Emanuele Di Pietro ยท @emanueledpt ยท Mar 21

View original post
How to build astonishing UI with Codex cover

๐—š๐—ฃ๐—ง-๐Ÿฑ.๐Ÿฐ ๐—ฐ๐—ฎ๐—ป ๐—ฏ๐˜‚๐—ถ๐—น๐—ฑ ๐—ฏ๐—ฒ๐—ฎ๐˜‚๐˜๐—ถ๐—ณ๐˜‚๐—น ๐—ณ๐—ฟ๐—ผ๐—ป๐˜๐—ฒ๐—ป๐—ฑ๐˜€. ๐—•๐˜‚๐˜ ๐—ผ๐—ป๐—น๐˜† ๐—ถ๐—ณ ๐˜†๐—ผ๐˜‚ ๐—ธ๐—ป๐—ผ๐˜„ ๐—ต๐—ผ๐˜„ ๐˜๐—ผ ๐—ฎ๐˜€๐—ธ.

Better output starts with tighter constraints, visual references, and real content.

Here's how to build intentional frontends with GPT-5.4.

๐—ช๐—ต๐˜† ๐—š๐—ฃ๐—ง-๐Ÿฑ.๐Ÿฐ ๐—ฑ๐—ฒ๐—ณ๐—ฎ๐˜‚๐—น๐˜๐˜€ ๐˜๐—ผ ๐—ด๐—ฒ๐—ป๐—ฒ๐—ฟ๐—ถ๐—ฐ

Without specific guidance, every model defaults to the most common patterns it saw during training.

Generic card grids. Weak visual hierarchies. Safe, forgettable layouts.

GPT-5.4 is significantly better at frontend work.

It generates more visually ambitious UIs, understands images natively, and can use tools like Playwright to verify and refine its own output.

But it still needs direction. The model is only as intentional as your prompt.

๐—ฆ๐˜๐—ฎ๐—ฟ๐˜ ๐—ต๐—ฒ๐—ฟ๐—ฒ: ๐Ÿฐ ๐—ณ๐—ผ๐˜‚๐—ป๐—ฑ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€

โ†’ Set reasoning to low or medium Counterintuitive, but it leads to stronger results. Keeps the model fast and focused.

โ†’ Define your design system upfront Typography, color palette, layout rules. Before any code.

โ†’ Provide visual references A screenshot, a mood board, anything. The model infers rhythm, spacing, and scale from images.

โ†’ Give it real content Real copy, real product context. Placeholder text produces placeholder thinking.

๐——๐—ฒ๐˜€๐—ถ๐—ด๐—ป ๐—ฟ๐˜‚๐—น๐—ฒ๐˜€ ๐˜๐—ต๐—ฎ๐˜ ๐—ฎ๐—ฐ๐˜๐˜‚๐—ฎ๐—น๐—น๐˜† ๐˜„๐—ผ๐—ฟ๐—ธ

Constrain the model hard. OpenAI's own starter prompt includes rules like:

โ†’ One composition โ€” the first viewport must read as a single composition

โ†’ No cards in the hero. Ever.

โ†’ Brand first โ€” the product name must be hero-level on branded pages

โ†’ Full-bleed hero by default on landing pages

โ†’ Two typefaces max. One accent color.

โ†’ One job per section. One purpose. One takeaway.

Litmus check: if you remove the hero image and the page still works, the image was too weak.

๐—ฆ๐˜๐—ฟ๐˜‚๐—ฐ๐˜๐˜‚๐—ฟ๐—ฒ ๐˜๐—ต๐—ฒ ๐—ฝ๐—ฎ๐—ด๐—ฒ ๐—ฎ๐˜€ ๐—ฎ ๐—ป๐—ฎ๐—ฟ๐—ฟ๐—ฎ๐˜๐—ถ๐˜ƒ๐—ฒ

Before you build, write three things:

โ†’ Visual thesis โ€” one sentence on the mood and energy

โ†’ Content plan โ€” hero, support, detail, final CTA

โ†’ Interaction thesis โ€” 2-3 motion ideas

Then follow this sequence:

1. Hero โ€” establish identity and promise

2. Supporting imagery โ€” show context

3. Product detail โ€” explain the offering

4. Social proof โ€” build credibility

5. Final CTA โ€” convert

Each section gets one job. If a section is trying to do two things, cut one.

๐—”๐—ฝ๐—ฝ๐˜€ ๐˜ƒ๐˜€ ๐—น๐—ฎ๐—ป๐—ฑ๐—ถ๐—ป๐—ด ๐—ฝ๐—ฎ๐—ด๐—ฒ๐˜€

For apps and dashboards, different rules apply. Default to Linear-style restraint:

โ†’ Calm surface hierarchy

โ†’ Strong typography and spacing

โ†’ Few colors

โ†’ Dense but readable information

โ†’ Cards only when the card IS the interaction

Avoid dashboard-card mosaics, thick borders on every region, decorative gradients, multiple competing accent colors.

Litmus check: if an operator scans only headings, labels, and numbers โ€” can they understand the page immediately?

๐— ๐—ผ๐˜๐—ถ๐—ผ๐—ป: ๐˜€๐—ต๐—ถ๐—ฝ ๐Ÿฎ-๐Ÿฏ, ๐—ป๐—ผ๐˜ ๐Ÿญ๐Ÿฌ

Motion creates presence and hierarchy. Not noise.

Pick three intentional motions and commit to them:

โ†’ One entrance sequence in the hero

โ†’ One scroll-linked or sticky effect

โ†’ One hover, reveal, or layout transition

Framer Motion is the recommended stack. If a motion is only decorative, remove it.

๐—ง๐—ต๐—ฒ ๐—ณ๐—ฟ๐—ผ๐—ป๐˜๐—ฒ๐—ป๐—ฑ ๐˜€๐—ธ๐—ถ๐—น๐—น

OpenAI released an open-source skill that encodes all of this into one reusable prompt layer.

Install it with:

$skill-installer frontend-skill

It forces the model to define a visual thesis, content plan, and interaction thesis before touching any code. Worth running before your next build.

๐—ง๐—น๐—ฑ๐—ฟ

GPT-5.4 can generate genuinely good frontends. But only when you:

โ†’ Constrain the layout system upfront

โ†’ Give it visual references to work from

โ†’ Structure the page as a narrative, not a document

โ†’ Use real content, not placeholders

โ†’ Keep reasoning low or medium

The model is capable. The prompt is the design brief.

What's the first thing you're building with it? ๐Ÿ‘‡

Full article here: https://developers.openai.com/blog/designing-delightful-frontends-with-gpt-5-4