codegen

2 posts

figma

What Codegen Is (Actually) Good For | Figma | Figma Blog (opens in new tab)

Code generation is most useful as an augmentation to the design-to-development process, not as a replacement for developers. Figma found that fully automated design-to-code output often fails because teams use different frameworks, codebases, and patterns. Instead, codegen works best when it provides context, suggestions, and a useful starting point that developers can refine themselves. ## Codegen’s Broad Ecosystem - Codegen automatically produces code from rules or specifications. - It ranges from: - IDE completion tools such as Microsoft IntelliSense - Reusable templates and snippets - Visual programming and no-code platforms such as Bubble - AI assistants such as GitHub Copilot and Replit Ghostwriter - AI codegen adoption is high: 82% of developers surveyed by Stack Overflow in 2023 said they already write code with AI tools. - Trust remains low, however; fewer than 3% reported highly trusting the accuracy of these tools. ## Why Fully Automated Design-to-Code Falls Short - Figma initially envisioned Dev Mode as a way to automate design-to-code conversion. - Early results were promising, but developers often found the generated code impractical or not useful. - Producing code that fits a wide range of frameworks, architectures, and team conventions is difficult. - The better goal is “intelligence amplification”: technology should extend a developer’s capabilities while keeping the developer in control. ## From 0 to 0.5 - Codegen is particularly effective at helping developers move from a blank screen to a partial implementation. - In products with established design systems and component libraries, it can: - Suggest the appropriate component - Surface component names and property values - Reduce guesswork during design handoff - Rather than generating a complete solution, codegen helps developers reach a useful starting point faster. ## Applying Codegen to Existing Design Systems - Codegen delivers the most value when customized for a specific team, company, and workflow. - If a design system and component library already exist in Figma, teams may not need a separate automated design-to-code application. - More useful alternatives include: - Referencing design tokens and variables - Viewing component documentation - Building a Figma codegen plugin - Generating custom code snippets - These tools help developers understand a design quickly while allowing them to write code that matches their own codebase. The practical recommendation is to use codegen as a guided assistant: provide suggestions, reusable patterns, and context, but leave architectural decisions and final implementation to developers.

figma

Introducing Figma’s New Dev Mode | Figma Blog (opens in new tab)

Dev Mode is Figma’s dedicated workspace for developers, designed to reduce friction between design and implementation. It provides familiar inspection tools, customizable code output, integrations with development workflows, and an extension for VS Code. Figma’s broader goal is to keep designers and developers working from the same, up-to-date source of truth. ## A Developer-Focused Workspace - Dev Mode works like a browser inspector for Figma files. - Developers can inspect layers and designs to find: - Measurements and implementation specs - Exportable assets - Design-system context - Connections between visual elements and code concepts - The interface is intended to feel familiar to developers who use tools such as Chrome DevTools. ## Faster, More Flexible Code Handoff - Dev Mode’s code panel includes: - A CSS box model - Modern syntax and tree views - Configurable dimension units - Customizable output for different languages and codebases - Generated code is positioned as a starting point that reduces repetitive translation from design to implementation. ## Connecting Design to the Development Toolchain - Figma’s GitHub integration links designs and components with files, issues, and pull requests. - Plugins connect Figma to tools including: - Jira, Linear, and GitHub for project tracking - Storybook for viewing coded components alongside designs - AWS Amplify Studio, Google Relay, and Anima for code generation - Teams can also build custom plugins to match their own workflows. - Design tokens and variables further improve consistency between design systems and code. ## Tracking Work Toward Production - Dev Mode is intended to support the increasingly blurred boundary between design and development. - It helps teams understand what is ready for implementation and maintain context while designs continue to evolve. - Figma emphasizes collaboration around work that remains in progress rather than waiting for designs to be fully polished. ## Bringing Dev Mode into VS Code - The Figma for VS Code extension lets developers: - Review designs - View comments and notifications - Track design changes - Inspect designs without leaving the editor - Use design-based code autocomplete - This keeps design context inside the developer’s primary coding environment. ## Availability and Pricing - Dev Mode and the VS Code extension were announced as beta features, free to all users through the end of 2023. - Beginning in 2024, Dev Mode requires a paid plan. - Dedicated Dev Mode-only access was planned at: - $25 per seat per month on Organization - $35 per seat per month on Enterprise Figma presents Dev Mode as an initial step toward tighter designer-developer collaboration. Teams should use it alongside integrations such as GitHub, Storybook, and VS Code to keep specifications, implementation context, and feedback in one continuously updated workflow.