ııı motion.mdVideo style specification
Figma / V276

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.

Composition and choreography Playable · Replaceable content
Overall choreographyRule example
0.00 / 34.83 seconds
Motion and composition example Open separately ↗
View HTML source
<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Figma Code Layers · sequence</title><style>html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#161616}canvas{display:block;width:100%;height:100%;object-fit:contain}</style><body data-mode="sequence"><canvas width="1000" height="600"></canvas><script src="data.js"></script><script src="common.js"></script><script src="scene.js"></script><script src="bridge.js"></script></body></html>
Visual elementsCode layerDesign canvasCollaboration cursorsVersion variantsUpdate button
MOTION LANGUAGE

Motion and composition

Local motion · Composition rules

01

Preserve the code layer's identity after it enters the canvas

Preserve the code layer's identity after it enters the canvasRule example
0.00 / 9.00 seconds
4–13 seconds · Motion example Open separately ↗
View HTML source
<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Figma Code Layers · sequence</title><style>html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#161616}canvas{display:block;width:100%;height:100%;object-fit:contain}</style><body data-mode="clip" data-start="4" data-end="13"><canvas width="1000" height="600"></canvas><script src="data.js"></script><script src="common.js"></script><script src="scene.js"></script><script src="bridge.js"></script></body></html>

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.

02

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.

03

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.

04

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.

SEQUENCE

Sections and rhythm

Click a section to seek to it in the choreography example above.

Composition reference at 0.00 seconds
0.00s
Composition reference at 7.00 seconds
7.00s
Composition reference at 13.00 seconds
13.00s
Composition reference at 18.00 seconds
18.00s
Composition reference at 27.00 seconds
27.00s
Composition reference at 33.00 seconds
33.00s

Visual references · Discrete still frames

KEEP THE RELATIONSHIPS

Creating other themes

  • Adapt this to prototyping tools while preserving the iterative relationship between code ↔ design.

Production constraints

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.