import_svg
Import raw SVG markup as editable vector nodes inside a frame. Use for vector logos, brand marks, and icons.
Instructions
Import an SVG and place it as editable vector nodes (a FRAME of VECTOR paths) via createNodeFromSvg — use this for vector logos, brand marks, and icons. Provide the SVG's raw markup string (read it from the project asset, or inline it). The frame defaults to the SVG intrinsic size unless width/height are given. For raster photos (PNG / JPG) use import_image instead; when a matching icon component already exists, create_instance it rather than re-pasting the SVG. Returns { ok, nodeId, name, type }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| svg | Yes | Raw SVG markup, e.g. "<svg …>…</svg>" | |
| name | No | Optional name for the new node | |
| width | No | Override width (default: SVG intrinsic width) | |
| height | No | Override height (default: SVG intrinsic height) | |
| parentId | No | Parent node id (default: current page) |