Description
js is an infinite canvas library for building diagramming and drawing features into an application. It supports smart shapes that can be defined with scripts, constraints and extended properties, so you can make diagrams with complex notations. Shape constraints control behaviour such as alignment, visibility and sizing, and shape scripts are written in a small Lisp-like language to define how a shape is drawn or outlined. Shapes can be drawn in a hand-drawn style or a solid style, which is useful when you want a low-fidelity sketch rather than a polished diagram. The library uses roughjs for the hand-drawn look. Real-time collaboration is available through a Yjs plugin, which synchronises documents and shows multiple cursors and selections. Freehand drawing is powered by perfect-freehand, with control over the thinning and taper of strokes. Canvases can be exported as PNG or SVG, copied to the clipboard, and saved as JSON, which the site describes as simple to read and write. A document can have several pages with different sizes, such as infinite, 4:3 or 16:9.…
Highlights
- Infinite canvas with smart shapes
- Shape scripts and constraints
- Hand-drawn and solid styles
- Real-time collaboration with Yjs
- PNG, SVG and JSON export
Ratings & Reviews
No ratings yet
Be the first to rate DGM.js.
People also visit
Flowchart.js
Draws simple SVG flow chart diagrams from textual representation of the diagram
DGM.js FAQ
What is DGM.js?
A multi-purpose infinite canvas library that supports smart shapes, real-time collaboration, hand-drawn styles and image export.
Is it free?
The project is on GitHub. The site lists a license link, and the README describes it as open source.
Can several people edit at once?
Yes. The Yjs plugin supports real-time synchronisation, multiple cursors and selections.
What export formats are available?
PNG and SVG exports, clipboard copy, and JSON for saving or importing shapes.
Does it support dark mode?
Yes. The site says colours adapt automatically, and drawings made in light mode display in dark mode.
Can I make my own shapes?
Yes. You can define smart shapes with scripts, constraints and extended properties.
What are the best DGM.js alternatives?
Popular alternatives to DGM.js include Excalidraw, tldraw and SVG Drawing. See all DGM.js alternatives





