@flowdrop/flowdrop

中文文档
2.18.0发布于 2026/11/11MITTypeScriptES Module近 30 天下载 2082

A drop-in visual workflow editor for any web application. You own the backend. You own the data. You own the orchestration.

原始使用文档
文档目录22 节
  1. Why FlowDrop?
  2. Quickstart
  3. Features
  4. Architecture Notes
  5. Node Types
  6. Themes
  7. Customising messages
  8. Sub-Module Exports
  9. OpenAPI spec
  10. Integration
  11. Svelte (Native)
  12. Vanilla JS / React / Vue / Angular
  13. Enterprise Integration
  14. API Configuration
  15. Customization
  16. Deploy
  17. Docker (Recommended)
  18. Node.js
  19. Specification
  20. Documentation
  21. Development
  22. Contributing

FlowDrop

FlowDrop™

GitHub build status npm NPM Unpacked Size npm type definitions NPM Downloads

Build beautiful workflow editors in minutes, not months.

An awesome workflow editor built with Svelte 5 and @xyflow/svelte.
You own the backend. You own the data. You own the orchestration.

Quickstart • Features • Integration • Docs

FlowDrop Screenshot

Build AI-powered workflows with drag-and-drop simplicity. Connect nodes, configure inputs/outputs, and visualize your entire pipeline.

Why FlowDrop?

Most workflow tools are SaaS platforms that lock you in. Your data lives on their servers. Your execution logic runs in their cloud. You pay per workflow, per user, per run.

FlowDrop is different.

FlowDrop is a pure visual editor. You implement the backend. You control the orchestration. Your workflows run on your infrastructure, with your security policies, at your scale.

No vendor lock-in. No data leaving your walls. No surprise bills.

npm install @flowdrop/flowdrop

Note: FlowDrop supports multiple editor instances per page — each mount gets its own isolated state container. See Architecture Notes for details.

You get a production-ready workflow UI. You keep full control of everything else.

Quickstart

<script lang="ts">
  import { App } from '@flowdrop/flowdrop';
  import '@flowdrop/flowdrop/styles/base.css';
</script>

<App />

5 lines. One fully-functional workflow editor.

Features

Visual Editor OnlyPure UI component. No hidden backend, no external dependencies
You Own EverythingYour data, your servers, your orchestration logic, your security policies
Backend AgnosticConnect to any API: Drupal, Laravel, Express, FastAPI, or your own
8 Built-in Node TypesFrom simple icons to complex gateway logic
Framework FlexibleUse as Svelte component or mount into React, Vue, Angular, or vanilla JS
Deploy AnywhereRuntime config means build once, deploy everywhere

Architecture Notes

  • Multiple instances per page. Each mount gets its own FlowDropInstance state container (workflow, undo/redo history, playground sessions, registries, API context, drafts), so editors on the same page are fully isolated. In 2.0 there are no module-level store APIs — resolve state with getInstance() inside the component tree or the mount handle's .instance outside it. The first mount without an instanceId becomes the page-default instance; pass instanceId to additional mounts to scope their draft/panel storage keys. Theme and settings remain page-global by design.
  • Svelte 5 required. FlowDrop uses Svelte 5 runes ($state, $derived, $effect) throughout. Svelte 4 is not supported.
  • Modern browsers only. The library targets ES2020+ and does not include polyfills for older browsers.

Node Types

FlowDrop ships with 8 beautifully designed node types:

TypePurpose
defaultFull-featured nodes with inputs/outputs
simpleCompact, space-efficient layout
squareIcon-only minimal design
toolAI agent tool nodes
gatewayConditional branching logic
terminalStart/end workflow points
noteMarkdown documentation blocks
ideaConceptual BPMN-like flow nodes

FlowDrop Node Types

From simple triggers to complex branching logic, each node type is designed for specific workflow patterns.

Themes

FlowDrop includes a theme system with built-in light/dark support:

<script lang="ts">
  import { App } from '@flowdrop/flowdrop';
  import '@flowdrop/flowdrop/styles';
</script>

<!-- Built-in themes: 'default' or 'minimal' -->
<App theme="minimal" />

Themes bundle a visual skin (CSS token palette) with behavioral UI defaults. You can also pass a custom theme object with your own skin tokens for full control over the light and dark palettes.

// Via the mount API
const app = await mountFlowDropApp(container, {
  theme: 'minimal'
  // or a custom theme object:
  // theme: { name: 'minimal', skin: { tokens: { primary: '#e11d48' } } }
});

Customising messages

Every user-facing string flows through a typed Messages tree. Pass a callback to override any subset:

<App messages={() => ({ form: { schema: { save: 'Apply' } } })} />

Wire the callback to your i18n library (paraglide-js, sveltekit-i18n, etc.) — locale changes propagate automatically. See the i18n & Custom Messages guide for the full shape and a paraglide-js worked example.

Sub-Module Exports

FlowDrop provides tree-shakeable sub-module exports so you can import only what you need:

Export PathContents
@flowdrop/flowdropSlim front door: App, mount functions, createFlowDropInstance, getInstance, auth providers, core bootstrap types
@flowdrop/flowdrop/coreTypes and utilities only (no heavy dependencies)
@flowdrop/flowdrop/editorWorkflowEditor, stores, services
@flowdrop/flowdrop/formSchemaForm, form fields, registry
@flowdrop/flowdrop/form/codeCode editor field (CodeMirror)
@flowdrop/flowdrop/form/markdownMarkdown editor field
@flowdrop/flowdrop/displayMarkdownDisplay component
@flowdrop/flowdrop/uiDesign-system components: primitives, surfaces, Input, Textarea (experimental in 2.x)
@flowdrop/flowdrop/playgroundPlayground components and services
@flowdrop/flowdrop/settingsSettingsPanel, stores, services
@flowdrop/flowdrop/stylesBase CSS stylesheet
@flowdrop/flowdrop/schemaWorkflow JSON schema
@flowdrop/flowdrop/openapiOpenAPI spec (YAML) for the FlowDrop backend API
@flowdrop/flowdrop/webmcpWebMCP editor tools for browser agents: attachWebMCP, createToolRuntime, approval gate (experimental in 2.x)

Entries marked experimental may change in a minor release while their API settles; every change is listed in the CHANGELOG. Pin a minor version (~2.16.0) if you depend on one. All other entries follow semantic versioning.

OpenAPI spec

The full OpenAPI spec for the FlowDrop backend API ships with the package, version-matched to your installed release. It defines the node-config / form-element schema (ConfigProperty), playground messages, and every endpoint. Resolve it from @flowdrop/flowdrop/openapi, or read it directly at node_modules/@flowdrop/flowdrop/dist/openapi/v1/openapi.yaml. Point your AI assistant at that file when authoring node config schemas. The latest spec is also browsable at api.flowdrop.io.

Integration

Svelte (Native)

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

<div class="flex h-screen">
  <NodeSidebar {nodes} />
  <WorkflowEditor />
</div>

Vanilla JS / React / Vue / Angular

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

const app = await mountFlowDropApp(document.getElementById('editor'), {
  workflow: myWorkflow,
  endpointConfig: createEndpointConfig('/api/flowdrop'),
  eventHandlers: {
    onDirtyStateChange: (isDirty) => console.log('Unsaved changes:', isDirty),
    onAfterSave: (workflow) => console.log('Saved!', workflow)
  }
});

// Full control over the editor
app.save();
app.getWorkflow();
app.destroy();

Enterprise Integration

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

const app = await mountFlowDropApp(container, {
  // Dynamic token refresh
  authProvider: new CallbackAuthProvider({
    getToken: () => authService.getAccessToken(),
    onUnauthorized: () => authService.refreshToken()
  }),

  // Lifecycle hooks
  eventHandlers: {
    onBeforeUnmount: (workflow, isDirty) => {
      if (isDirty) saveDraft(workflow);
    }
  },

  // Auto-save, toasts, and more
  features: {
    autoSaveDraft: true,
    autoSaveDraftInterval: 30000
  }
});

API Configuration

Connect to any backend in seconds:

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

const config = createEndpointConfig('https://api.example.com', {
  endpoints: {
    nodes: { list: '/nodes', get: '/nodes/{id}' },
    workflows: {
      list: '/workflows',
      get: '/workflows/{id}',
      create: '/workflows',
      update: '/workflows/{id}',
      execute: '/workflows/{id}/execute'
    }
  }
});

Customization

The recommended way to customize FlowDrop's appearance is through the theme system. For fine-grained control, you can also override individual CSS custom properties:

:root {
  --fd-background: #0a0a0a;
  --fd-primary: #6366f1;
  --fd-border: #27272a;
  --fd-foreground: #fafafa;
}

Deploy

cd ../../apps/example-client-docker
cp env.example .env
docker-compose up -d

Node.js

npm run build
FLOWDROP_API_BASE_URL=http://your-backend/api node build

Runtime configuration means you build once and deploy to staging, production, or anywhere else with just environment variables.

Specification

The editor implements the FlowDrop Workflow Specification, version 1.0: the rules a FlowDrop workflow obeys, stated independently of any one implementation. The specification has 386 numbered rules (217 core, 167 extended, 2 optional) covering how a workflow is written, stored, validated and executed, with rulings for the hard cases and conformance fixtures you can run against your own backend. Rules are also published as machine-readable JSON, and the source is on GitHub.

Documentation

ResourceDescription
QUICK_START.mdGet running in 5 minutes
API DocumentationREST API specification
Workflow SpecificationRules for workflows
CHANGELOG.mdVersion history

Development

pnpm install         # Install dependencies
pnpm dev             # Start dev server
pnpm build           # Build library
pnpm test            # Run all tests
pnpm storybook       # Launch Storybook

Contributing

FlowDrop is stabilizing. Contributions will open soon. Star the repo to stay updated.

FlowDrop - The visual workflow editor you own completely

Built with ❤️ Svelte 5 and @xyflow/svelte

版本与发布记录

@flowdrop/flowdrop 共发布 57 个版本,首次发布于 2026/03/11;过去 12 个月发布了 57 个版本。

版本发布日期距今
2.18.0latest2026/11/115 天前
2.17.02026/11/0411 天前
2.16.02026/10/2422 天前
2.15.22026/10/1928 天前
2.15.12026/10/1729 天前
2.15.02026/10/1730 天前

关于 @flowdrop/flowdrop 的常见问题

@flowdrop/flowdrop 是什么?

A drop-in visual workflow editor for any web application. You own the backend. You own the data. You own the orchestration.

如何安装 @flowdrop/flowdrop?

在项目目录运行 npm install @flowdrop/flowdrop,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:svelte(^5.29.0)、@xyflow/svelte(^1.2)、@iconify/svelte(^5.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@flowdrop/flowdrop 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@flowdrop/flowdrop 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@flowdrop/flowdrop 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@flowdrop/flowdrop 可以商用吗?

@flowdrop/flowdrop 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@flowdrop/flowdrop 的下载量有多少?

根据 npm 官方下载统计,@flowdrop/flowdrop 在 2026/10/15 – 2026/11/13 这 30 天内被下载 2,082 次,日均约 69 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@flowdrop/flowdrop 还在维护吗?

最新版本 2.18.0 发布于 2026/11/11(5 天前);至今共发布 57 个版本,其中过去 12 个月发布了 57 个;首次发布于 2026/03/11。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。