> Dea 0.9.9 documentation.
> Canonical page: https://dea.dardanica.app/docs/guides/figma/
> Documentation index: https://dea.dardanica.app/llms.txt

# Build from a Figma design

Dea can read a Figma file open in its browser, relate screens to your app's routes and files, and compare a running page against a design frame.

## Before you start

Open your app's project in Dea and connect the agent. Open the Figma file in a Dea tab using an account allowed to edit the file. For a view-only file, duplicate it to your drafts when permitted and use the editable copy.

Browser-based design reading does not require a Figma API token. Some comparison fallback paths can use a token configured in Settings. Optional TypeSafe naming or matching needs its own key; without it, supported matching can fall back to text overlap.

## Read the existing design map

The agent should call `design_map` before building. The map records which Figma screen corresponds to which route and source files, and whether it is built, missing, changed, or needs checking.

The default map lives at `<project>/.dea/design-map.json` with a Markdown companion. `outside: true` keeps it in Dea's own folder instead of the repository.

## Read and select a frame

Use `figma_reader` without a frame to list pages and screens. Large files may list pages first; select a page to get its screens. Then supply `frame_id` to read one frame's structure, values, typography, assets, and component hints.

The reported JSX-like structure is design information. The implementation should use your project's existing framework, components, routes, and theme.

## Implement and compare

Start the project's development server and open the implemented route. Use `compare` with the Figma file URL and frame ID. It can size the app tab to the frame, wait for layout to settle, and return a comparison image plus measured element differences.

Address the measured differences and check the real page's behavior. A visual comparison is evidence about appearance; it does not prove that buttons, validation, or data loading work.

## Record the result

Update `design_map` with the frame, route, URL, source files, and status. Recording a screen as built captures the current design fingerprint. Later `sync` calls can flag changes without overwriting the implementation notes the agent recorded.

`figma_match` can pair several app pages with Figma screens and identify screens that appear on only one side. Review uncertain matches before treating them as authoritative.

## Example request

```text
Use Dea to inspect the editable Figma file at [URL]. Read our design map,
then implement the sign-in frame in this project's existing components.
Run the app, compare the route with the frame, verify the form behavior,
and update the map with its route and source files.
```

If Figma reading fails, confirm the file is open, the account is signed in, and the account can edit that specific file. A recently reloaded Figma tab may need time for its editor to become ready.
