Build your first interactive diagram in Angular: install Foblex Flow, render two draggable nodes, and connect them with a live connection.
This is the default starting path for most Angular teams. You do not need caching or virtualization on day one.
Prefer trying without a local setup? Open the minimal starter on StackBlitz — a running editor with two nodes and connection creation.
This guide is the shortest path from installation to a working flow. You will:
f-flow + f-canvas),f-connection,This guide targets the 19.x API line. If your application is on Angular 12-17.2, start with Angular Version Compatibility and pin the matching Foblex Flow line before you run ng add or npm install.
ng add also connects the shipped default theme automatically by adding node_modules/@foblex/flow/styles/default.scss to application styles when the entry is missing.
If you want manual or selective theme setup, continue with Default Theme and Styling.
Start here if you are:
A minimal interactive flow consists of:
f-flow — the root container.fDraggable — enables interaction (drag, pointer handling, editor UX pipeline).f-canvas — the layer where nodes and connections are rendered.fNode and explicit positions via fNodePosition.fConnector) + f-connection whose fSourceId and fTargetId reference matching fConnectorId values.Import FFlowModule for the complete template above. f-flow and f-canvas are standalone components, but the sample also uses non-standalone directives and components that the module registers:
The template above works with either state integration:
fCreateConnection and fMoveNodes, validate them, and update your Angular state.provideFFlow(withFlowState()), load typed records into FFlowState, and render its signals. Supported gestures update those records and history automatically, with snapshots and undo/redo included.In both modes your application defines domain fields, validation rules, permissions, and persistence. See the Managed Flow State guide when you want the opt-in store.
The quickest styling path is to keep the shipped theme connected.
If you installed the package manually, add one of these:
Then only add layout styles that belong to your screen:
For selective mixins and token overrides, see Default Theme and Styling.
Foblex Flow is intentionally UI-agnostic: it does not enforce a design system.
Use this as a practical baseline, then adapt it to your app styles.
f-flow — root container that provides flow context.f-canvas — viewport/rendering layer for nodes and connections.fNode — directive that turns an element into a node.fConnector — unified source, target, source-target, or outlet endpoint. Use it for new code.f-connection — renders a connection whose fSourceId and fTargetId match rendered fConnectorId values.After you get the minimal template working, try:
[fNodePosition],fConnectorConnectableSide),fType and fBehavior,Only add scaling features such as cache or virtualization once you actually need them for larger scenes.
f-canvas. Elements outside it will not participate in transform and interaction.@for inside @if, @for inside @for) is not projected into the canvas — content renders detached and invisible without errors. Wrap the block with <ng-container ngProjectAs="[fNodes]"> (groups: "[fGroups]", connections: "[fConnections]"). See Errors and Warnings (FF1004).fSourceId and fTargetId must match rendered fConnectorId values exactly — otherwise the connection will not render.fNodeOutput / fNodeInput and fOutputId / fInputId APIs remain as deprecated compatibility aliases. Do not use them in new code; follow Migrating to Unified Connectors when updating an existing editor.For custom connection types, see the Examples section: /examples/custom-connection-type.
Continue with the API references:
If this page helped you build something (or saved you from writing drag+drop and SVG connection logic from scratch), please ⭐ the repo on GitHub — it directly helps the project grow.