Documentation
Figma guidelines

Auto-layout & structure

The single biggest fidelity lever: use auto-layout everywhere so the build stays responsive instead of breaking off-width.

This is the single biggest fidelity lever. Absolute positioning is the #1 cause of a build that looks pixel-perfect at one width and breaks everywhere else.

Why it matters

devlooper reads Figma auto-layout and translates it almost 1:1 into CSS flexbox / grid. When a frame has auto-layout, the build is deterministic - direction, spacing, alignment and sizing come across as exact numbers. When a frame has no auto-layout, the tool has to infer the layout from the picture and from absolute x/y coordinates, and that guess is where responsiveness dies.

Here is the mapping devlooper applies. Direction, gap, padding, alignment and wrap are passed to the build as exact flexbox values; child sizing is passed as a fill / hug / fixed hint that the build turns into the CSS on the right:

Figma auto-layoutBecomes CSS
layoutMode: HORIZONTAL / VERTICALflex-direction: row / column
itemSpacinggap
padding (top/right/bottom/left)padding
primaryAxisAlignItemsjustify-content (MIN/CENTER/MAX/SPACE_BETWEEN)
counterAxisAlignItemsalign-items (MIN/CENTER/MAX/BASELINE)
layoutWrap: WRAPflex-wrap: wrap
child sizing FILLflex: 1 / width: 100%
child sizing HUGwidth: fit-content
child sizing FIXEDan explicit size (use only when genuinely fixed)
Elements placed by hand at fixed positions, next to the same elements in a vertical auto layout with gap 24 and padding 48.

Do

  • Put auto-layout on every container that holds 2+ arranged elements - sections, rows, columns, cards, nav bars, button groups, lists, stat rows.
  • Use real gap and padding instead of nudging elements into place. The gap and padding values become the CSS directly - set them intentionally.
  • Set child sizing deliberately: FILL for a column that should stretch, HUG for a label that should size to its text, FIXED only for genuinely fixed elements (an avatar, an icon). This is what makes the build responsive.
  • Use "Wrap" for anything that should reflow (logo rows, tag clusters, card grids). Wrap is how the tool knows "3 columns → fewer columns → stacked" without you drawing every breakpoint.
  • Nest auto-layout to match the real DOM: section → content column → row → item. A clean nesting tree becomes clean, maintainable markup.

Don't

  • Don't free-position content (headings, paragraphs, buttons, nav, stats, cards) by dragging it to x/y. devlooper deliberately does not copy absolute coordinates for content - it rebuilds from the auto-layout and the screenshot, so free-positioned content gets its placement guessed.
  • Don't fake spacing with empty rectangles or transparent spacer layers. Use gap and padding.
  • Don't rely on "absolute position" inside a frame except for genuine overlays (below).

Genuine overlays - the rare exception

Some things really do stack on top of another element: a badge pinned to a card corner, a scrim over a hero photo, a dropdown, an icon sitting inside a button, a decorative shape bleeding behind content.

devlooper treats a layer as a true overlay only when Figma marks it as absolutely positioned (Absolute position toggle on inside an auto-layout frame). Everything else is treated as responsive flow.

So: for real overlays, turn on Absolute position in the auto-layout panel. That is the explicit signal the tool looks for - it will position exactly those layers absolutely and keep everything else in flow.

Responsive frames

  • Best: provide a frame per breakpoint (desktop / tablet / mobile) so reflow is explicit. Name them so the pairing is obvious (see naming).
  • Acceptable: one desktop frame with correct auto-layout + wrap. The tool infers sensible flow-based reflow (multi-column → fewer → stacked). It can only do this well if the auto-layout and wrap are set - a single absolute-positioned frame gives it nothing to reflow.

Quick self-check

  • Select any section → does the auto-layout panel show a direction, gap and padding?
  • Turn on "Show auto-layout" - are there containers still on "None" that hold arranged content? Those are your fidelity risks.
  • Resize a top-level frame by dragging - does the content reflow sensibly? If it jumps or overlaps, the layout is absolute, not auto.