Complete the code to create a frame inside another frame in Figma.
const parentFrame = figma.createFrame();
const childFrame = figma.createFrame();
parentFrame.[1](childFrame);In Figma plugin API, appendChild is used to add a node inside another node, like nesting frames.
Complete the code to set the child frame's position inside the parent frame.
childFrame.x = [1]; childFrame.y = 50;
Positions in Figma are numbers representing pixels, so use a number like 100 without quotes.
Fix the error in the code to properly nest the child frame inside the parent frame.
parentFrame.[1](childFrame);The correct method to nest a frame inside another in Figma is appendChild.
Fill both blanks to set the child frame's width and height inside the parent frame.
childFrame.width = [1]; childFrame.height = [2];
Setting width to 200 and height to 300 pixels positions the child frame size properly.
Fill all three blanks to create a parent frame, a child frame, and nest the child inside the parent.
const parentFrame = figma.createFrame(); const childFrame = figma.createFrame(); parentFrame.[1](childFrame); childFrame.x = [2]; childFrame.y = [3];
Use appendChild to nest frames, and set x and y positions with numbers.