Skip to Content
New: @blazediff/agent - agentic visual regression your coding agent can judge. Read more β†’

Vanilla Components

Use the BlazeDiff UI renderer (mount* functions) in vanilla JS - or drive the headless engine from any framework. Every example below is live and runs right on this page.

Installation

npm install @blazediff/ui
import { mountSwipe } from "@blazediff/ui"; mountSwipe(document.getElementById("app"), { src1: "before.png", src2: "after.png", onPositionChange: (position) => console.log(position), });

Each mount* call returns a { update, destroy } handle - call update(options) to change sources or options in place, and destroy() to remove the UI. See the full API reference β†’.

Last updated on