Skip to Content
🚨 New Example: Handling Node Collisions!
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 onConnectStart and onConnectEnd 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