FlowDrop Docs
EditorSDK reference

Components

Key Svelte components exported by FlowDrop.

See them live in Storybook

Browse every component interactively — props, states, and variants — in the FlowDrop Storybook.

Editor components

App

Full-featured application wrapper with sidebar, editor, navbar, and config panel.

<script>
  import { App } from '@flowdrop/flowdrop/editor';
</script>

<App
  workflow={myWorkflow}
  nodes={nodeMetadataList}
  endpointConfig={config}
  authProvider={auth}
  showNavbar={true}
/>
PropTypeDefaultDescription
workflowWorkflow—Initial workflow to load
nodesNodeMetadata[]—Available node types (overrides API fetch)
endpointConfigEndpointConfig—API endpoint configuration
authProviderAuthProvider—Authentication provider
heightstring | number'100vh'Editor height
widthstring | number'100%'Editor width
showNavbarbooleanfalseShow the top navbar
disableSidebarbooleanfalseHide the node sidebar
mode'edit' | 'readonly' | 'locked''edit'Interaction mode; 'readonly'/'locked' disable all canvas editing
showSettingsbooleantrueShow settings gear in navbar
showStatusbooleantrueShow the "Connected" status indicator in the navbar
navbarTitlestring—Custom title in navbar
navbarActionsNavbarAction[]—Custom action buttons in navbar
pipelineIdstring—Pipeline ID for execution status display
themeFlowDropTheme | FlowDropThemeName—Visual theme — named built-in ('default'/'minimal') or a custom theme object
on* handlerssee below—Flat lifecycle callbacks: onBeforeSave, onAfterSave, onSaveError, onApiError, onWorkflowLoad, onBeforeSwap, onAfterSwap
featuresFlowDropFeatures—Feature flags
instanceFlowDropInstance—Per-instance state container; defaults to context, then the page-default instance

The <App> component takes flat on* event props. The grouped eventHandlers object is the mount API only — see Event Handlers.

WorkflowEditor

Core canvas component using SvelteFlow. Renders nodes and edges with drag-and-drop, zoom, pan, and minimap. It reads its nodes, edges, and dimensions from the instance state container rather than from props.

<script>
  import { WorkflowEditor } from '@flowdrop/flowdrop/editor';
</script>

<WorkflowEditor {endpointConfig} />
PropTypeDefaultDescription
endpointConfigEndpointConfig—API configuration
mode'edit' | 'readonly' | 'locked''edit'Interaction mode; 'readonly'/'locked' disable all canvas editing
openConfigSidebar(node: WorkflowNode) => void—Callback invoked when a node is clicked to open its config panel
pipelineIdstring—Pipeline ID for fetching node execution status
refreshTriggernumber0Increment to force a re-fetch of node execution status from the server
consoleOpenboolean—Whether the bottom console panel is open
onToggleConsole() => void—Callback to toggle the console panel
instanceFlowDropInstance—Per-instance state container; defaults to context, then the page-default instance

NodeSidebar

Left sidebar displaying available node types organized by category.

<script>
  import { NodeSidebar } from '@flowdrop/flowdrop/editor';
</script>

<NodeSidebar {nodes} />
PropTypeDefaultDescription
nodesNodeMetadata[][]Node types to display
selectedCategoryNodeCategory—Pre-select a category filter
activeFormatWorkflowFormat—Filter nodes by workflow format compatibility

UniversalNode

Dynamic node wrapper that resolves and renders the correct node component based on type. Automatically injects NodeStatusOverlay. Used internally by the editor.

Node components

All node components accept NodeComponentProps from the registry:

ComponentTypeDescription
WorkflowNodeComponentworkflowNodeFull-featured node with input/output port lists
SimpleNodesimpleCompact layout with header, icon, description
SquareNodesquareMinimal icon-only square design
ToolNodetoolAgent tool node with badge indicator
GatewayNodegatewayConditional branching with multiple output ports
TerminalNodeterminalCircular start/end node
NotesNodenoteSticky note with markdown content

See Node Types for visual examples.

Form components

SchemaForm

Renders a form from JSON Schema definition.

<script>
  import { SchemaForm } from '@flowdrop/flowdrop/form';
</script>

<SchemaForm
  schema={jsonSchema}
  values={formValues}
  onChange={(values) => {
    /* handle change */
  }}
/>

ConfigForm

Configuration form with support for dynamic schemas, template variables, and external edit links.

PropTypeDefaultDescription
nodeWorkflowNode—Node to configure (derives schema/values)
schemaConfigSchema—Direct JSON Schema (alternative to node)
uiSchemaUISchemaElement—Layout definition for the form
valuesRecord<string, unknown>—Configuration values
showUIExtensionsbooleanfalseShow UI extension fields
workflowIdstring—For dynamic schema and variable API requests
workflowNodesWorkflowNode[]—All nodes (for template variable resolution)
workflowEdgesWorkflowEdge[]—All edges (for template variable resolution)
authProviderAuthProvider—Auth for API requests
onChangefunction—Called on any field change
onSavefunction—Called when form is saved
onCancelfunction—Called when form is cancelled

ConfigPanel

Generic panel wrapper for displaying details and a configuration form.

PropTypeDefaultDescription
titlestring—Panel title
idstring—Entity identifier
descriptionstring—Description text
detailsDetailItem[]—Key-value detail rows
configTitlestring—Config section title
onClosefunction—Close callback
childrenSnippet—Slot for form content

Field components

ComponentSchema MatchDescription
FormTextFieldtype: "string"Text input
FormTextareaformat: "multiline"Multi-line text
FormNumberFieldtype: "number" / "integer"Number input
FormToggletype: "boolean"Toggle switch
FormSelectenum or oneOfSelect dropdown
FormCheckboxGroupenum + multiple: trueCheckbox group
FormRangeFieldformat: "range"Range slider
FormArraytype: "array"Dynamic array editor
FormCodeEditorformat: "json"JSON/code editor (requires form/code)
FormTemplateEditorformat: "template"Template editor with variables (requires form/code)
FormMarkdownEditorformat: "markdown"Markdown editor (requires form/markdown)

Display components

MarkdownDisplay

Renders markdown content using the marked library.

<script>
  import { MarkdownDisplay } from '@flowdrop/flowdrop/display';
</script>

<MarkdownDisplay content="**Hello** world" />

Playground components

Playground

Full interactive playground with chat interface and session management.

PropTypeDefaultDescription
workflowIdstring—Workflow to test (required)
workflowWorkflow—Pre-loaded workflow data
modePlaygroundMode'standalone''standalone' or 'embedded'
initialSessionIdstring—Resume a previous session
endpointConfigEndpointConfig—API configuration
configPlaygroundConfig—Playground options
onClosefunction—Close callback (for embedded mode)
instanceFlowDropInstance—Per-instance state container; defaults to context, then the page-default instance

Interrupt components

ComponentInterrupt TypeDescription
InterruptBubbleAllContainer that renders the correct prompt
ConfirmationPromptconfirmationYes/No approval
ChoicePromptchoiceSelection from options
TextInputPrompttext_inputText entry
FormPromptformJSON Schema form
ReviewPromptreviewField change review with diffs

Settings components

ThemeToggle

Button to cycle through light/dark/auto themes.

<script>
  import { ThemeToggle } from '@flowdrop/flowdrop/settings';
</script>

<ThemeToggle />

SettingsPanel

Tabbed settings interface for managing user preferences across categories (theme, editor, UI, behavior, API). Can be embedded anywhere in your layout.

<script>
  import { SettingsPanel } from '@flowdrop/flowdrop/settings';
</script>

<SettingsPanel
  categories={['theme', 'editor', 'ui']}
  showSyncButton={false}
  showResetButton={true}
  onSettingsChange={(category, values) => {
    /* handle change */
  }}
  onClose={() => {
    /* handle close */
  }}
/>
PropTypeDefaultDescription
categoriesSettingsCategory[]All categoriesWhich tabs to display. Options: "theme", "editor", "ui", "behavior", "api"
showSyncButtonbooleantrueShow the "Sync to Cloud" button in the footer
showResetButtonbooleantrueShow the reset/reset-all buttons in the footer
onSettingsChangefunction—Called when any setting changes with (category, values)
onClosefunction—Close callback (also renders a "Close" button in the footer)
classstring—Custom CSS class

SettingsModal

Modal dialog wrapper around SettingsPanel. Provides backdrop, close-on-escape, and open/close animations.

<script>
  import { SettingsModal } from '@flowdrop/flowdrop/settings';
  let open = $state(false);
</script>

<button onclick={() => (open = true)}>Open Settings</button>
<SettingsModal bind:open showSyncButton={false} />
PropTypeDefaultDescription
openbooleanfalseWhether the modal is open (bindable)
categoriesSettingsCategory[]All categoriesWhich tabs to display
showSyncButtonbooleantrueShow the "Sync to Cloud" button
showResetButtonbooleantrueShow the reset buttons
onClosefunction—Called when the modal is closed
onSettingsChangefunction—Called when any setting changes
classstring—Custom CSS class for the modal

Hiding features

To hide the cloud sync button (e.g. for self-hosted deployments):

<SettingsModal bind:open showSyncButton={false} />

To show only specific settings categories:

<SettingsModal bind:open categories={['theme', 'editor']} />

Vanilla JS / mountFlowDropApp

When using the vanilla JS mount API, pass settings modal options via FlowDropMountOptions:

import { mountFlowDropApp, createEndpointConfig } from '@flowdrop/flowdrop';

const app = await mountFlowDropApp(document.getElementById('editor'), {
  endpointConfig: createEndpointConfig('/api/flowdrop'),
  showSettings: true,

  // Customize the settings modal
  settingsCategories: ['theme', 'editor', 'ui'], // hide Behavior & API tabs
  showSettingsSyncButton: false, // hide "Sync to Cloud"
  showSettingsResetButton: true // show reset (default)
});
OptionTypeDefaultDescription
showSettingsbooleantrueShow the settings gear icon in the navbar
settingsCategoriesSettingsCategory[]All categoriesWhich tabs to display in the settings modal
showSettingsSyncButtonbooleantrueShow the "Sync to Cloud" button
showSettingsResetButtonbooleantrueShow the reset buttons

Status components

ComponentDescription
NodeStatusOverlayDisplays execution status on nodes (pending, running, completed, error)
StatusIconColor-coded status icon
PipelineStatusFull pipeline execution view with logs sidebar

Component hierarchy

App
├── Navbar (Logo, workflow name, save/export, custom actions)
├── NodeSidebar (search, category groups, draggable node cards)
├── WorkflowEditor (SvelteFlow canvas)
│   └── UniversalNode
│       ├── NodeStatusOverlay
│       └── [Node Component] (WorkflowNode, SimpleNode, etc.)
└── ConfigSidebar
    └── ConfigForm (JSON Schema form with template variables)

On this page