What API can help me add each sub-element to frame of a grid layout and adapt to stretching into each column shadow？
I hope to achieve the following effects through the plug-in API: manually create a frame container and give it a Gird layout. Next, I will dynamically add sub-elements to it. I hope the width of these sub-elements can be filled and stretched to fit each column. However, depending on the fact that look like only can stretch sub-elements with the mouse, is there any way to complete this task through the sigma API?
As shown in the picture and this is my current code:
var myFrame= createGridlayoutFrame() let InstanceNode = figma.getNodeById("1642:6987"); var componentInstance = InstanceNode.createInstance(); myFrame.appendChild(componentInstance);