xd_export_artboard
Export an artboard or sub-layer as clean JSON to rebuild the design in another tool like Figma, including frames, text, fills, strokes, and effects. Save referenced images via assetsDir.
Instructions
Full-fidelity export of one artboard (or a sub-layer via nodeId) as clean JSON for rebuilding the design in another tool such as Figma: frames, rectangles (with corner radius), ellipses, lines, vector paths (SVG path data), boolean shapes, text (font, size, styled runs), fills (solid/gradient/image), strokes, shadows/effects, opacity, rotation, constraints, components, repeat grids and layout grids. Positions are relative to the parent. Images are referenced by imageRef; pass assetsDir to save them. For big screens, export a sub-layer with nodeId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Absolute path to a .xd file | |
| depth | No | Max nesting depth. Auto-reduced if the result is too large. | |
| nodeId | No | Export only this layer id (from a previous export) | |
| artboard | Yes | Artboard id or name | |
| assetsDir | No | Optional absolute folder (inside the allowed roots). Referenced images are saved there as <imageRef>.<ext>. |