#Layouting Subflow Horizontally

1 messages · Page 1 of 1 (latest)

pastel needle
#

Hi! I'm trying to create a flow like this, which I reckon is a subflow.

Essentially, it's a bunch of parent nodes flowing from left to right (horizontally), and the child nodes are nested within the parent node (vertically).

Parent's height and width needs to adjust accordingly to the width of the child nodes, and how many child nodes there are in the parent (height of each node + distance between them + padding from parent)

I wonder if there are any layouting algorithms that would allow this? And if not, do I have to create my own layouting algorithm?

novel folio
#

You could probably achieve this using elkjs, the reactflow website has an example for integration and as for the specific elkjs settings, I'd recommend exploring their docs, having a play in a codesandbox (which will help others here troubleshoot your problem), and ChatGPT is also very good for helping explore elkjs options.