# diagram-js

> A toolbox for displaying and modifying diagrams on the web

Latest version **15.26.0** (published 2026-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install diagram-js
pnpm add diagram-js
yarn add diagram-js
bun add diagram-js
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 15.26.0 |
| Published | 2026-08-28 |
| First published | 2014-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | * |
| Dependencies | 9 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1922 |
| Author | Nico Rehwaldt |
| Maintainers | bpmn-io-admin, nikku, barmac, philippfromme, maxtru, skaiir-camunda, vsgoulart, barinali, ev-camunda, jarekdanielak, alekseymanetov |
| Keywords | modeler, modeling, canvas, diagram-js |

## Links

- npm: https://www.npmjs.com/package/diagram-js
- Repository: https://github.com/bpmn-io/diagram-js
- Homepage: https://github.com/bpmn-io/diagram-js#readme
- Issues: https://github.com/bpmn-io/diagram-js/issues
- npm.io page: https://npm.io/package/diagram-js

## Dependencies (9)

- [clsx](https://npm.io/package/clsx.md) ^2.1.1
- [didi](https://npm.io/package/didi.md) ^11.0.0
- [min-dom](https://npm.io/package/min-dom.md) ^5.3.0
- [min-dash](https://npm.io/package/min-dash.md) ^5.1.0
- [tiny-svg](https://npm.io/package/tiny-svg.md) ^4.1.4
- [object-refs](https://npm.io/package/object-refs.md) ^0.4.0
- [inherits-browser](https://npm.io/package/inherits-browser.md) ^0.1.0
- [path-intersection](https://npm.io/package/path-intersection.md) ^4.1.0
- [@bpmn-io/diagram-js-ui](https://npm.io/package/@bpmn-io/diagram-js-ui.md) ^0.2.4

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 15.26.0 (latest) — 2026-08-28
- 16.0.0-esm.2 (next) — 2026-06-08
- 15.0.0-alpha-keyboard (alpha-keyboard) — 2024-09-10
- 7.9.0 (backports) — 2022-08-17
- 7.4.0-subprocesses.0 (exp) — 2021-09-02
- 15.25.0 — 2026-08-28
- 15.24.1 — 2026-08-18
- 15.24.0 — 2026-08-11
- 15.23.2 — 2026-07-29
- 15.23.1 — 2026-07-29
- 15.23.0 — 2026-07-23
- 15.22.0 — 2026-07-13
- 15.21.0 — 2026-07-10
- 15.20.1 — 2026-07-08
- 15.20.0 — 2026-07-08
- … 308 more at https://npm.io/package/diagram-js/versions

## README

# diagram-js

[![CI](https://github.com/bpmn-io/diagram-js/workflows/CI/badge.svg)](https://github.com/bpmn-io/diagram-js/actions?query=workflow%3ACI)

A toolbox for displaying and modifying diagrams on the web.


## Built with diagram-js

Some libraries / applications built on top of diagram-js:

#### Part of [bpmn.io](https://bpmn.io/)

* [bpmn-js](https://github.com/bpmn-io/bpmn-js) - A BPMN 2.0 viewer / modeler ([Demo](https://demo.bpmn.io/bpmn))
* [cmmn-js](https://github.com/bpmn-io/cmmn-js) - A CMMN 1.1 viewer / modeler ([Demo](https://demo.bpmn.io/cmmn))
* [dmn-js](https://github.com/bpmn-io/dmn-js) - A DMN 1.3 viewer / modeler / table editor ([Demo](https://demo.bpmn.io/dmn))

#### External

* [Apache Seata Saga Designer](https://github.com/apache/incubator-seata/tree/2.x/saga/seata-saga-statemachine-designer) - A visual orchestration tool for Seata Saga transaction ([Demo](https://seata.apache.org/saga-designer/))
* [archimate-js](https://github.com/archimodel/archimate-js) - An ArchiMate diagram viewer and editor ([Demo](https://archimodel.net))
* [chor-js](https://github.com/bptlab/chor-js) - A BPMN 2.0 Choreography diagram viewer and editor ([Demo](https://bpt-lab.org/chor-js-demo/))
* [Node Sequencer](https://github.com/philippfromme/node-sequencer) - A Node-Based Sequencer for the Web ([Demo](https://philippfromme.github.io/node-sequencer-demo/))
* [object-diagram-js](https://github.com/timKraeuter/object-diagram-js) - An object diagram viewer and editor ([Demo](https://timkraeuter.com/object-diagram-js/))
* [postit-js](https://github.com/pinussilvestrus/postit-js) - Create Post-it boards on a canvas editor ([Demo](https://postit-js-demo.netlify.app/))

## Resources

* [Issues](https://github.com/bpmn-io/diagram-js/issues)
* [Changelog](./CHANGELOG.md)
* [Contributing Guide](.github/CONTRIBUTING.md)
* [Examples](https://github.com/bpmn-io/diagram-js-examples)


## Development

Prepare the project by installing all dependencies:

```sh
npm install
```

Then, depending on your use-case you may run any of the following commands:

```sh
# build the library and run all tests
npm run all

# run the development setup
npm run dev

# run tests (single run)
npm test
```

Expose an environment variable `TEST_BROWSERS=(Chrome|Firefox)` to execute the tests in a non-headless browser.

> [!NOTE]
> We do not generate any build artifacts. Required parts of the library should be bundled by consuming libraries as needed instead.


## License

MIT

---
_Source: https://npm.io/package/diagram-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
