Elestia Open Source Ratings
7.4

elkjs

A strong pick. 4th of 9 diagrams and node graphs.

elkjs is the JavaScript build of the Eclipse Layout Kernel (ELK). It computes node positions and edge routes for graphs, and you draw them with another tool. It is the strongest open-source layout engine in JavaScript for layered diagrams with ports, nested groups and routed edges. The costs are a large GWT-generated bundle and many options to learn.

Best for: Teams that need automatic, high-quality layout of flow charts, architecture or dataflow diagrams to feed a renderer such as React Flow or Svelte Flow.

GitHubnpm

Scores

Overall7.4

How strongly do we recommend it for a new project today?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

For automatic layout of complex node graphs it is the best open-source engine in JavaScript, and Mermaid and React Flow both use or recommend it. It does not draw anything itself, it is heavy, and it takes effort to configure. For simple trees, dagre is quicker to set up. That makes it a strong pick for a named kind of project rather than the category default.

GPT-6.2 Sol: 7.8, likely 6.7 to 8.8

elkjs is a strong starting point when a new graph editor needs automatic layout for nested nodes, fixed ports, or routed edges. Recent releases and use in Mermaid and Airflow support that choice, while configuration complexity and the worker size matter in a browser app. Dagre is simpler for basic directed layouts, and Mermaid or React Flow covers more of the job when the project also needs rendering or editing.

Needed by many3.7

How many developers need a tool for this job?

Claude Opus 5.5: 3.5, likely 2.5 to 5.0

Automatic graph layout is a clear niche inside the diagram category. Most developers meet it only indirectly, through Mermaid. Teams that build node editors, workflow tools or architecture views need it directly, and that group is real but not large.

GPT-6.2 Sol: 3.8, likely 2.7 to 4.9

Automatic layout solves a recurring problem in workflow editors, dependency viewers, and engineering diagrams. elkjs serves the subset of those projects that need a layout engine and can supply a renderer. State of JavaScript surveys graphics tools more broadly, so it gives little precision on the size of that subset.

Helps a lot8.0

How well does it do the job for those who need it?

Claude Opus 5.5: 7.5, likely 6.5 to 8.5

Its layered algorithm handles ports, nested nodes and edge routing, which is the best layout quality available in open-source JavaScript. React Flow's guide rates it above dagre on every feature it compares. The limits are a large GWT bundle, a hard-to-learn set of options, and GWT build errors that users run into. It ships TypeScript types and an async worker API.

GPT-6.2 Sol: 8.4, likely 7.3 to 9.4

Version 0.12.1 is particularly capable at layered layouts with explicit ports, nested groups, and routed edges. React Flow’s guide shows where those controls help and recommends Dagre for simpler trees. The reference is extensive, but string-based settings make mistakes easy for developers and coding agents to miss, and users report strict TypeScript and nested-graph failures. Airflow measured a sizable worker download, while layout speed across graph sizes is less well established.

Holds up over time7.2

Will it still be a good choice in two years?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

The KIELER group at Kiel University and the Eclipse ELK project back it. It had 77 commits and 3 releases in the last year, the newest in October 2026. Mermaid now depends on it directly, which ties it to a major tool. Releases follow ELK's slow academic pace, it is still 0.x, and 92 issues are open.

GPT-6.2 Sol: 7.4, likely 6.2 to 8.5

elkjs had 77 commits and three GitHub releases in the past year, with an October patch that follows a maintained Eclipse upstream. Mermaid’s adoption gives the JavaScript port a strong reason to stay maintained. One maintainer handled the three latest GitHub releases, and some integration issues have stayed open for over a year. The size and funding of the active JavaScript maintenance team remain unclear.

Used widely5.4

How many use it, and is that growing?

Claude Opus 5.5: 6.0, likely 5.0 to 7.0

Downloads grew 21x in a year (78.5M against 3.7M), far above the 4.1 median. Most of that comes from Mermaid now bundling it, not from developers choosing it. The 4,433 dependent repos are a better signal: close to Cytoscape.js and well ahead of dagre, Excalidraw and vis-network in this data. That points to tens of thousands of direct users, with a growing trend.

  • npm downloadsLast4Weeks: 78.5M vs 3.7M a year ago
  • dependents repos: 4,433 repos and 68 packages
  • github stars: 2,905 stars, low for its usage
  • bluesky posts: Only 2 posts; little social attention

GPT-6.2 Sol: 4.8, likely 3.5 to 6.2

Four-week npm downloads rose from 3.7 million to 78.5 million, about 21.2 times the prior year’s count and well above the 4.1 times catalog median. Mermaid now installs elkjs as a runtime dependency, so much of that growth may come from indirect installs. Ecosyste.ms found 4,433 dependent repositories, below Mermaid and Cytoscape.js and above Excalidraw in its sample. That puts elkjs among the more established layout engines, with substantial uncertainty about how quickly direct adoption is growing.

  • npm downloadsLast4Weeks, downloadsSame4WeeksYearAgo, medianDownloadsRatio: Raw installs grew 21.2 times against a 4.1 times catalog baseline.
  • github.com/mermaid-js/mermaid/blob/mermaid%4012.3.0/packages/mermaid/package.json: Mermaid 12.3.0 declares elkjs as a runtime dependency.
  • dependents and peers dependentRepos: 4,433 repositories and 68 packages in a partial index.
  • github stars and bluesky posts: 2,905 stars and two Bluesky links indicate modest attention relative to leading peers.
Vouched for7.6

Who stands behind it being good?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

Mermaid builds on it in its core package. React Flow and Svelte Flow document it as the full-featured layout option, and FINOS CALM chose it in a public decision record. The algorithms come from peer-reviewed graph-drawing research. No developer survey covers it, and there are few independent benchmarks.

GPT-6.2 Sol: 8.2, likely 7.0 to 9.1

Mermaid uses ELK by default for several diagram types, and Apache Airflow uses elkjs in its graph UI. React Flow independently demonstrates where its port and edge-routing controls earn the extra setup. These are concrete integrations, although broad satisfaction data and comparative runtime benchmarks are scarce.

Safe7.0

How safe is it to depend on?

Claude Opus 5.5: 7.0, likely 6.0 to 8.0

It has zero dependencies and no advisories on record. The Scorecard is a middling 5.1, with zeros for token permissions, pinned dependencies, security policy and SAST. The code is a large, generated bundle that is hard to audit. The EPL-2.0 or GPL-3.0 licence is weak copyleft: it allows commercial use, but some companies need a review before adopting it.

  • advisories total: 0 advisories
  • npm dependencies: 0 dependencies
  • scorecard score: 5.1 with several zero checks
  • npm license: EPL-2.0 OR GPL-3.0-or-later

GPT-6.2 Sol: 7.0, likely 5.8 to 8.2

The package has zero runtime npm dependencies, and OSV lists no advisories, though the project labelled 0.11.1 a security release. GitHub Actions publishes tagged releases to npm, while the 5.1 OpenSSF Scorecard flags weak workflow pinning and token permissions, as well as a missing security policy. The package is dual-licensed under EPL-2.0 or GPL-3.0-or-later, which permit commercial use and carry redistribution obligations. The number of people who can trigger a publish is unclear.

Good

  • Layered layout with ports, compound (nested) nodes and orthogonal edge routing that dagre cannot match.
  • Mermaid ships it as a dependency, and React Flow and Svelte Flow document it as their advanced layout option.
  • Zero npm dependencies and no known advisories.
  • Can run layout in a Web Worker, so large graphs do not block the UI.

Bad

  • The bundle is large and hard to tree-shake because the code is generated from Java with GWT.
  • There are hundreds of layout options, and the docs about them are dense and Java-centric, so getting a good result takes trial and error.
  • It computes layout only; you need a separate rendering or editing library.
  • The EPL-2.0 / GPL-3.0 licence is weak copyleft, which some legal teams flag. It is still 0.x after nine years.

The numbers

npm downloads, 4 weeks
78M ×21 in a year
GitHub stars
2.9k
Commits, 12 months
77
npm version
0.12.1 Oct 2026
Versions, 12 months
4
Advisories, 24 months
0 of 0 ever
OpenSSF Scorecard
5.1 out of 10, Nov 2026
Licence
EPL-2.0 OR GPL-3.0-or-later

Read on 21 November 2026 from GitHub (kieler/elkjs), npm (elkjs), OSV and the OpenSSF Scorecard.

Diagrams and node graphs

  1. 8.6React Flow
  2. 8.5Mermaid
  3. 7.6Cytoscape.js
  4. 7.4elkjs
  5. 7.4sigma.js
  6. 7.3Excalidraw
  7. 6.7dagre
  8. 6.7JointJS
  9. 6.3vis-network
Compare all 9 on six scores