create_text
Create styled text nodes in Figma, set fonts, alignment, resizing, and insert into frames or auto-layout parents by ID or index.
Instructions
Create a text node. Defaults to auto-width hug (textAutoResize WIDTH_AND_HEIGHT + HUG sizing). Pass parentNodeId to insert into a frame/stack/slot — inside auto layout omit x/y and use index. Pass textAlignHorizontal (LEFT|CENTER|RIGHT|JUSTIFIED), textAlignVertical (TOP|CENTER|BOTTOM), textAutoResize (WIDTH_AND_HEIGHT|HEIGHT|NONE|TRUNCATE), and layoutSizingHorizontal/Vertical (FIXED|HUG|FILL). For variable fonts, pass variationSettings (e.g. {wght:550}) and optionally omit fontStyle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| b | No | ||
| g | No | ||
| r | No | ||
| x | No | ||
| y | No | ||
| name | No | ||
| index | No | Child index inside the parent. Use this to order items in auto layout. | |
| fillsHex | No | ||
| fontSize | No | ||
| fontStyle | No | ||
| characters | Yes | ||
| fontFamily | No | ||
| parentNodeId | No | ||
| textAutoResize | No | WIDTH_AND_HEIGHT (default hug) | HEIGHT (wrap+auto height) | NONE (fixed) | TRUNCATE | |
| ignoreAutoLayout | No | If true, overlay with absolute x/y inside an auto-layout parent. | |
| textAlignVertical | No | TOP | CENTER | BOTTOM | |
| variationSettings | No | Variable-font axis values keyed by OpenType tag, e.g. { wght: 550, slnt: -10 }. Omit fontStyle to let Figma pick the matching named instance. | |
| textAlignHorizontal | No | LEFT | CENTER | RIGHT | JUSTIFIED | |
| layoutSizingVertical | No | FIXED | HUG | FILL | |
| layoutSizingHorizontal | No | FIXED | HUG | FILL |