Skip to Content
✨ Svelte Flow 1.0 is here! Rewritten for Svelte 5 with many new features and improvements.

ELK.js Layout

This example demonstrates how to use ELK.js  for automatic graph layout in Svelte Flow. ELK.js is a powerful layout engine that can automatically arrange nodes and edges in various ways, such as hierarchical, force-directed, or circular layouts.

<script lang="ts"> import { SvelteFlowProvider } from '@xyflow/svelte'; import Flow from './Flow.svelte'; </script> <SvelteFlowProvider> <Flow /> </SvelteFlowProvider>
Last updated on