LaTCoder: Converting Webpage Design to Code with Layout-as-Thought
On the map: LLM reasoning → Multimodal reasoning
Abstract (arXiv)
Converting webpage designs into code (design-to-code) plays a vital role in User Interface (UI) development for front-end developers, bridging the gap between visual design and functional implementation. While recent Multimodal Large Language Models (MLLMs) have shown significant potential in design-to-code tasks, they often fail to accurately preserve the layout during code generation. To this end, we draw inspiration from the Chain-of-Thought (CoT) reasoning in human cognition and propose LaTCoder, a novel approach that enhances layout preservation in webpage design during code generation with Layout-as-Thought (LaT). Specifically, we first introduce a simple yet efficient algorithm to divide the webpage design into image blocks. Next, we prompt MLLMs using a CoTbased approach to generate code for each block. Finally, we apply two assembly strategies-absolute positioning and an MLLM-based method-followed by dynamic selection to determine the optimal output. We evaluate the effectiveness of LaTCoder using multiple backbone MLLMs (i.e., DeepSeek-VL2, Gemini, and GPT-4o) on both a public benchmark and a newly introduced, more challenging benchmark (CC-HARD) that features complex layouts. The experimental results on automatic metrics demonstrate significant improvements. Specifically, TreeBLEU scores increased by 66.67% and MAE decreased by 38% when using DeepSeek-VL2, compared to direct prompting. Moreover, the human preference evaluation results indicate that annotators favor the webpages generated by LaTCoder in over 60% of cases, providing strong evidence of the effectiveness of our method.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Placed in Multimodal reasoning, one of 17 directions in LLM reasoning. Builds on 16 of its 55 references that are in the map. First posted on arXiv 5 Aug 2025.
Builds on
16 of 55 references.
References · 16
- 2023GPT-4 Technical Reportcited by 18,396
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
- 2023Gemini: A Family of Highly Capable Multimodal Modelscited by 872
- 2025Qwen2.5-Omni Technical Reportcited by 736
- 2023WizardCoder: Empowering Code Large Language Models with Evol-Instructcited by 733
- 2024DeepSeek-VL: Towards Real-World Vision-Language Understandingcited by 733
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2024Hallucination of Multimodal Large Language Models: A Surveycited by 388
- 2024Unlocking the conversion of Web Screenshots into HTML Code with the WebSight Datasetcited by 129
- 2024Interaction2Code: Benchmarking MLLM-based Interactive Webpage Code Generation from Interactive Prototypingcited by 51
- 2024Automatically Generating UI Code from Screenshot: A Divide-and-Conquer-Based Approachcited by 24
4 more
- 2024MRWeb: An Exploration of Generating Multi-Page Resource-Aware Web Code from UI Designscited by 24
- 2019Sketch2code: Generating a website from a paper mockupcited by 20
- 2024Bridging Design and Development with Automated Declarative UI Code Generationcited by 19
- 2024IW-Bench: Evaluating Large Multimodal Models for Converting Image-to-Webcited by 16
Built on by
Citing papers per year: 2025: 4; 2026: 5.
9 papers.
- 2025VinciCoder: Unifying Multimodal Code Generation via Coarse-to-fine Visual Reinforcement Learningcited by 21
- 2026Generative Visual Code Mobile World Modelscited by 13
- 2025IWR-Bench: Can LVLMs reconstruct interactive webpage from a user interaction video?cited by 12
- 2025Widget2Code: From Visual Widgets to UI Code via Multimodal LLMscited by 9
- 2025EfficientUICoder: A Bidirectional Token Compression Framework for Efficient MLLM-Based UI Code Generationcited by 5
- 2026Rubrics as Visual-Repair Context for Self-Evolving UI-to-Code Generationcited by 2
- 20261D-Bench: A Benchmark for Iterative UI Code Generation with Visual Feedback in Real-Worldcited by 1
- 2026From Visual Widgets to UI Code: Efficient Tool-Grounded Generationcited by 1
- 2026Editable Visual Designcited by 0
- 2026Editable Visual Design3 Sep 2026
- 2026Rubrics as Visual-Repair Context for Self-Evolving UI-to-Code Generation25 Aug 2026
- 2026From Visual Widgets to UI Code: Efficient Tool-Grounded Generation12 Aug 2026
- 20261D-Bench: A Benchmark for Iterative UI Code Generation with Visual Feedback in Real-World20 Feb 2026
- 2026Generative Visual Code Mobile World Models2 Feb 2026
- 2025Widget2Code: From Visual Widgets to UI Code via Multimodal LLMs22 Dec 2025
- 2025VinciCoder: Unifying Multimodal Code Generation via Coarse-to-fine Visual Reinforcement Learning1 Nov 2025
- 2025IWR-Bench: Can LVLMs reconstruct interactive webpage from a user interaction video?29 Sep 2025
- 2025EfficientUICoder: A Bidirectional Token Compression Framework for Efficient MLLM-Based UI Code Generation15 Sep 2025
Similar, not cited
Close in wording, no citation either way
- 2025WebRenderBench: Enhancing Web Interface Generation through Layout-Style Consistency and Reinforcement Learning
- 2025MLLM-Based UI2Code Automation Guided by UI Layout Information
- 2025FullFront: Benchmarking MLLMs Across the Full Front-End Engineering Workflow
- 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designs
- 2024VASCAR: Content-Aware Layout Generation via Visual-Aware Self-Correction
- 2025ReLayout: Integrating Relation Reasoning for Content-aware Layout Generation with Multi-modal Large Language Models
- 2024Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineering
- 2025Smaller But Better: Unifying Layout Generation with Smaller Large Language Models