From Visual Widgets to UI Code: Efficient Tool-Grounded Generation
Not on the map. Why?
Abstract (arXiv)
Existing screenshot-to-code systems face a trade-off between flexibility and controllability. Direct multimodal generation can hallucinate visible details, whereas structured pipelines reduce such errors through component-wise decomposition, predefined templates, and customized intermediate representations. These structures, however, introduce additional generative orchestration and restrict outputs to designs covered by the representation. We investigate whether selective tool grounding can improve the fidelity--efficiency trade-off of direct widget-to-code generation. We introduce WidgetGen, a lightweight tool-grounded framework that extracts observable text and color evidence, performs high-level layout and optional chart reasoning, and directly generates executable JavaScript XML (JSX). This design reduces reliance on component-wise generation while avoiding a fixed UI schema. Across six multimodal models and (1,000) held-out widgets, WidgetGen outperforms direct prompting and the structured Widget2Code pipeline on most visual reconstruction metrics, with consistent gains in area, legibility, and style. Finally, reconstruction-derived image-code pairs improve six Qwen-family open-weight models across every reported metric through supervised fine-tuning. These results establish WidgetGen as a strong lightweight baseline and show that selective evidence grounding offers an effective alternative to extensive representation constraints.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 28 of its 41 references that are in the map. First posted on arXiv 12 Aug 2026.
Builds on
28 of 41 references.
References · 28
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
- 2018The Unreasonable Effectiveness of Deep Features as a Perceptual Metriccited by 11,177
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2023Visual Instruction Tuningcited by 7,869
- 2023BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Modelscited by 6,137
- 2025Qwen3-VL Technical Reportcited by 2,793
- 2024Design2Code: Benchmarking Multimodal Code Generation for Automated Front-End Engineeringcited by 152
- 2024Unlocking the conversion of Web Screenshots into HTML Code with the WebSight Datasetcited by 129
- 2024ChartMimic: Evaluating LMM's Cross-Modal Reasoning Capability via Chart-to-Code Generationcited by 129
- 2017pix2code: Generating Code from a Graphical User Interface Screenshotcited by 114
- 2024Web2Code: A Large-scale Webpage-to-Code Dataset and Evaluation Framework for Multimodal LLMscited by 74
- 2022Meta-DMoE: Adapting to Domain Shift by Meta-Distillation from Mixture-of-Expertscited by 50
16 more
- 2025DesignBench: A Comprehensive Benchmark for MLLM-based Front-end Code Generationcited by 45
- 2024WebCode2M: A Real-World Dataset for Code Generation from Webpage Designscited by 44
- 2023Test-Time Domain Adaptation by Learning Domain-Aware Batch Normalizationcited by 31
- 2024Bayes Conditional Distribution Estimation for Knowledge Distillation Based on Conditional Mutual Informationcited by 25
- 2025UICopilot: Automating UI Synthesis via Hierarchical Code Generation from Webpage Designscited by 22
- 2025MLLM-Based UI2Code Automation Guided by UI Layout Informationcited by 17
- 2025Advancing vision-language models in front-end development via data synthesiscited by 16
- 2025UI2Code^N: UI-to-Code Generation as Interactive Visual Optimizationcited by 15
- 2025Learning to Adapt Frozen CLIP for Few-Shot Test-Time Domain Adaptationcited by 14
- 2024How to Train the Teacher Model for Effective Knowledge Distillationcited by 13
- 2025DesignCoder: Hierarchy-Aware and Self-Correcting UI Code Generation with Large Language Modelscited by 11
- 2025LaTCoder: Converting Webpage Design to Code with Layout-as-Thoughtcited by 9
- 2025Widget2Code: From Visual Widgets to UI Code via Multimodal LLMscited by 9
- 2026ASMIL: Attention-Stabilized Multiple Instance Learning for Whole Slide Imagingcited by 6
- 2024WAFFLE: Finetuning Multi-Modal Models for Automated Front-End Developmentcited by 5
- 2025UI-UG: A Unified MLLM for UI Understanding and Generationcited by 5
Built on by
Citing papers per year: 2026: 1.
1 paper.