Add a text layer
figma_create_textAdd text to the current Figma file as a new layer. Specify font family, size, color, and width for wrapping; missing fonts are refused instead of substituted.
Instructions
Creates a TEXT layer with the words you give it. The font is loaded before anything is typed, and a font this machine does not have is refused rather than substituted. Give a width to make it wrap; without one it hugs its text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| name | No | Layer name. Defaults to the text itself. | |
| text | Yes | The characters. | |
| color | No | Hex colour for the text. | |
| width | No | Fixed width, so the text wraps. | |
| fontSize | No | ||
| parentId | No | Put it inside this node. Default: the current page. | |
| fontStyle | No | Weight or style, like "Bold". Default Regular. | |
| fontFamily | No | Default Inter. |