--- title: "Quick start" description: "Get a live FlowDrop editor running in your app in minutes — Svelte, React, Vue, vanilla JS, or Drupal." source: https://flowdrop.io/docs/start/quickstart site: FlowDrop documentation --- # Quick start You're three steps from a working workflow editor: install the package, point it at a backend, and mount it. Pick your framework below for copy‑paste setup, or follow the universal path underneath. ## Choose your framework Use FlowDrop as a native Svelte 5 component. Mount into a `useEffect` with a container ref. Mount on `onMounted`, tear down on unmount. Drop into any element — no framework needed. Install the module; the editor ships with it. ## 1. Install ```bash npm npm install @flowdrop/flowdrop @iconify/svelte @xyflow/svelte ``` ```bash pnpm pnpm add @flowdrop/flowdrop @iconify/svelte @xyflow/svelte ``` ```bash yarn yarn add @flowdrop/flowdrop @iconify/svelte @xyflow/svelte ``` ```bash bun bun add @flowdrop/flowdrop @iconify/svelte @xyflow/svelte ``` **No Svelte required in your app.** FlowDrop is built with Svelte 5 internally, but you don't need to write Svelte to use it. The mount API works in React, Vue, vanilla JS, or any framework. ## 2. Mount the editor This is the universal path — it works anywhere. Drop the editor into any element and point it at your backend: ```javascript import { mountFlowDropApp } from '@flowdrop/flowdrop/editor'; import { createEndpointConfig } from '@flowdrop/flowdrop/core'; import '@flowdrop/flowdrop/styles'; const app = await mountFlowDropApp(document.getElementById('editor'), { endpointConfig: createEndpointConfig('/api/flowdrop'), }); ``` ```html
``` That's the happy path — you now have a live editor wired to your backend. For framework‑idiomatic setup (Svelte components, React refs, Vue lifecycle), use the tiles above. ## 3. Connect a backend **FlowDrop needs a backend.** As a **frontend editor**, it relies on a backend to serve node definitions, store workflows, and run executions. Until one is connected, the canvas loads but has no nodes to place. You have two ways to get there: Skip the backend work — run a server that already speaks the FlowDrop API, like the Drupal module. Implement the REST contract on your own stack — the guide lists every endpoint FlowDrop calls. ## Going further The happy path above is all most apps need. Expand the sections below when you hit a specific case. Install these alongside `@flowdrop/flowdrop`: | Package | Version | Required | | ----------------- | -------- | ----------------------- | | `svelte` | `^5.0.0` | Yes (internal runtime) | | `@xyflow/svelte` | `^1.2` | Yes (for editor module) | | `@iconify/svelte` | `^5.0.0` | Yes (for icons) | Import from the most specific entry point you need — the main entry is a slim front door, so form fields, display components, and the playground live in their own sub‑modules. | Entry point | Description | | ---------------------------------- | ------------------------------------------------- | | `@flowdrop/flowdrop` | Bootstrap front door — `App`, mount functions, instances, config helpers, auth providers | | `@flowdrop/flowdrop/core` | Types and utilities (zero heavy dependencies) | | `@flowdrop/flowdrop/editor` | Visual workflow editor components | | `@flowdrop/flowdrop/form` | Dynamic form field components | | `@flowdrop/flowdrop/form/code` | Code and JSON editor fields (requires CodeMirror) | | `@flowdrop/flowdrop/form/markdown` | Markdown editor field (requires CodeMirror) | | `@flowdrop/flowdrop/form/full` | All form components pre-bundled | | `@flowdrop/flowdrop/display` | Display-only components (MarkdownDisplay) | | `@flowdrop/flowdrop/playground` | Interactive workflow playground | | `@flowdrop/flowdrop/settings` | Settings UI components and stores | | `@flowdrop/flowdrop/styles` | Base CSS styles and design tokens | Only needed if you use the `form/code` or `form/markdown` entry points: ```bash npm install codemirror @codemirror/state @codemirror/view @codemirror/commands \ @codemirror/language @codemirror/theme-one-dark @codemirror/autocomplete \ @codemirror/lang-json @codemirror/lang-markdown @codemirror/lint ``` Multiple FlowDrop editors can run on the same page. Each mount gets its own isolated `FlowDropInstance` (workflow, history, playground, and panel state). When mounting more than one editor with drafts enabled, pass an `instanceId` so their stored drafts don't collide. See the [multiple instances guide](/editor/multiple-instances). FlowDrop ships its UI as Svelte 5 components, so a bundler needs the Svelte plugin to compile them — even in React, Vue, or vanilla-JS apps. You still don't write any Svelte yourself. With Vite: ```bash npm install -D @sveltejs/vite-plugin-svelte svelte ``` ```javascript // vite.config.js import { defineConfig } from 'vite'; import { svelte } from '@sveltejs/vite-plugin-svelte'; export default defineConfig({ plugins: [svelte()], // The mountFlowDropApp examples use top-level await. build: { target: 'es2022' } }); ``` **SvelteKit** already configures the Svelte plugin — no extra setup needed. Still seeing `Failed to resolve import`? Exclude FlowDrop from Vite's dependency pre-bundling: ```javascript optimizeDeps: { exclude: ['@flowdrop/flowdrop', '@xyflow/svelte'] } ``` Confirm the package resolved correctly: ```javascript import { createEndpointConfig } from '@flowdrop/flowdrop/core'; const config = createEndpointConfig('/api/flowdrop'); console.log(config); // EndpointConfig object ``` If you see `Cannot find module '@flowdrop/flowdrop'`, check that the install finished without errors, that your bundler supports ES modules (Vite 5+, webpack 5+), and that you aren't importing in a server-side context. - **Node.js** v20 or later. - A bundler that handles ES modules (Vite, webpack, esbuild, Rollup, Next.js, Nuxt, SvelteKit, or similar). - **Svelte 5 internally** — FlowDrop uses Svelte 5 runes under the hood; your app does not need to be written in Svelte. - **Modern browsers only** — targets ES2020+ with no bundled polyfills.