NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

WebVIA: A Web-based Vision-Language Agentic Framework for Interactive and Verifiable UI-to-Code Generation

Mingde Xu, Zhen Yang, Wenyi Hong, Lihang Pan, Xinyue Fan, Yan Wang, Xiaotao Gu, Bin Xu, Jie TangarXiv 2025 · DOI

Abstract

Automating front-end development remains a significant challenge in software engineering. While current Vision-Language Models (VLMs) excel at replicating the static appearance of user interfaces (UIs), they often fail to capture the underlying functional logic, resulting in non-interactive code. We present WebVIA, an agentic framework designed to bridge this gap. WebVIA employs an autonomous exploration agent to capture multi-state interaction traces, a specialized UI-to-code generator to synthesize functional logic, and a validation module to verify execution. Our results demonstrate that WebVIA significantly outperforms existing models in generating interactive, verifiable web applications.

Introduction: The Static Bias in UI-to-Code

The transition from a design screenshot to a functional website is a complex process. Modern VLMs like GPT-4o and Claude 3.5 Sonnet have shown impressive capabilities in generating HTML/CSS layouts from single images. However, these models suffer from a "static bias": they replicate the visual structure but omit the interactive behavior. Buttons do not trigger actions, and menus remain static.

The fundamental limitation is that a single image lacks the temporal information required to understand state changes. To build functional UIs, an AI must understand how an interface responds to user input. WebVIA addresses this by treating UI-to-code generation as a dynamic exploration and synthesis task rather than a static image-to-text problem.

The WebVIA Framework

The WebVIA framework consists of three integrated components designed to handle the full lifecycle of interactive UI generation.

The WebVIA Framework architecture, illustrating the interaction between the WebVIA-Agent, UI2Code model, and Validation Module.
  1. WebVIA-Agent (The Explorer): This agent interacts with a reference UI in a sandboxed environment. Using a hybrid search strategy, it discovers interactive elements and records "interaction traces"—sequences of screenshots and actions that define how the UI state evolves (e.g., opening a modal or switching tabs).
  2. WebVIA-UI2Code (The Builder): This component translates the captured interaction traces into executable React and Tailwind CSS code. It is specifically fine-tuned to map visual transitions to JavaScript logic, ensuring that the generated code is not just visually accurate but functionally complete.
  3. Validation Module (The Tester): To ensure reliability, a dedicated module executes the generated code and performs automated functional tests. It verifies that the intended workflows—such as search functionality or form submissions—operate correctly in the final output.

Experimental Setup and Datasets

To support the development of interactive agents, we introduced several new resources:

  • WebView: A synthetic dataset of 11,000 interactive webpages with ground-truth code.
  • UIExplore-Bench: A benchmark for evaluating an agent's ability to navigate and discover UI components.
  • UIFlow2Code-Bench: A benchmark for assessing the generation of multi-state, interactive code.

Results and Key Insights

WebVIA demonstrates superior performance across both exploration and code generation tasks.

Comparison of interactive UI2Code generation, highlighting the failure of baseline models to capture interactive states compared to the WebVIA approach.

Superior Exploration and Stability

On the UIExplore-Bench, the WebVIA-Agent achieved an overall score of 89.63%, significantly outperforming general-purpose models like Gemini 2.5 Pro (71.83%) and GPT-4o (52.87%). The agent's success stems from its structured perception-action-verification loop, which provides greater stability compared to the often erratic exploration patterns of non-specialized models.

Functional Code Synthesis

In the UIFlow2Code benchmark, our fine-tuned model reached a performance score of 84.9, surpassing state-of-the-art models like Claude-Sonnet-4 (82.1). Crucially, we observed that training on interactive data also improved performance on static layout tasks. This suggests that understanding the "movement" of a UI enhances the model's grasp of its underlying structure.

Conclusion and Future Work

WebVIA represents a shift toward verifiable, functional AI-driven web development. By moving beyond static images to interaction traces, we enable the generation of websites that actually work.

Future research will focus on expanding the agent's action space to include complex gestures like drag-and-drop and improving the scalability of the exploration process for large-scale applications. Additionally, addressing the synthetic bias by incorporating more diverse, real-world UI patterns will be critical for broader industrial adoption.

Summary updated

BibTeX
@misc{xu2025webvia,
  author = {Mingde Xu and Zhen Yang and Wenyi Hong and Lihang Pan and Xinyue Fan and Yan Wang and Xiaotao Gu and Bin Xu and Jie Tang},
  title = {{WebVIA: A Web-based Vision-Language Agentic Framework for Interactive and Verifiable UI-to-Code Generation}},
  year = {2025},
  eprint = {2511.06251},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.06251},
}
Figure