Figma Support Forum

Unable to use counterAxisSizingMode = "Auto" after creating frame

let data = figma.createFrame();

//Here I am creating a new frame which is rendering on figma.currentPage.

data.layoutMode = “HORIZONTAL”;
data.counterAxisSizingMode = “AUTO”
data.primaryAxisSizingMode = “AUTO”

//I am trying to change some properties. and unable to do it please help.

Here is the result of your code. Everything seems to be working fine, the AL sizing on both axis is set to Hug Contents (Auto).

If you are sharing code, place it between three backtick ``` characters like ``` this ``` so it is formatted as code.