Engineering |

LitFlow: Bringing Graph Orchestration to Web Components

LitFlow is a framework-agnostic graph orchestration engine built with Lit and Signals to bring high-performance, node-based UIs to any web environment. By leveraging the xyflow core, it provides a lightweight, Material 3-styled solution for building complex, reactive architectural visualizations without framework lock-in. https://litflow.dev

LitFlow: Bringing Graph Orchestration to Web Components

The landscape of node-based UIs has long been dominated by framework-specific giants like React Flow. React Flow is exceptional, and there's a growing demand for the capabilities of a graph designer and for architectural visualizations that are framework-agnostic, lightweight, and capable of living inside any standard web environment.

Contributing to this open ecosystem, I've developed LitFlow, a Web Component-based implementation of the xyflow core, built with Lit and @lit-labs/signals.

Why Lit and Web Components?

When building systems that need to be embedded in various environments—like this blog, documentation sites, or enterprise dashboards—the "dependency tax" of a full framework like React can be heavy.

By using Lit, LitFlow offers:

  • Zero Framework Lock-in: Works in React, Vue, Angular, or just plain HTML.

  • Near-Native Performance: Leverages standard Custom Elements and efficient Shadow DOM patterns (where appropriate).

  • Lightweight Footprint: Small bundle size with high reactivity powered by the new Signals proposal.

The Architecture: Under the Hood

LitFlow isn't a rewrite of xyflow; it's a bridge. It leverages @xyflow/system, the headless core that powers both React Flow and Svelte Flow.

1. Light DOM for System Compatibility

A unique aspect of LitFlow is its use of Light DOM for nodes and handles. This is a deliberate choice to ensure that the xyflow system utilities (like hit-testing and drag detection) can "see" and interact with the elements without being blocked by Shadow DOM boundaries.

2. High-Performance Reactivity with Signals

Using @lit-labs/signals, LitFlow ensures that when a single node is dragged, only that node and its connected edges re-render. This fine-grained reactivity is crucial for maintaining 60fps performance in complex architecture diagrams.

3. Material 3 by Default

Design consistency is key for technical documentation. LitFlow comes with a built-in Material 3 theme, making it feel right at home in modern Google-aligned ecosystems.

Key Features

  • Interactive Viewport: Full support for panning, zooming, and "fit-view" controls.
  • Custom Node Types: Easily register any Custom Element as a node type to create domain-specific visualizations.
  • Multi-Handle Support: Complex logic gates and data flows with multiple input/output ports.
  • MiniMap & Controls: Built-in utility components for navigating large-scale system architectures.

The Road Ahead

LitFlow is more than just a graph renderer; it's the foundation for the Field Notes Manager and other AI-orchestration tools I'm building. The goal is to move from static architecture diagrams to live, interactive "Digital Twins" of our AI systems.

You can explore the source, browse examples, and contribute at github.com/ghchinoy/litflow and see more at the website litflow.dev

Acknowledgements

A huge thank you to Moritz, Christopher, and the xyflow team for their incredible work in open source and for building the foundation that made LitFlow possible.