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/uiswipe-mode
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