Exploring a feature across separate vibe coding tools tends to be a solo activity, and designers have told Figma they want space to build visually, compare alternatives, and work through ideas as a team. Code layers allow teams to riff on interactive, code-based prototypes directly on the Figma canvas, and the Figma agent supports that shared process — comparing and editing prototypes, and combining teammates' ideas.
The scenario
The workflow follows a designer adding a new button to a fictional marketplace app called Pickup. The button lets users select their delivery address from the app's existing map view. Exploring versions in a separate coding tool and sending links back and forth makes comparing details and building on a teammate's work slower, so the designer brings the app's code onto the canvas instead: trying alternatives side by side, refining the design, and merging elements from different explorations into one working prototype.
Getting code onto the canvas
The designer starts by loading the map view's code as a code layer so the delivery feature can be built and tested on the app's existing map screen. Figma offers several ways to create a code layer:
- Capture code from a webpage with the Figma Chrome extension and paste it onto the canvas.
- Select a design frame and prompt the Figma agent to turn it into an interactive code layer.
- Create an empty code layer and prompt the agent to build from scratch — using a description or a PRD as the starting point.
- Clone a connected GitHub repository.
- Upload a folder of code files from your computer.
- Ask an external coding agent to import a project through MCP.
If the PRD lives in Notion, the Notion connector shares it with the Figma agent, which can then build a code layer from those requirements.
For Pickup, the designer picks Clone repository in the agent panel, selects Pickup from the connected GitHub account, keeps the main branch selected, and clicks Clone.
Generating and comparing directions
With the code layer on the canvas, the designer selects it and prompts the agent to explore several directions at once:
Make three variations of this and add a new delivery button to the map page. When clicked, the user can choose their address. The first one should be an omnisearch address field, but surprise me with the other two.
The agent produces three layers, each taking a different approach:
- Address search: an omnisearch field for finding a delivery address.
- Map-based selection: choosing a location by moving around a map.
- Address shortcuts: picking a saved address or using the current location.
The designer selects each layer and clicks through the interactive versions side by side, comparing how each handles the same task without switching between prototypes in different tools. Teammates can try the options and comment on the canvas, and anyone can select a code layer and ask the agent for a new version with their own changes.
Refining details: the editor and manual edits
Settling on the omnisearch option, the designer duplicates it by holding Option and dragging the code layer (Alt-drag on a PC), keeping the original intact next to the copy for easy comparison.
For finer work, Open code editor on the code layer opens a full-screen view with an agent chat panel on the left, a preview in the center, and the underlying code available under Files. Noticing the banner heading could be improved, the designer edits it manually rather than prompting: click Edit, select the heading in the preview, raise its font size in the properties panel, then click Apply in the agent chat. The code behind the duplicate updates while the original stays as it was, and both can be previewed side by side on the canvas.
From code back to design layers
To keep editing individual elements with familiar Figma tools, the designer selects the code layer and clicks Extract designs. This can capture the whole page as it currently appears or a specific element, such as a product card or the delivery button, converting it into editable design layers for layout and styling work. The designer adds more space around the Delivery options label so the button feels less cramped.
Extract designs also offers Record flow, which captures screens as you click through the working app; clicking Stop places them on the canvas as separate editable design frames in sequence, so the whole flow can be reviewed and revised together.
With the full flow laid out, the designer sees that the Delivery options button opens straight into an address entry panel and renames it "Choose delivery address" to set expectations before the click. Once the changes are right, Update code layer sends the edits from the extracted design layers back to the working prototype, and the result is ready to share with the team.
Combining a teammate's exploration
Elsewhere on the canvas, another designer has been using code layers to make the map easier to browse when many items sit close together — trying options such as a number showing how many items are in an area, or a grid grouping those items, with notes beside the explorations explaining the thinking. The first designer selects both the grid-view code layer and the delivery exploration and prompts:
Create a new code layer combining the grid clustering from the grid layer and the delivery feature from the delivery code layer
The agent produces a single code layer combining both explorations into one working experience. Before sending the updated code back to the repository, the designer asks the agent to compare it against the original and document the differences in a technical spec, a collaborative document on the canvas outlining what implementation involves:
Describe the changes in the combined code layer and how they differ from the original code layer. Flag upfront any changes that have technical implementation implications that should be reviewed with a developer, such as backend work or API calls.
From prototype to pull request
By the end of the workflow, the pair had a working prototype that pairs the delivery feature with a clearer way to browse items on the map, along with a technical spec of the proposed changes. A developer can read both to determine what remains to be built and tested before users see the feature.
The revised code can then return to the team's branch, or be opened as a pull request for review and testing ahead of release. Because the explorations, comments and spec stay together on the canvas, reviewers have a single place to revisit earlier options and trace how the team settled on this direction.
Converging on one direction
The designer's address selection flow and the teammate's map explorations began as separate efforts. Code layers gave the two a shared space to test each approach, refine the details and merge the work before committing to an implementation.
Code layers is now in open beta for 100% of users. Documentation is available for code layers and the Figma agent.



