Complete the code to create a Frame in Figma.
const container = figma.currentPage.[1]({ name: 'Main Frame' });
Use createFrame to create a Frame in Figma. Groups are created with createGroup.
Complete the code to create a Group in Figma.
const group = figma.currentPage.[1](nodes);Use createGroup to group nodes together without layout constraints.
Fix the error in the code to add a child to a Frame.
frame.[1](child);Use appendChild to add a child node to a Frame or Group in Figma.
Fill both blanks to check if a node is a Frame or a Group.
if (node.type === [1] || node.type === [2]) { console.log('Node is a container'); }
Frames have type "FRAME" and groups have type "GROUP" in Figma.
Fill all three blanks to create a Frame, add a child, and set layout mode.
const frame = figma.currentPage.[1]({ name: 'Container' }); frame.[2](childNode); frame.layoutMode = [3];
Create a Frame with createFrame, add a child with appendChild, and set layout mode to "HORIZONTAL" for horizontal auto-layout.
