@worksheet-js/draw
v1.0.0
Published
Zero-dependency diagramming engine for WorksheetJS — flowcharts, org charts, draw.io-style canvas.
Maintainers
Readme
@worksheet-js/draw
Zero-dependency diagramming engine for the modern web.
Install
npm install @worksheet-js/drawNo runtime dependencies — the engine renders to a single <canvas> and ships its own UI chrome.
Quick start
import { Draw } from '@worksheet-js/draw';
const draw = new Draw(document.getElementById('app')!, {
theme: 'light',
grid: true,
snapToGrid: true,
fileName: 'Untitled diagram',
});Features
- Shapes — flowchart, BPMN, UML, ER, network, UI-mockup, infographic and infrastructure libraries.
- Edges — straight, orthogonal (obstacle-avoiding) and curved connectors with floating perimeter anchors.
- Layouts —
TreeLayoutandRadialLayoutfor automatic arrangement. - Templates — ready-made starting diagrams via
getAllTemplates()/getTemplate()/TEMPLATES. - Import / Export —
DrawioImporter,DrawioExporter, plusSVGExporter,PNGExporterandPDFExporter. - Extras —
MinimapandPresentationMode.
// Built-in convenience exporters on the instance:
const svg = draw.toSVG();
const xml = draw.exportDrawio();
const png = await draw.toPNG();Full API, options, events, and architecture notes on worksheetjs.com.
License
Proprietary. Usage is subject to the EULA.
