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, canEdit, readOnly, locale, ribbonAddIns, collaboration, storage, fileProviders, customization, events) and the handle are identical in every framework: see the binding contract and the viewer API. To compose your own UI from the viewer's parts instead, see the building blocks; to share a drawing, see collaboration. Try the Vanilla JavaScript demo.