Skip to main content
Change the dimensions of a node by setting new width and height values.

Parameters

string
required
The ID of the node to resize
number
required
New width in pixels (must be positive)
number
required
New height in pixels (must be positive)

Response

Returns the name of the resized node and its new dimensions.

Examples

Resize a frame to standard mobile dimensions

Make a button wider

Proportionally scale an element

Create a square from a rectangle

Notes

  • Both width and height must be positive numbers
  • Resizing affects the node’s bounding box; content inside may overflow or be clipped
  • Text nodes will reflow text content to fit the new dimensions
  • Auto-layout frames may constrain resizing behavior based on their layout settings
  • Children of resized frames are not automatically scaled