AnimWeb-Bench: Benchmarking Animated Webpage Code Generation from Videos

Zhongyi Zhang, Jingyu Xiao, Shuqing Li, Michael R. LyuarXiv 2026 · arXiv

TL;DR

AnimWeb-Bench is the first benchmark designed to evaluate how well AI models can generate functional webpage code from a reference video of an animated site. While current Multimodal Large Language Models (MLLMs) are becoming adept at recreating static layouts, this research reveals they still struggle significantly with the continuous temporal dynamics—timing, easing, and trajectories—that define the modern web.

What Problem Does This Paper Address?

The "screenshot-to-code" pipeline has seen massive improvements recently, with models like GPT-4o and Claude 3.5 Sonnet capable of turning a static image into a decent HTML/CSS layout. However, the web isn't static. Over 75% of webpages utilize CSS animations to provide feedback, direct attention, or simply enhance aesthetics.

Existing benchmarks typically focus on static screenshots or discrete, user-triggered interactions (like clicking a button). They ignore the continuous dynamics of time-driven animations that unfold automatically during page load. Reconstructing these requires a model to not only understand what is on the page but how and when every element moves. AnimWeb-Bench fills this gap by challenging models to generate a single, executable HTML file (including inline CSS and JavaScript) that reproduces a reference video's visual and motion characteristics.

Methods

The authors developed a comprehensive pipeline for both task definition and evaluation:

  1. Task Definition: Given a reference video and a set of static assets (images, icons), a model must generate code. This code is then rendered in a browser to produce a "generated video" for comparison.
  2. Keyframe Alignment: To avoid the redundancy of comparing every single frame, the system automatically detects "stable states" (keyframes) and "animation phases" (segments between keyframes) using a visual similarity curve.
  3. Two-Dimensional Evaluation Protocol:
    • Static Appearance Fidelity: Measures how well the generated keyframes match the reference in terms of structure (box overlap), text (OCR), color, and high-level visual similarity (CLIP).
  4. Animation Fidelity: This is the novel core. It tracks UI components across frames to compare their Position, Size, Velocity, and Appearance (CLIP) against the reference trajectories.
Figure 1: Overview of the AnimWeb-Bench task and evaluation. Given a reference video and the static assets of a real webpage (top), an MLLM or coding agent generates a single HTML file, which is rendered and recorded in a browser (bottom). Static Appearance Fidelity compares aligned keyframes. Animation Fidelity compares the trajectories of matched UI components.

Datasets

The authors introduced AnimWeb-Bench, which consists of:

  • 124 real-world webpages sourced from Awwwards, a showcase for high-end web design.
  • 7 application domains (Technology, Media, Design, etc.) and 33 distinct animation types (e.g., translation, masking, text scramble).
  • High Complexity: Unlike previous "motion graphics" datasets that used simple snippets, AnimWeb-Bench pages average nearly 1,200 HTML tags, compared to just ~70 in earlier benchmarks like Animation2Code.
The construction pipeline for AnimWeb-Bench, from sourcing to quality control.

Key Insights and Ideas

  • "Systems Look Right but Move Wrong": Models often achieve respectable scores on static appearance but fail miserably on animation fidelity. Velocity is consistently the lowest-scoring metric, indicating that models struggle to capture the "feel" and speed of motion.
  • Perception is the Bottleneck: Coding agents (models that can use tools) perform better when they are explicitly told to inspect high-resolution frames individually rather than looking at low-res "contact sheets" of video frames.
  • The Power of the Loop: Providing "Render Feedback"—allowing an agent to record its own generated code and compare it to the reference—significantly improves animation quality. It allows the agent to "see" its timing errors and iterate.
  • Continuous vs. Discrete: Rapid, continuous changes (like a "Text Scramble" effect) are much harder for AI to reproduce than discrete state transitions (like a simple "Fade In"). The former requires precise frame-by-frame synchronization that current models cannot yet express in code.

Key Results

The study evaluated 14 MLLMs and 3 coding agents.

  • Top Performer: GPT-6 Astra (a placeholder name for the state-of-the-art model at the time of writing) led the pack, but even it scored below 0.46 on all animation metrics.
  • The "Velocity" Gap: While static CLIP scores reached ~0.88 for top models, Velocity scores hovered around 0.30, highlighting the difficulty of temporal reconstruction.
  • Agentic Gains: A coding agent (Codex) using Frame Inspection (FI) and Render Feedback (RF) saw relative gains of up to 22% in static metrics and 15% in animation metrics compared to a single-pass approach.
  • Human Alignment: The automated metrics showed a strong correlation (Spearman’s $\rho = 0.67–0.74$) with 400 pairwise human judgments, validating the benchmark's utility.

Limitations and Future Work

The authors acknowledge several areas for growth:

  • Low Absolute Performance: Even the best models are far from "perfect" reconstruction, suggesting that temporal visual understanding is still a major frontier for MLLMs.
  • Interaction Complexity: While this benchmark focuses on time-driven animations, future versions could incorporate complex user-triggered sequences (e.g., drag-and-drop or multi-step forms).
  • Code Efficiency: The benchmark evaluates visual output but doesn't deeply penalize "spaghetti code" or inefficient JavaScript, provided the visual result is correct. Future work could integrate code quality metrics.

By providing a rigorous way to measure "motion fidelity," AnimWeb-Bench sets a new bar for the next generation of AI web developers.

Summary updated

Abstract

Animation is pervasive on the Web, the CSS animation property alone appears on over three-quarters of webpages. Yet existing webpage code generation benchmarks target static screenshots, user-triggered interactions, or isolated motion graphics, leaving the ability of multimodal large language models (MLLMs) and coding agents to reconstruct complete animated webpages largely unexplored. To fill this gap, we introduce AnimWeb-Bench, the first benchmark for animated webpage code generation from videos. It comprises 124 real-world webpages spanning 7 application domains and 33 animation types, with 91.9% of pages combining multiple types, each paired with a reference video and the static assets of the original webpage. We further propose a human-aligned, two-dimensional evaluation protocol: Static Appearance Fidelity measures structure, text, color, and visual similarity on aligned keyframes, while Animation Fidelity tracks UI components across frames and compares their position, size, velocity, and appearance with those in the reference video. Evaluating 14 MLLMs and three coding agents reveals: (1) reproducing webpage animations is substantially more difficult than reproducing static appearance; (2) explicit frame inspection and render feedback improve the reconstruction quality of coding agents; and (3) rapid, continuous changes are harder to reproduce than discrete state transitions. Our code and dataset are available at https://starry1001.github.io/AnimWeb-Bench-website/ .
BibTeX
@misc{zhang2026animweb,
  author = {Zhongyi Zhang and Jingyu Xiao and Shuqing Li and Michael R. Lyu},
  title = {{AnimWeb-Bench: Benchmarking Animated Webpage Code Generation from Videos}},
  year = {2026},
  eprint = {2611.09769},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.09769},
}
Figure