# Figma Code Layers
Bring the code-generated interface onto the design canvas, collaborate and compare, then update the same code layer. Present implementation and design as a two-way workflow.
```motion-demo
{
"id": "sequence",
"title": "Overall choreography",
"src": "demos/sequence.html",
"duration": 34.833333,
"status": "authored",
"description": "Motion and composition example",
"initialTime": 7,
"params": [
{
"key": "title",
"label": "Sample main copy",
"type": "text",
"value": "Bring code to the canvas",
"maxLength": 60
},
{
"key": "accent",
"label": "Accent color",
"type": "color",
"value": "#96d93c"
}
],
"presets": [
{
"label": "Default content",
"values": {
"title": "Bring code to the canvas",
"accent": "#96d93c"
}
},
{
"label": "OpenDesign adaptation",
"values": {
"title": "OpenDesign",
"accent": "#7050da"
}
}
]
}
```
## Preserve the code layer's identity after it enters the canvas
After input, make the code-generated interface a selectable object alongside other design variants. Keep its title, border or layer name visible; do not replace it during an update with an unrelated new screen.
```motion-demo
{
"id": "clip-1",
"title": "Preserve the code layer's identity after it enters the canvas",
"src": "demos/clip-1.html",
"duration": 9,
"status": "authored",
"description": "4–13 seconds · Motion example",
"initialTime": 0.6
}
```
## Compare variants before updating the selected result
After collaboration cursors enter, explore multiple frames, select a result, and then update it. Show applications across scenarios after the update to establish that the change belongs to the same product.
| Time | Section |
|---|---|
| 0.00–4.00s | Statement |
| 4.00–7.00s | MCP input |
| 7.00–10.00s | Code layer enters |
| 10.00–13.00s | Collaboration cursors |
| 13.00–18.00s | Exploring multiple frames |
| 18.00–22.00s | Select a result |
| 22.00–27.00s | Update the code layer |
| 27.00–31.00s | Results across scenarios |
| 31.00–33.00s | Summary |
| 33.00–34.83s | Brand |
## Keep the tool frame light and selection feedback clear
Use a dark outer background around a light canvas, separating sans-serif headlines from fine interface text. Green, purple and orange may distinguish variants, but selection borders should use one consistent visual language; align baselines and spacing when screens sit side by side.
## Adapt to another prototyping workflow
Replace the code entry point, canvas tool and product content. Preserve the loop of “import implementation → compare on canvas → select → update implementation,” keeping cursors and update actions attached to specific objects.
## Color and typography
Medium-bold sans-serif headlines; fine-bordered interface and small functional text.
#161616 · #f6f6ef · #96d93c · #8d56d7 · #f56c3d
## Elements and production rules
Code layer / Design canvas / Collaboration cursors / Version variants / Update button
- The code-generated interface becomes a canvas object, placed beside design variants for comparison; it remains the same code layer after updates.
- Show multiple cursors before they interact with local results.
## Content replacement
- Adapt this to prototyping tools while preserving the iterative relationship between code ↔ design.
## Production parameters
[Visuals and objects](style.json) · [Section timing](timeline.json) · [Position data](tracks.json) · [File manifest](manifest.json)
This specification is based on the reference video. The HTML provides editable choreography examples; each file identifies the source, precision and valid interval of its data.
```motion-board
{
"version": 1,
"brand": "Figma",
"id": "V276",
"palette": [
"#161616",
"#f6f6ef",
"#96d93c",
"#8d56d7",
"#f56c3d"
],
"typography": "Medium-bold sans-serif headlines; fine-bordered interface and small functional text",
"sample": "Bring code to the canvas",
"objects": [
"Code layer",
"Design canvas",
"Collaboration cursors",
"Version variants",
"Update button"
],
"frames": [
{
"path": "assets/reference-1.jpg",
"timeSeconds": 0.0,
"frameId": "K0001",
"role": "reference-evidence",
"status": "measured"
},
{
"path": "assets/reference-2.jpg",
"timeSeconds": 7.0,
"frameId": "K0024",
"role": "reference-evidence",
"status": "measured"
},
{
"path": "assets/reference-3.jpg",
"timeSeconds": 13.0,
"frameId": "K0047",
"role": "reference-evidence",
"status": "measured"
},
{
"path": "assets/reference-4.jpg",
"timeSeconds": 18.0,
"frameId": "K0067",
"role": "reference-evidence",
"status": "measured"
},
{
"path": "assets/reference-5.jpg",
"timeSeconds": 27.0,
"frameId": "K0099",
"role": "reference-evidence",
"status": "measured"
},
{
"path": "assets/reference-6.jpg",
"timeSeconds": 33.0,
"frameId": "K0120",
"role": "reference-evidence",
"status": "measured"
}
],
"stages": [
{
"start": 0,
"label": "Statement",
"end": 4,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 4,
"label": "MCP input",
"end": 7,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 7,
"label": "Code layer enters",
"end": 10,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 10,
"label": "Collaboration cursors",
"end": 13,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 13,
"label": "Exploring multiple frames",
"end": 18,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 18,
"label": "Select a result",
"end": 22,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 22,
"label": "Update the code layer",
"end": 27,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 27,
"label": "Results across scenarios",
"end": 31,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 31,
"label": "Summary",
"end": 33,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
},
{
"start": 33,
"label": "Brand",
"end": 34.833333,
"status": "inferred",
"basis": "Representative-frame review; approximate boundaries"
}
],
"duration": 34.833333,
"fontFamily": "Arial, sans-serif"
}
```