Reconstruction Format Guide
The reconstruction format generates node tree construction specifications compatible with the Figma Component Reconstructor plugin, enabling programmatic component creation.Overview
Two Export Formats
Metadata Format (Default)- Comprehensive documentation of component properties
- Ideal for style guides, design systems, and documentation
- Includes variant information, design tokens, and quality metrics
- Complete node tree specification for programmatic creation
- All properties needed to recreate components in Figma
- Compatible with Figma Component Reconstructor plugin
Usage
Basic Usage
Output Structure
The reconstruction format returns the node specification directly at the root level (compatible with Figma Component Reconstructor plugin):fileKey, nodeId, and source fields, the reconstruction format returns the raw spec for direct plugin compatibility.
Supported Node Types
The reconstruction format supports all major Figma node types:- Layout Containers:
FRAME,COMPONENT,COMPONENT_SET,INSTANCE,GROUP,SECTION - Shapes:
RECTANGLE,ELLIPSE,POLYGON,STAR,VECTOR,LINE - Text:
TEXT(with font properties) - Special:
BOOLEAN_OPERATION,SLICE
Properties Extracted
Common Properties (All Nodes)
name- Node nametype- Node typex,y- Positionwidth,height- Dimensionsopacity- Opacity (0-1)blendMode- Blend modevisible- Visibility flaglocked- Lock statusdescription- Node descriptionconstraints- Layout constraints
Visual Properties
fills- Fill paints (solid, gradient, image)strokes- Stroke paintsstrokeWeight- Stroke thicknessstrokeAlign- Stroke alignmenteffects- Shadow and blur effectscornerRadius- Corner radiusrectangleCornerRadii- Individual corner radii
Layout Properties (Frames/Components)
layoutMode- Auto-layout mode (NONE,HORIZONTAL,VERTICAL)paddingLeft,paddingRight,paddingTop,paddingBottom- PaddingitemSpacing- Gap between itemsprimaryAxisAlignItems- Main axis alignmentcounterAxisAlignItems- Cross axis alignmentclipsContent- Clipping flag
Text Properties
characters- Text contentfontSize- Font sizefontName- Font family and styletextAlignHorizontal- Horizontal alignmenttextAlignVertical- Vertical alignmentlineHeight- Line heightletterSpacing- Letter spacing
Color Format
Colors are in Figma’s normalized 0-1 RGB format (NOT 0-255):Working with Component Sets
ForCOMPONENT_SET nodes (variants), the response includes available variants:
Validation
Reconstruction specs are validated server-side against plugin requirements. Invalid specs will return error messages. The spec itself doesn’t include validation fields - it’s just the raw node specification.Validation Checks
- ✅ Required fields (name, type)
- ✅ Valid node types
- ✅ Dimension constraints (width/height ≥ 0)
- ✅ Opacity range (0-1)
- ✅ Color value range (0-1 for RGB)
- ✅ Recursive validation of children
Use Cases
1. Version Control for Components
Export component specifications to JSON files for version control:2. Component Migration
Migrate components between files or projects:3. Programmatic Component Generation
Generate components from code or design systems:4. Design System Synchronization
Keep design systems in sync between tools:Comparison: Metadata vs Reconstruction
| Feature | Metadata Format | Reconstruction Format |
|---|---|---|
| Purpose | Documentation, references | Programmatic creation |
| Enrichment | ✅ Design tokens, quality metrics | ❌ Not applicable |
| File Size | Larger (includes metadata) | Smaller (spec only) |
| Color Format | Various formats | Normalized 0-1 RGB |
| Validation | ❌ Not validated | ✅ Validated against plugin |
| Use With | Style guides, docs | Component Reconstructor plugin |
| Best For | Understanding, documenting | Building, migrating |
Limitations
Current Limitations
- Font Loading: TEXT nodes may require font availability in target file
- Image References: IMAGE fills reference images by URL (may need re-uploading)
- Plugin Data: Custom plugin data is not included in reconstruction spec
- Complex Vectors: Complex vector paths may lose some detail
- Instances: INSTANCE nodes reference component IDs (must exist in target)
Best Practices
- ✅ Test reconstruction with simple shapes first (RECTANGLE, ELLIPSE)
- ✅ Verify color values are in 0-1 range
- ✅ Check validation output before using spec
- ✅ Handle COMPONENT_SET children appropriately
- ✅ Ensure fonts are available when reconstructing TEXT nodes
- ✅ Store specs in version control for tracking changes
Examples
Simple Shape
Auto-Layout Frame
Support
For issues or questions about the reconstruction format:- Check validation errors in the response
- Verify node types are supported
- Ensure color values are in 0-1 range
- Review Figma Component Reconstructor plugin documentation
- Open an issue with example spec
Future Enhancements
Planned improvements:- Support for variant property extraction
- Advanced vector path reconstruction
- Image embedding options
- Component property definitions
- Instance overrides support
- Batch export for multiple components