
2.8k stars · EPL-2.0 · 0.12.0 (2026-07-17) · Track this in Rising ↗
Eclipse Layout Kernel in JavaScript — the automatic graph layout React Flow does not ship, and the reason a 40-node map reads instead of tangling.
Radar check
What we found when we opened it. Every bar is one fact, with its date.
Last code pushed 19 Oct 2026, 8 days before this check.
Latest release 0.12.0 on 17 Jul 2026.
Public since July 2017, a little over 9 years.
2,851 stars and 127 forks.
25 commits and 1 new issues in the last 90 days.
26 contributors. 14 pull requests merged in 90 days.
No security policy file says how to report a problem. No published security advisories.
How the bars are scored
- Alive. Days since the last code push: a week or less 100, a month 90, three months 70, six months 50, a year 30, eighteen months 15, older 0.
- Releases. Age of the latest GitHub release, on a similar scale; no bar when the project publishes no releases.
- Maturity. Age of the project: eight years 100, five 90, three 70, two 55, one 40, six months 25, younger 10.
- Adoption. Stars on a log scale: 100,000 stars is 100, 10,000 is 80, 1,000 is 60, 100 is 40.
- Activity. Commits in the last 90 days: 300 or more 100, 100 85, 30 65, 10 45, any 25.
- Community. People who have contributed: 100 or more 100, 30 80, 10 60, 5 40, 2 25, one 10.
- Security. A published security policy 80, none 40; published advisories are listed, not scored.
Checked by Repo Radar on 26 Oct 2026 from the repository on GitHub. Covered in Edition 4.
▶Repo detailsthe review · specs · pros & cons · install
What it does
It computes positions for the boxes of a graph and routes for the arrows between them. Layered, tree, force, radial and box-packing arrangements are all included. The input is a plain description of boxes, arrows and sizes, and the output is coordinates. Around a hundred options are exposed, covering spacing, arrow routing and the order boxes appear in. It can run inside a Web Worker, which is a background thread in the browser, so laying out a large diagram does not freeze the page. It is a compiled build of the Eclipse Layout Kernel, a long-running research project written in Java. It draws nothing at all. There is no canvas, no SVG and no interaction, and a separate drawing library has to do that part.
Why it matters
Who it suits. Anyone building a diagram or a node view where the boxes have to arrange themselves. Diagram libraries faithfully draw whatever coordinates they are given, and forty boxes with no arrangement is a tangle of crossing lines, which is the fastest way to make clever software look unfinished. Skip it if the layout is a simple list or grid that a few lines of arithmetic will place.
Verdict. A small, unglamorous dependency that changes how software feels more than most features do. Start with the layered arrangement; it is the one that draws readable hierarchies with few crossing lines, and it is the engine behind the good-looking diagrams in several well-known tools. Three cautions. The licence is EPL-2.0, which is fine inside commercial software but worth five minutes of reading, and the npm package also offers a GPL option. The bundle is a Java-to-JavaScript build, so it is large and its error messages are close to useless. And there are dozens of terse option names, so expect one session of trial and error. dagre is the much smaller MIT alternative.
Summary (Key Points)from the README
Key features
- Layered algorithm: ELK's flagship layout is layer-based, suited to node-link diagrams with an inherent direction and ports.
- Multiple layout algorithms: The default set is layered, stress, mrtree, radial, force and disco, and the box, fixed and random layouters are always included.
- Web Worker support: Layouts can run in a Web Worker so the UI is not frozen, and this works out of the box in browsers.
- Promise-based API: `layout(graph, options)` returns a Promise that resolves to the laid-out graph or rejects with an error.
- Global and default options: Layout options can be set per element, passed globally in the layout call, or set as defaults in the constructor.
- Option discovery: `knownLayoutOptions()`, `knownLayoutAlgorithms()` and `knownLayoutCategories()` return metadata about the available options, algorithms and categories.
- Optional logging and timing: Since 0.6.0, `logging` and `measureExecutionTime` can be enabled to return debug output and execution times in seconds.
- Node.js and bundled builds: Works under node.js (via `require('elkjs')`) and in browsers through a browserify bundle that exposes a global variable.
- Debug builds: Non-minified versions are provided for stack traces and debugging.
Ways to install
| Platform or method | What it needs | Effort |
|---|---|---|
| Latest released version | The released package from npm | Low: install and import it |
| Development version | ELK's master branch, with a checkout of the ELK repository placed in the same directory as this repository | Higher: clone both repositories and build with Gradle, then use the files in the lib folder |
Important
- Not a diagramming framework: elkjs only computes positions. It provides no rendering, styling or editing.
- Optional web-worker package: Node.js Web Worker use needs the separate web-worker package, which is not installed automatically. Without it, elkjs falls back to the non-worker version and raises a warning.
- Execution time precision: Times are measured in milliseconds in JavaScript, so small graphs often report 0.
- Partial debugging support: Saving intermediate layout results is not available in elkjs.
- Option name ambiguity: Using only a layout option's suffix can cause it to be ignored if the suffix is not unique, so the full `elk.` prefix is recommended.
- Version divergence: Release revision numbers may differ from ELK's, so elkjs 0.3.2 is not guaranteed to match ELK 0.3.2.
- Known transpilation issues: The README lists GWT-related problems such as "g is not defined" and "Can't resolve web-worker", plus friction when using it with React, webpack and similar tools.
- Unresolved FAQ topics: Dynamic layout, incremental additions to an existing layout, and standalone edge routing are covered only through linked issues.
Written by an AI model from the project’s README; not part of the review, and it can be wrong.
- Decades of algorithm work behind it, rather than a weekend force simulation
- Runs in a background browser thread, so a large diagram never freezes the page
- Widely used with diagram libraries, so there is plenty of example code to copy
- EPL-2.0 is a weak-copyleft licence and worth reading before shipping
- A compiled Java-to-JavaScript bundle: large, and its error messages are useless
- Dozens of terse options, so expect a session of trial and error before it looks right
Compute it in a Web Worker, feed the coordinates to React Flow, and the map arranges itself the moment it loads.
npm install elkjs
