Vanilla JavaScript
visio-vanilla-viewer gives you the shared <visio-viewer> as a native Vanilla JavaScript integration.
bash
npm install visio-vanilla-viewerts
import { mountViewer } from 'visio-vanilla-viewer';
const viewer = mountViewer(host, {
document: diagram,
zoom: 1,
events: { 'document-error': console.error },
});
viewer.update({ pageIndex: 1 });
await viewer.load(file);
viewer.destroy(); // idempotentmountViewer returns the full shared binding with update() and an idempotent destroy().
The properties (document, pageIndex, zoom, showToolbar, events) and the handle are identical in every framework: see the binding contract and the viewer API. Try the Vanilla JavaScript demo.