grid-router
Orthogonal edge routing on a grid — A*, bus joins and crossing hops for node-link diagrams.
Live demo
Why it exists
Node-link diagrams get ugly fast: lines cut through boxes, overlap each other and become unreadable. grid-router rasterizes the canvas into a grid and routes every edge with A* — each cell can host one horizontal and one vertical run, so lanes separate themselves and crossings only happen where they are worth paying for.
Edges that share a source and a bus merge into shared trunks (Steiner-style joins), like a real wiring loom. Crossings are disambiguated with hops — each bus cuts a small gap into the buses it crosses, so the line visually tunnels under. The core is framework-free; an optional Svelte 5 canvas lets you keep full ownership of the chips.
It scales to real diagrams
Schematics with named ports, org charts with merged reporting lines, pipeline maps detouring around keep-out zones, radial trees — all routed by the same engine.



