Complete the code to set the frame to a responsive width in Figma prototype.
frame.resize([1], frame.height)Using figma.viewport.bounds.width sets the frame width to the current viewport width, making it responsive.
Complete the code to set constraints for a frame to resize horizontally in Figma prototype.
frame.constraints = { horizontal: [1], vertical: 'TOP' }The 'LEFT_AND_RIGHT' constraint allows the frame to resize horizontally with the parent.
Fix the error in the code to make the prototype frame responsive to height changes.
frame.constraints = { horizontal: 'LEFT_AND_RIGHT', vertical: [1] }The 'TOP_AND_BOTTOM' constraint allows the frame to resize vertically with the parent frame.
Fill both blanks to set a frame's constraints for full responsive resizing in Figma prototype.
frame.constraints = { horizontal: [1], vertical: [2] }Using 'LEFT_AND_RIGHT' and 'TOP_AND_BOTTOM' constraints allows the frame to resize both horizontally and vertically with its parent.
Fill all three blanks to create a prototype interaction that adapts frame size responsively on window resize.
figma.on('resize', () => { frame.resize([1], [2]); frame.constraints = { horizontal: [3], vertical: 'TOP_AND_BOTTOM' }; });
This code resizes the frame width and height to the viewport size and sets horizontal constraints to 'LEFT_AND_RIGHT' for responsive resizing.