Figma code layers let you try a code-backed prototype directly on the Figma Design canvas. If you already have several connected frames, start with one complete route through them. Select the frames for that route, use Build selection, then play the result and check that it behaves the way you expect before sharing it with the team.
Start with one connected flow
Pick a task with a clear beginning and end. For example, a delivery flow might start at an address form, show an error when the postcode is missing, and end at a confirmation screen. Select the designs for those states. Keep the original frames on the canvas so you can compare the prototype against them afterwards.
Figma says its agent can use the prototype connections between selected frames as context. Before building, check that the button actually points to the frame you intended. If a connection is missing or a state has no design yet, call that out in the prompt. A concrete instruction such as “keep the user on the form when the postcode is missing” is easier to check later than “add validation”.
Turn the selected frames into a code layer
- Open a Figma Design file you can edit. If the Code tool is missing, check whether code layers are available in your workspace.
- Select the frames for your route, then use Build selection in the right sidebar. Tell the agent which frame the user should start on and what should happen after the main action.
- When the layer is ready, select it and press Play. Try the route from the beginning before adjusting the visual details.
Figma’s code layers guide also covers starting from an empty layer or from existing code. It describes code layers as an open-beta feature and says agent work can use AI credits. Check the limits shown in your workspace before asking for several variations.
Test the expected route and one failure case
In the delivery example, enter sample values and submit successfully. Start again with an empty postcode and check three things: whether the error appears near the right field, whether the other entries stay in place and whether you can recover by filling in the missing value. Use made-up details for the prototype. An example flow rarely needs a real address or a connection to a live service.
When a transition goes to the wrong screen, ask for that one behaviour to change and run the same two checks again. If your teammate is reviewing the visuals, put the original frames next to the code layer and label the difference you want them to look at. Figma’s workflow example shows how a team can compare interactive options directly on the canvas.
Pick the right thing to hand over
Keep a playable code layer when the next person needs to judge timing, validation or transitions. If they need editable Design frames for an agreed state, look at Extract designs. Figma describes a Record a flow option that can capture a sequence as frames. Name those frames by what the user sees so they remain useful during review.
Before handing over the layer, identify which decisions the team has agreed to and which behaviour is still provisional. For the postcode example, record where the error appears and what counts as a successful retry. The written checks give the reviewer something concrete to compare next time.
If the working prototype already lives in a separate Make file, embedding that existing prototype can be enough to review it in context. For a visual handoff, see our walkthrough on copying a Figma Make screen into editable Design layers. Our Figma Design and Make comparison covers which file to start in. For the connected frames example, share the layer alongside a one-sentence test so a reviewer knows what to click and what response to expect.

