create_node
Create Figma nodes (frame, text, shape, SVG, image) with fill, stroke, auto-layout, and nested children to build entire UI trees in one call.
Instructions
Create a node in the live Figma file via the plugin: frame, rectangle, ellipse, line, text, autolayout (frame with flex), or instance (from a componentId). Auto-positions right of existing content unless x is given. Supports fill/stroke (hex, rgb(), hsl(), or 'none'), cornerRadius, opacity, and auto-layout props (layout='row'|'col', gap, padding, justify/items = start|center|end|between, sizingHorizontal/Vertical = HUG|FILL|FIXED). Text supports characters, fontSize, fontFamily, fontStyle. Pass children (array of nested create_node specs, same shape minus parentId) to build a WHOLE TREE in one call — e.g. a card frame with title + body + button. Also supports type='svg' ({svg: markup}), 'image' ({base64}), 'section', and in FigJam files 'sticky', 'connector' ({startNodeId,endNodeId}), 'shape'. Returns the new root node's id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| gap | No | ||
| svg | No | SVG markup for type='svg'. | |
| fill | No | ||
| name | No | ||
| type | Yes | ||
| items | No | ||
| width | No | ||
| base64 | No | Base64 image bytes for type='image'. | |
| height | No | ||
| layout | No | ||
| stroke | No | ||
| justify | No | ||
| opacity | No | ||
| padding | No | Number or CSS-style '8 16' / '8/16/8/16'. | |
| children | No | Nested create_node specs (recursive). Child-only extras: sizingHorizontal/sizingVertical = HUG|FILL|FIXED. | |
| fontSize | No | ||
| parentId | No | Append into this node instead of the page. | |
| endNodeId | No | ||
| fontStyle | No | ||
| shapeType | No | ||
| characters | No | ||
| fontFamily | No | ||
| componentId | No | For type='instance'. | |
| startNodeId | No | ||
| cornerRadius | No | ||
| strokeWeight | No |