Skip to Content
💡 Legacy Notice: You're viewing Svelte Flow for Svelte 4. For the latest documentation, click here.
ExamplesNodesAdd Node On Edge Drop

Add Node On Edge Drop

You can create a new node when you drop the connection line on the pane by using the onConnectionStart and onConnectionStop handlers.

<script lang="ts"> import { SvelteFlowProvider } from '@xyflow/svelte'; import Flow from './Flow.svelte'; </script> <!-- You need the SvelteFlowProvider so you can useSvelteFlow --> <SvelteFlowProvider> <Flow /> </SvelteFlowProvider>
Last updated on