Design System Extraction
GenMB doesn't just copy pixels — it extracts your design system. Colors, typography scales, spacing values, and border radii are converted into CSS custom properties for easy customization.
- Colors are extracted as CSS custom properties (--color-primary, --color-secondary, etc.) from your Figma color styles. Update one variable to change the color everywhere.
- Typography scales including font families, sizes, weights, and line heights are mapped to CSS classes. Your Figma text styles become reusable CSS.
- Spacing and padding values are extracted from your auto-layout settings. Consistent spacing in Figma translates to consistent spacing in code.
- Border radii, shadows, and effects from your Figma styles are preserved in the generated CSS.
Token Management
Design tokens extracted from Figma are stored with your app and can be updated independently. Change tokens to refresh the look without regenerating the entire app.
- View all extracted tokens in the Figma panel after import. Each token shows its Figma source and CSS output.
- Edit tokens directly to override Figma values. Useful when you want to adjust colors or spacing without going back to Figma.
- Tokens persist across regenerations. When you refine your app with chat or Agent Mode, the Figma tokens are preserved.
- Export tokens as a CSS file for use in other projects or hand them to your development team.
Tips for Best Results
The quality of your generated code depends on how your Figma file is structured. Follow these tips for the best design-to-code results.
- Use auto-layout in Figma. Auto-layout translates directly to CSS flexbox, producing the most accurate and responsive code.
- Name your layers descriptively. Layer names become CSS class names and HTML element identifiers. 'hero-section' is better than 'Frame 47'.
- Use Figma components for repeated elements. Components are recognized and converted into reusable code blocks.
- Keep designs simple for your first import. Start with a single page or section, verify the output, then import more complex designs.
- Set explicit widths and constraints in Figma. Responsive behavior is inferred from your constraint settings.
Limitations and Workarounds
Figma import handles most common design patterns, but some complex elements may need manual adjustment after generation.
- Complex vector illustrations and custom SVG icons may be simplified. For precise icons, add them manually after generation or use an icon library.
- Advanced animations and interactions from Figma prototyping are not imported. Add animations through chat refinement after initial generation.
- Overlapping elements without auto-layout may produce unexpected positioning. Use auto-layout in Figma for predictable results.
- Very large files with many pages may take longer to process. Import individual frames or pages for faster results.