Skip to main content
FlowDrop ships with 7 built-in node types, but you can register your own custom node components to extend the editor.

Overview

Registration happens against the instance’s node registry, fd.nodes (a NodeComponentRegistry). There are three methods: Custom node types are namespaced (e.g., "mylib:code-editor") to prevent conflicts. Resolve fd with getInstance() inside the component tree, or use the mount handle’s .instance outside it. You can register before or after mounting.
BaseRegistry tracks a version counter that invalidates dependent $derived reads. When you register a node after mount, the counter bumps and the editor re-resolves, so late registrations take effect.

Quick start

1. Write a Svelte component:
2. Register it:
3. Make it available in the sidebar by passing NodeMetadata with a matching type:

NodeComponentProps

All custom node components must accept:

Plugin registration

Register multiple nodes under a shared namespace:

Fluent builder

Plugin management

Plugin lifecycle is managed on fd.nodes; isValidNamespace remains a standalone helper:
Namespace rules: Must match /^[a-z][a-z0-9-]*$/ — lowercase letters, digits, and hyphens, starting with a letter.

Built-in node types

If no custom component is registered for a type, FlowDrop falls back to built-in types: Use supportedTypes on NodeMetadata to let users switch between visual types at runtime.