Live data from Hacker News

Ask HN: How do you employ LLMs for UI development?

news.ycombinator.com

11–20 of 67 posts

Re: Ask HN: How do you employ LLMs for UI development?

#11
post #4

I think user interface design is a very cursed task for an LLM. They are skilled at giving you high quality CSS and design patterns, but they're horrible at actual layout and composition. I can say "add a status strip to the form with blah blah" and it will work perfectly. However if I ask for something like "a modern UI for gathering customer details" I'm guaranteed to get a pile of shit.

Same thing would happen if you had asked a human intern.

Re: Ask HN: How do you employ LLMs for UI development?

#12
Best I did was having instructions for it to use webdriver + browser screenshots, then I have baseline screenshots of how I want it to look, and instruct the agent to match against the screenshots and continue until implementation is aligned with the screenshots. Typically I use Figma to create those screenshots, then let the agent go wild as long as it manages to get the right results.

Once first implementation is done, then go through all the code and come up with a proper software design and architecture, and refactor everything to be proper code basically, again using the screenshot comparison to make sure there are no regressions.

Re: Ask HN: How do you employ LLMs for UI development?

#13
Since LLMs are almost AGI, all you have to do is feed one a screenshot of a few UIs that you like and ask it to duplicate it for your own application, saying "Please style the application like this, while observing best practices for internationalization, assistive technologies and Fitts' Law."

If you have problems with this workflow, it's because you're not using an-up-to-date LLM. All the old ones are garbage.

Re: Ask HN: How do you employ LLMs for UI development?

#14

[dead]

OP seems to be talking about "UI development" though, the development part of the UI, not how to come up with what the UI should be in the first place, this typically happens way before UI development even starts.

And I agree, current LLMs are pretty awful at that specific part.

Re: Ask HN: How do you employ LLMs for UI development?

#15
post #4

I think user interface design is a very cursed task for an LLM. They are skilled at giving you high quality CSS and design patterns, but they're horrible at actual layout and composition. I can say "add a status strip to the form with blah blah" and it will work perfectly. However if I ask for something like "a modern UI for gathering customer details" I'm guaranteed to get a pile of shit.

Same thing would happen if you had asked a human intern.

This is almost a meme reply on HN: absolving the LLM by comparing it to an inexperienced human.

Re: Ask HN: How do you employ LLMs for UI development?

#16
post #4

I think user interface design is a very cursed task for an LLM. They are skilled at giving you high quality CSS and design patterns, but they're horrible at actual layout and composition. I can say "add a status strip to the form with blah blah" and it will work perfectly. However if I ask for something like "a modern UI for gathering customer details" I'm guaranteed to get a pile of shit.

Same thing would happen if you had asked a human intern.

[dead]

Re: Ask HN: How do you employ LLMs for UI development?

#17
Idk for UX but I’ve found Claude helpful at creating ideas and mockups for gui apps I need. Don’t ask it to generate any images or vectors, it’s horrible at that, but you ask it to make a mock for an app so and so that does such and such and has three columns with a blah blah blah and it has made some impressive results in html/css for me

Re: Ask HN: How do you employ LLMs for UI development?

#18
post #5

Mainly using playwriter.dev to help debug CSS issues on the page. It's an extension you can enable in Chrome and let agents control the browser via CDP https://github.com/remorses/playwriter

Interesting, thanks To your opinion, what's the benefits compared to the native Chrome remote debugging feature + the chrome-devtools MCP?

Re: Ask HN: How do you employ LLMs for UI development?

#19

Best I did was having instructions for it to use webdriver + browser screenshots, then I have baseline screenshots of how I want it to look, and instruct the agent to match against the screenshots and continue until implementation is aligned with the screenshots. Typically I use Figma to create those screenshots, then let the agent go wild as long as it manages to get the right results. Once first implementation is d…

> I have baseline screenshots of how I want it to look, and instruct the agent to match against the screenshots

What if instead of feeding the actual and expected screenshots into the model we fed in a visual diff between the images along with a scalar quantity that indicates magnitude of difference? Then, an agent harness could quantify how close a certain run is and maybe step toward success autonomously.

That said, if you have the skills to produce the desired final design as a raster image, I'd argue you have already solved the hard part. Manually converting a high quality design into css is ~trivial with modern web.

Post reply on HN