diff_component
Render two versions of a UI component, compare them pixel by pixel, and get a diff image with the percentage of changed pixels to catch visual regressions during refactoring.
Instructions
Visual regression test: render before/after code and return a pixel diff image with percentage changed. Use this during refactoring to catch unintended visual changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| before | Yes | Component code BEFORE the change | |
| after | Yes | Component code AFTER the change | |
| framework | No | Framework: html, react, vue, or svelte | react |
| width | No | Viewport width (px) | |
| height | No | Viewport height (px) |