figma_create_svg
Create Figma nodes from SVG strings and ensure design system compliance by applying variable bindings to unbound vector and text children.
Instructions
Creates a node from an SVG string in Figma. Useful for icons and custom graphics. Returns unboundChildren — a list of child nodes that need DS variable bindings. You MUST apply figma_update_node (op: "fill") to every unbound vector and figma_update_node (op: "text_style" then op: "fill") to every unbound text. Leaving unbound children breaks DS compliance and light/dark mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Node name. | |
| parentId | Yes | Parent node ID. | |
| svgString | Yes | SVG markup string. | |
| fillVariable | No | DS variable path for fill override (applied to ALL child vectors uniformly). | |
| strokeVariable | No | DS variable path for stroke override. | |
| layoutSizingVertical | No | Vertical sizing mode. | |
| layoutSizingHorizontal | No | Horizontal sizing mode. Use FILL for charts inside auto-layout containers so they stretch to the container width. |