Interactive Node Linking & Creation

Svelvet allows users to enable interactive node linking and creation in their diagrams. Initially, node linking and creation is not enabled by default. To access these features, add the nodeCreate prop to your Svelvet application. These do not have to be set equal to anything and can just be passed in. Adding these props will enable interactive node linking and creation. NOTE: To have full access to the node creation feature, node linking feature must also be passed down as a prop. Node anchors will turn red and the cursor will change to a crosshair to indicate that node linking or creation is enabled. If the user wishes to not create a node after clicking on the anchor simply go back to that anchor and release the mouse click.

PS: you can also link edges!

Implementing Node Linking & Creation

Click here for a sandbox, or test it out below!