Case study

Designing Reliable Arrow Routing for Excalidraw

Client
Excalidraw
Surface
Elbow arrow routing
Basis
A* pathfinding
Span
6 months
Excalidraw elbow arrows
Elbow arrow routing in Excalidraw

Excalidraw is an online whiteboard known for its hand-drawn, sketch-like aesthetic. That look is intentional, and it is a large part of why the product is widely used by professionals across IT, engineering, data analysis, and science. Despite the informal style, the work created in Excalidraw is often precise: diagrams, flows, and process maps where clarity matters.

One recurring friction point was diagramming arrows.

Straight arrows work on simple boards, but they become hard to follow as diagrams grow. Users with diagram-heavy workflows already worked around this by manually adding points to arrows and dragging them into 90-degree bends. It was slow, fragile, and error-prone, but it made one thing clear: this feature was badly needed.

The brief

Four non-negotiables.

From the start, we knew acceptance would depend on a few things the routing had to get right every time.

01The arrow should take the most direct route.
02It should use as few turns as possible.
03Arrowheads must approach diagram shapes cleanly.
04Paths must avoid overlapping connected shapes.

These constraints sound straightforward. In practice, subtle conflicts between them make it difficult to get all of them just right.

How we approached it

Not a one-shot implementation.

The basic functionality already existed as a prototype, but the client had realised the naive implementation was a dead end: the behavior of the arrows could not be tuned.

We explored existing approaches, chose a proven routing algorithm from the game industry as a base (A*) and then built the final algorithm on top of it, so the behavior could be explored and ultimately fitted to Excalidraw's needs.

The client was meticulous, and rightly so. Graphics behavior is inherently imprecise, and small edge cases quickly become visible at scale. Instead of hiding that complexity, we worked in tight feedback loops: validating behavior, surfacing tradeoffs, and adjusting constraints until the results were acceptable in practice.

Each iteration was evaluated not just on correctness, but on whether it felt right when used on real boards.
Outcome

A routing system that respects Excalidraw's visual language.

This project differed from most of our work. Arrow routing looks simple on the surface, but getting it to behave consistently under real-world constraints required sustained focus and deep algorithmic work.

The result meets or exceeds the performance and accuracy requirements we set out to achieve six months earlier.

120 Hz
Rendering held with ~50 arrows re-routing every frame
99%+
Wasted route-search iterations eliminated
Start here

Book an assessment.

One short call to understand how we can help and what's in the way.

We respond to every booking within 24 hours.