Originally published on JavaScript in Plain English:https://javascript.plainenglish.io/building-ai-low-code-platform-in-angular-part-4-styling-and-handling-connections-79e1ef769a5d

In the previous part, we brought our node editor to life with custom components and a dynamic palette. But nodes alone don’t make the magic — the real power comes from how they connect. And more importantly, how those connections behave, look, and respond to users.
Today, we’re upgrading our flow with some serious UX polish:
Let’s turn static lines into smart, responsive connectors — and give our low-code UI a professional edge.
Connections in Foblex Flow aren’t just static wires — they’re fully interactive and reconfigurable. Each end of a connection features a drag handle — an invisible area you can grab to change where the connection starts or ends.
By default, only the target end (input) is draggable. But you can also make the source end (output) reassignable by setting the fReassignableStart=”true” input. This gives you precise control over which ends can be modified — on a per-connection basis.
Want to rewire a connection? Just drag one of its ends and drop it onto another connector. Foblex Flow takes care of the rest — when the drag operation finishes, it emits the fReassignConnection event from the <f-flow> component itself (not from the connection element):
This event contains everything you need to handle the reattachment:
🧠 Tip:
The event will still be triggered even if the user doesn’t drop the connection onto another connector. In that case, newTargetId (or newSourceId) will be undefined, but you’ll still receive the exact dropPoint — the canvas coordinates where the user released the connection.
This is extremely useful if you want to open a context menu or create a new node on the fly at that position.
Here’s how to update your connection list when the target changes:
That’s it — your users can now interactively rewire the flow by grabbing connection ends and reattaching them wherever they need. It’s a small feature, but it makes the editor feel dynamic, intuitive, and alive.
https://flow.foblex.com/examples/drag-to-reassign
Connections in Foblex Flow aren’t just visual lines — they’re deeply customizable and behave exactly how you want them to.
Let’s start with the three connection types, each offering a different visual style:
https://flow.foblex.com/examples/connection-types
Next, you can define how the connection behaves when linking nodes:
Connection Behaviours
https://flow.foblex.com/examples/connection-behaviours
These options give you total control over both aesthetics and logic — whether you’re building a chatbot flow, a wiring diagram, or an AI pipeline.
📖 Want to dive deeper into all behaviors and visuals?
In our low-code platform, we’ll use a Bézier curve with a fixed side behavior, which feels natural for horizontal flow layouts:
You’re now in control — not just of where your connections go, but how they feel when they get there.
A great UI isn’t just about layout — it’s about clarity and direction. When working with connections, nothing communicates intent better than directional markers.
With Foblex Flow, you can attach custom SVG markers to the start or end of any connection. These can be arrows, dots, diamonds — anything you can draw in SVG.
https://flow.foblex.com/examples/connection-markers
Here’s a minimal example that adds a simple circle to the start of a connection:
All marker types are defined in the EFMarkerType enum:
You can style markers differently for selected states — this is great for showing hover, focus, or active connections.
Here’s a full example that applies all four types of markers on a connection:
With just a few lines of SVG, your connections can now clearly show direction, communicate selection, and make the entire UI feel more polished and understandable.
Next, we’ll make them glow ✨
Let’s make our connections not just smart — but stylish.
First, we’ll define a custom CSS variable** — connection-color** and apply it to both the stroke of the connection path and the fill of any SVG markers. This way, all visual elements stay perfectly in sync.
💡 Why use CSS variables?
They allow you to easily switch themes, support dark/light mode, or dynamically update styles on interaction — without touching the DOM.
Now let’s make our connections respond to user interaction. A subtle glow on hover helps users understand that a line is clickable or draggable.
Just like that, your editor starts to feel alive — reacting to user input in a smooth, intuitive way.
At this point, your connections are no longer just lines between nodes — they’re fully interactive, visually expressive, and ready for production use.
Here’s what we’ve achieved in this part:
✅ Enabled reattachment of connections with intuitive drag handles
✅ Supported reconnection from either side of the link
✅ Styled connection paths using CSS variables for easy theming
✅ Added SVG markers to visualize direction and selection
✅ Enhanced the UX with hover effects and visual feedback
Together, these improvements make a massive difference in how your flow editor feels to the user. Small touches like directional arrows or soft highlights can turn a technical tool into a truly enjoyable experience.
But we’re not stopping here.
Up next, we’ll take interactivity to the next level by adding a side panel that appears when a node is selected. This panel will allow users to:
This is a huge step toward building a real low-code platform, where users don’t just connect logic — they configure and control it through a seamless UI.
If you like the project — leave a ⭐ on GitHub, join the discussions, and share your feedback!