Recreating Product Mockups With AI: Why Asset Slicing Is the Real Bottleneck

    This article walks through an attempt to rebuild a product landing page from a design mockup using React, Next.js, and Tailwind CSS with heavy AI coding assistance. The page was generated successfully, but the visual quality fell well short of the original. The gap did not come from writing React components; it came from asset slicing. The article breaks down the specific visual failures, the three layers of judgment AI lacks (image asset identification, inter-module relationships, and visual intent), a practical background/decoration/content layering framework with a JSX example, and export rules for asset scale, format, and naming. The takeaway: AI handles structure, humans handle texture, so slicing decisions should be made explicit before code generation begins.

    1. A Task That Looks Simple

    Turning a product mockup into a working React page is not technically difficult. The stack was a mainstream combination of React, Next.js, and Tailwind CSS, with several AI coding assistants brought in to carry most of the implementation work.

    The initial expectation was that this kind of work was already a solved problem. After all, AI can now read an image and write code, generate a page from a screenshot, split out components automatically, write styles, and even fill in interactions. But once the work was actually finished, the conclusion was unexpected: the task could indeed be completed and the page was indeed generated, yet the visual quality was far from the original.

    The problem was not in “writing React.” It was in a step that is much easier to overlook: asset slicing.

    2. Where the Generated Page Falls Short

    At first glance the output looks complete: a hero section at the top, entry cards, a test module, a tarot module, character cards, statistics, and a story section at the bottom. The component breakdown, layout skeleton, and event bindings were all fine.

    Put side by side with the original design, however, the problems show up immediately:

    1. Many modules feel “loose.” Modules that were tightly packed in the mockup ended up with distorted spacing and unbalanced proportions, breaking the overall rhythm.
    2. The background fell “apart.” What was a single cohesive visual background was split into scattered small images or filled with flat color blocks.
    3. Duplicated, stacked elements. The same decorative element was rendered multiple times at different layers, producing ghosting or unnecessary overlays.
    4. Some areas are too dark to read. Vignettes, gradients, and shadows were applied incorrectly on top of text or interactive regions.
    5. Text hierarchy was lost. Heading, subheading, and body sizes and color contrast no longer matched the visual weight of the original.

    The core issue: complex image modules were not sliced correctly. The page had structure, but not the product quality and immersion of the original.

    3. Why AI Can’t Do It

    The output reflects the real boundary of AI’s capability on this kind of task:

    • It knows a card belongs there;
    • It knows a button belongs over there;
    • It also knows the page overall is dark-themed and fantasy-styled.

    What it does not know is how the image should actually be sliced. More precisely, AI is missing three layers of judgment:

    Layer 1: Image asset identification. Which parts must be kept as bitmaps or background images (character art with lighting and texture, scene images), and which should be rebuilt with real DOM (buttons, lists, text, interactive cards). AI easily gets this backwards — embedding screenshots of elements that should be DOM, and faking complex backgrounds with gradients.

    Layer 2: Reconstructing relationships between modules. Modules in the original are held together by a great deal of visual “glue”: proportions, masks, vignettes, glow, stacked layers. These are not independent properties but a planned composition. AI tends to guess module by module, lacking global layer planning.

    Layer 3: Understanding visual intent. When a designer produces a visual, they are expressing an atmosphere and an attention-guiding strategy — what is bright, what is dark, how the eye moves. AI can imitate a nominally “dark theme” but struggles to reproduce that orchestration of attention.

    4. A General Method for Slicing Decisions

    A visually heavy page should generally be split into these layers:

    Background layer: A full scene image (characters, architecture, lighting atmosphere) should be exported as one complete high-resolution base image, adapted with CSS background-size, object-fit, and gradient masks. Never let AI “imitate” a complex scene image with gradients across multiple divs.

    Decoration layer: Elements that can tile or stack — glow, fog, particles, vignettes — should be exported separately as transparent assets (PNG or WebP), overlaid with absolute positioning and managed with z-index.

    Content layer: All text, buttons, cards, and forms should be implemented with real DOM so they stay interactive, scalable, and indexable by search engines.

    A schematic layered structure looks like this:

    1. <article className="relative min-h-screen">
    2. {/* Background layer */}
    3. <div className="absolute inset-0 bg-[url('/scene.webp')] bg-cover" />
    4. {/* Decoration layer */}
    5. <img src="/glow.webp" className="absolute top-8 left-0 opacity-70 pointer-events-none" />
    6. {/* Content layer */}
    7. <section className="relative z-10">
    8. <h1 className="text-4xl tracking-widest">…</h1>
    9. <Button>Enter</Button>
    10. </section>
    11. </article>

    You also need explicit export rules for the slicing list: asset scale multipliers (1x/2x/3x), format choices (WebP/JPEG for photographic content, PNG/WebP for transparent decorations), naming conventions, and directory structure. AI rarely completes this work automatically; it usually requires a person to check each item against the design file.

    5. What This Means for Human–AI Collaboration

    The biggest takeaway from this exercise was recalibrating expectations: AI is good at structure, humans are good at texture. The efficient collaboration model is to make slicing decisions explicit — a person first completes the layering and asset plan, produces clear layer descriptions and a slicing list, and then AI generates code against that agreement. If the design handoff can also include layered source files and annotations, both the speed and the quality of reproduction improve substantially.

    The bottleneck in visual reproduction has never been the framework layer; it is the understanding and planning of images. The more powerful the tools, the more a human needs to translate “visual intent” into explicit rules a machine can execute.