Skip to content
Tutorials Center
My learning

Topics

Lesson 32 of 36 ยท Collaboration and Handoff

Dev Mode and Handoff

Hand designs to developers with Figma Dev Mode: inspecting measurements, copying CSS, ready-for-dev status, and mapping auto layout to flexbox.

Handoff is the moment a design becomes software. Done badly, developers measure pixels by hand and guess states. Done well, they open the file, see exactly what to build, and copy values that match your tokens. Figma's Dev Mode is a view of the file made for developers: no editing tools, but rich inspection, code snippets and status tracking.

Figma cannot run on this site, and Dev Mode features depend on your plan and seat type. The code examples are labelled JavaScript stand-ins that convert design properties into CSS, to show the mapping. Figma's generated code may differ in detail.

Turning on Dev Mode

Toggle Dev Mode in the toolbar (the </> switch) or press Shift+D. The left panel changes to a list of frames marked Ready for dev; the right panel changes to Inspect. Selecting a layer shows:

  • Measurements: size, position, spacing to neighbors (hover with Alt to see distances).
  • Layout: auto layout direction, gap, padding, alignment.
  • Typography: font family, size, weight, line height, letter spacing.
  • Fills, strokes, effects, with variable and style names.
  • Code: CSS (and other platforms such as iOS or Android, in some configurations) that can be copied.
  • Assets to export.
  • Component information, description and a link to code documentation if you set one.

Because variable names appear next to values, a developer sees color/action/primary and can use the matching token in code, instead of a raw hex.

Preparing a file for handoff

Good handoff starts before Dev Mode:

  1. Use auto layout and components so structure matches code.
  2. Bind colors, type and spacing to variables and styles.
  3. Name layers meaningfully (price, add-to-cart, not Frame 428).
  4. Show all states and responsive behavior (breakpoints, long text, empty and error states).
  5. Mark finished frames Ready for dev (section status or the status menu) so developers know what is final.
  6. Add annotations and notes for anything not obvious: animation timing, validation, conditional logic.
flowchart LR
    D["Designer finishes frame"] --> S["Mark Ready for dev"]
    S --> V["Developer opens Dev Mode"]
    V --> I["Inspect tokens + layout"]
    I --> C["Compare with build"]
    C -->|"mismatch"| Q["Comment on layer"]
    Q --> D

Handoff is a loop: comments in Dev Mode come back to the designer.

Auto layout maps to flexbox

Auto layout is deliberately close to CSS flexbox. Direction becomes flex-direction, spacing between items becomes gap, padding becomes padding, and alignment becomes justify-content and align-items. "Hug contents" becomes width: fit-content or auto sizing, "Fill container" becomes flex: 1 or width: 100%, and "Fixed" becomes an explicit size.

The stand-in below converts a simplified frame description to CSS.

JS Stand-in: auto layout to flexbox CSS

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Dev Mode's own snippets can include absolute positions or extra properties. Treat them as a starting point, not a command: developers should apply the layout model of the target platform.

Spacing and measurement

Developers often need the distance between two elements. In Dev Mode, select one layer and hover another to see the gap in pixels. When spacing comes from auto layout gaps and padding bound to variables, the numbers equal tokens like space/4, and no measuring is needed.

JS Stand-in: map pixel values to the nearest spacing token

Press Run (or Ctrl + Enter) to see the console output here.

No output.

A value that does not match any token is a design bug or a deliberate exception; either way, it deserves a conversation.

Code Connect and component docs

On supported plans, Code Connect links Figma components to real code components so Dev Mode shows the exact import and props for the selected instance, instead of generated CSS. If you do not use it, fill in each component's description with a link to the code docs and the component name used in the codebase.

Annotations and status

Use annotations and measurement tools (available in Dev Mode for designers) to call out behavior: "Truncate after two lines", "Fetch on blur", "Shows skeleton while loading". Status markers (Ready for dev, Completed) keep the list of work clear, and Dev Mode can notify developers when a frame changes after being marked ready.

Common handoff mistakes

  • Missing states: hover, focus, error, empty, loading, long text.
  • Hard-coded values that bypass tokens.
  • Hidden layers and unused components left in the frame.
  • No guidance for responsive behavior between breakpoints.
  • Handoff by screenshot or chat message instead of the file.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which shortcut toggles Dev Mode?

    Shift+D switches between Design and Dev Mode.
  2. 2. Auto layout 'gap' corresponds to which CSS property?

    Gap between items maps to CSS gap in flexbox.
  3. 3. Why bind values to variables before handoff?

    Developers see token names that match the code.
  4. 4. What does marking a frame Ready for dev communicate?

    Status tells developers which designs are finished.

Summary

  • Dev Mode (Shift+D) gives developers measurements, layout details, code snippets, tokens and assets.
  • Prepare files with auto layout, components, variables, clear names and all states.
  • Auto layout maps closely to flexbox; generated CSS is a starting point.
  • Use Ready for dev status, annotations and, where available, Code Connect.
  • Keep feedback in comments on the layers.

Next: Exporting Assets and Plugins