Resizes the node. If the node contains children with constraints, it applies those constraints during resizing. If the parent has auto-layout, causes the parent to be resized.
resize(width: number, height: number): void
New width of the node. Must be >= 0.01
New height of the node. Must be >= 0.01, except for
LineNode which must always be given a height of exactly 0.
Since this function applies constraints recursively (when there are multiple levels of nested frames with constraints), calls to this function could be expensive. Use
resizeWithoutConstraints if you don't need to apply constraints.
⚠️ If this node is a text node with a missing font or contains a text node with a missing font, the text node will be resized but the text will not re-layout until the next time the text node is opened on a machine that has the font. This can cause the text node to re-layout immediately and be surprising to your user. Consider checking if the document
figma.hasMissingFontbefore using this function.