In this guide, youβll learn how to set up Foblex Flow in your Angular project and render your first interactive flow β complete with draggable nodes and dynamic connections. Foblex Flow is a lightweight, flexible library for building flow-based UIs natively in Angular.
Foblex Flow provides a schematic for quick setup. Just run the following command in your Angular project to install and configure everything automatically:
Hereβs the most minimal working example β a canvas with two nodes and one connection between them:
Foblex Flow doesnβt enforce any styling, giving you full design control. Hereβs a sample style sheet to help you get started:
<f-flow>
β the root component that manages the flow state.<f-canvas>
β the layer where nodes and connections are placed.fNode
β directive representing a node.fNodeOutput
/ fNodeInput
β connectors for connections. fNodeOutput is the source, and fNodeInput is the target.<f-connection>
β the component that renders a connection between two connectors by their fOutputId and fInputId.β οΈ Note: fOutputId
and fInputId
may technically match, since they belong to different connector collections. However, this is not recommended, as future versions may unify these into a single fConnector directive where matching IDs would cause conflicts.
Enhance your flow with the following:
[fNodePosition]
coordinatesfNode
and f-connection
elementsfOutputConnectableSide
, fInputConnectableSide
fType
and fBehaviour
inputs.fType
: defines the visual style of the connection. Acceptable values from the EFConnectionType
enum include: straight
, bezier
, segment
. You can also pass a string for a custom connection type.To create a custom connection type, see documentation here.
fBehavior
: defines the connection behavior, including positioning and flexibility. Acceptable values from EFConnectionBehavior
include: fixed
, fixed_center
, floating
. Default: EFConnectionBehavior.FIXED
.<div>
.fOutputId
or `fInputId donβt match the ones set in connectors β connections wonβt render.<f-canvas>
β fNode
and <f-connection>
must be within it.If you find Foblex Flow useful β drop a β on GitHub, join the conversation, and help shape the roadmap!