AI can ship your UI faster — unless your Figma is chaos
Implementing mobile layouts is boring work. You're essentially a human compiler — copying padding values, font sizes, and color codes from Figma to your IDE. No creativity, no challenge, just routine.
I tried using Cursor with design screenshots. It would generate something similar, but never accurate enough:
- Inconsistent spacing values
- Wrong font sizes and weights
- Slightly off colors (`#2A2A2A` instead of `#1F1F1F`)
- Design icons replaced with similar ones from MaterialIcons
Then I discovered Figma MCP and everything changed.
Yes, it costs €12/month, but it's worth every cent.
Figma MCP is a bridge between Figma and your coding agent. It provides tools that allow the agent to extract actual design data — variables, styles, and metadata from selected frames. It also provides screenshots so the agent can understand the visual semantics. Combined, the agent gets both the precise design tokens and the visual context.
The results are significantly better.
But here's the critical part — and this is where most setups fail:
The designer must follow atomic design principles
Your designer needs to:
1. Create design tokens (atoms) — colors, fonts, spacings as variables
2. Build components (molecules) from these tokens
3. Compose screens from these components
Think of it as a proper design system hierarchy.
My workflow
As a Flutter developer, I use the AI agent with Figma MCP for the entire process:
1. Tokens → AppTheme
The agent generates color tokens (like primary500, error300`), typography (`heading1, body2`), and spacing (`spacing8, `spacing16`) with matching names from Figma.
2. Components → Reusable widgets
The agent creates Flutter widgets using these tokens.
3. Screens → Complete layouts
I feed the agent context: “tokens are in AppTheme class, components are in `lib/src/core/uikit`” or use a custom skill, and it generates screens using the existing code structure.
The key is naming consistency. When Figma tokens and Flutter code use identical names, the agent can reference them correctly.
Is it pixel-perfect?
No. I still need to review the generated code and make adjustments.
There's a way to make it more reliable using Flutter golden tests — the agent generates a component, compares it to the Figma screenshot, and if pixels don't match, it fixes the code and compares again. But this feels like overengineering for now. The feedback cycle can take too long for simple components.
Manual review is faster.
Garbage in, garbage out
I'm fortunate that my girlfriend creates proper design systems with clean component structure and consistent tokens. This saves me hours of manual implementation.
But I've worked with many designers who focus only on visual appeal without considering implementation. Their Figma files have random spacing values, inconsistent colors, and “components” that aren't actually reusable.
These designs look good but don't generate good code.
Post #62
169
- 👍 4
- 🔥 2