Problem with recreating UIs from websites using inspected code
Comparing ChatGPT vs Trace UI to recreate Claude AI's CTA card from inspect code. Why raw inspect code fails and how computed styles solve it.
I tried recreating UI component from Claude's webpage into usable react and HTML code using ChatGPT vs Trace UI and compared the results. The results were pretty interesting.
The reason to study a well-known product is that a lot of people already use it. A component on a site like Claude, Spotify, or Airbnb has usually been through design reviews, usability testing, and real use. It is worth learning the pattern, then adapting it to your own design language.
Why reinvent the wheel, when you can customise them according to your design language and use them?
So in this demo I picked a beautiful CTA card from Claude code webpage and tried recreating it with two methods. First using ChatGPT with the inspect code of the CTA card taken directly from the webpage.
Method 1: Inspect webpage code, copy and paste into ChatGPT
This is what most of us do. Inspect the element, copy the generated markup, and paste it into a coding agent. For this test I used ChatGPT. The pasted code was huge because it contained a Lottie icon. The prompt was:
"Recreate this UI component in HTML and CSS. I want the UI exactly as it is."
The result did not match. The text field was different, the buttons were different, the font color was different, and the Lottie icon was skipped. The markup used hashed class names, like css-1x2y3z, and the real colors, fonts, and spacing lived in a separate stylesheet ChatGPT never saw. The class names were labels with nothing behind them, so the model guessed. The Lottie icon was dropped for the same reason: it loads from an external JSON file, and the pasted markup only had an empty container.
Copying the HTML alone gives the AI the structure. Unless the styles are inline Tailwind classes, you also have to provide the CSS, or the computed styles, plus files like the Lottie JSON. That is what the next method does.

Method 2: Using Trace UI browser extension
Then I tried the same component with Trace UI. I clicked the extension, selected the element, and got a preview before generating anything.
Trace UI doesn't hand the AI the site's messy source. It reads what the browser actually rendered, then cleans up the computer-generated code into something usable. There's also an optional prompt box for anything you want included, but I left it blank because I wanted the exact component.
The result was very close to the real thing, and it took about two clicks.

From reference to your own project
Getting a copy isn't the point. Once the component is in your library, you can:
- Change the text color, border radius, and other tokens to match your design system
- Copy the finished code straight into your project
- Grab the icon separately as an SVG
- Copy the HTML
You end up with something that started as a proven pattern and finished as your own.
The takeaway
The AI wasn't the weak link in that first experiment. The input was. When you give a model noisy code full of framework hashes, you get a guess back. When you give it clean, resolved values, you get something you can actually ship.

