<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Carmen Ansio on Medium]]></title>
        <description><![CDATA[Stories by Carmen Ansio on Medium]]></description>
        <link>https://medium.com/@carmenansio?source=rss-8adaf9d64ef7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*i6YUNd7jIqlB0ZJx_pJfIA.jpeg</url>
            <title>Stories by Carmen Ansio on Medium</title>
            <link>https://medium.com/@carmenansio?source=rss-8adaf9d64ef7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 23:24:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@carmenansio/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How AI Turns Figma into Code]]></title>
            <link>https://www.designsystemscollective.com/how-ai-turns-figma-into-code-c20a3a0412b4?source=rss-8adaf9d64ef7------2</link>
            <guid isPermaLink="false">https://medium.com/p/c20a3a0412b4</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[figma]]></category>
            <dc:creator><![CDATA[Carmen Ansio]]></dc:creator>
            <pubDate>Sun, 29 Jun 2025 18:56:24 GMT</pubDate>
            <atom:updated>2025-06-30T17:44:42.410Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUqSGq70qtBf0YabFh-Mpg.png" /></figure><p>Let’s be real: for decades, a huge gap has separated the worlds of design and development. We’ve all felt the pain of manual handoffs, misinterpretations, and janky implementations. For folks like us, who live on the bridge between those two worlds, our job has always been about translating visual ideas into solid code.</p><p>Our tools have gotten better over the years, for sure. We went from red-lining Photoshop mockups to using tools like Zeplin, and now Figma’s Dev Mode. Each step made the <em>translation</em> process a bit smoother. But it was always the same game: a designer makes a picture of a UI, and a developer turns that picture into code.</p><p>Well, that’s all about to change. We’re on the edge of a massive shift, thanks to three things coming together: smart design systems in Figma, an AI-native code editor called Cursor, and a data bridge called the Model Context Protocol (MCP). We’re not just translating pictures anymore. We’re building <em>machine-readable systems</em> that an AI can understand and build from directly. This guide is for you, the person on the ground, showing you not just</p><blockquote><em>how</em> to use this new workflow, but how to <em>think</em> about it.</blockquote><h3>Building AI-Ready Design Systems</h3><p>Here’s the deal: your AI-powered workflow is only as good as the design system it’s eating. You can’t expect an AI to write great code if you feed it a garbage system. So, before we even get to the cool AI stuff, we need to talk about how to build a design system that’s not just easy for humans to use, but smart enough for a machine to understand.</p><h3>1.1 Guiding Principles for a New Era: From Consistency to Cohesion</h3><p>The old rules for building design systems still apply, but they need a modern twist. That classic hierarchy of <strong>Clarity &gt; Efficiency &gt; Consistency &gt; Beauty</strong>, championed by companies like Salesforce, is still a great starting point. Make it clear, then make it efficient, then make it consistent, and finally, make it pretty.</p><p>But if you get too hung up on “consistency,” you can kill innovation. When consistency is the main goal, the first response to any new idea is usually “no,” because it breaks the pattern. A better way to think about it is <strong>Cohesion over Consistency</strong>.</p><p>Cohesion allows for new things, trusting that as long as they share the system’s core DNA (like tokens and behaviors), they’ll feel like they belong. This mindset is key for a system that needs to be stable enough for an AI but flexible enough for humans.</p><p>This leads to another key idea: <strong>Tools Over Rules</strong>. Your design system should be a “toolbox, not an instruction manual.” An AI, just like a person, works best with powerful, flexible tools and clear guidance, not a rigid set of rules that tells it what to do every step of the way.</p><h3>1.2 Atomic Design as a Composability Framework for AI</h3><p>You’ve probably heard of Brad Frost’s Atomic Design — Atoms, Molecules, Organisms, and all that. People often get it wrong, thinking it’s some rigid, step-by-step process. But its real magic, especially for AI, is as a <strong>way to think about how things fit together</strong>. It gives us a shared language and a clear hierarchy, which is exactly what an AI needs to understand how to build things properly.</p><p>An AI like Cursor needs to get that a “button” (an Atom) can combine with a “label” and an “input field” (other Atoms) to become a “search field” (a Molecule), which then lives inside a “site header” (an Organism). When you build this logic into your Figma file, the AI can generate clean, nested code (like React components) instead of one giant, messy block of HTML.</p><p>While the original atomic language is a great mental model, the industry has mostly shifted to a more practical stack that lines up better with how we build software today: <strong>Tokens -&gt; Primitives -&gt; Components -&gt; Patterns</strong>. It’s the same core idea of building from small to large, just with different labels.</p><h3>1.3 Design Tokens: The Shared Language for Humans and Machines</h3><p>If Atomic Design is the grammar, then design tokens are the words. They are the absolute foundation of any AI-ready system. Think of them as the <strong>single source of truth</strong> for every tiny design decision. A design token isn’t just a variable; it’s a name for a piece of visual info — a color, a spacing value, a font size — that creates a shared language for both a designer in Figma and an AI in a code editor.</p><p>For an AI to use this language, your tokens need semantic depth. A flat list of hex codes won’t cut it. You need a tiered structure to communicate not just the value, but the <strong><em>purpose</em></strong>.</p><p><strong>Tier 1: Primitive Tokens (The Palette)</strong></p><ul><li>These are your raw, context-free values, like your color palette (blue-400: #3498db) or spacing scale (space-4: 16px). These are for reference only and should never be applied directly to a component. They are the “<strong>what</strong>”.</li></ul><p><strong>Tier 2: Semantic Tokens (The Intent)</strong></p><ul><li>This is the most important layer for AI. Semantic tokens give context by naming the token’s purpose. For example, color-background-button-primary-default might point to {blue-400}. When an AI sees this, it knows the hex code, but it also knows the <strong><em>intent</em></strong>: this color is for the background of a primary button in its default state. This is the “<strong>how</strong>” and “<strong>why</strong>”.</li></ul><p><strong>Tier 3: Component-Specific Tokens (The Override)</strong></p><ul><li>This is an optional, extra layer for very complex systems. You might have a token like button-primary-background-color that points to the semantic token color-background-button-primary-default. This creates a super explicit and maintainable system.</li></ul><p>This whole setup creates a “Semantic Contract.” It’s a formal agreement that tells the AI not just what something looks like, but why it exists and how to use it. If a designer breaks this contract — say, by applying a raw red-500 color instead of the semantic color-text-error token—the AI will faithfully replicate that mistake in the code, creating a maintenance nightmare.</p><blockquote>The quality of your system&#39;s architecture directly controls the quality of the AI&#39;s output.</blockquote><h3>Figma as Source, Cursor as Engine</h3><p>Okay, so we’ve got the theory down. Now let’s get practical and talk about the tools. We need to start treating Figma less like a drawing tool and more like a structured database. And we need to see Cursor as more than just a text editor — it’s an AI engine for writing code.</p><h3>2.1 Structuring Figma for Machine Readability</h3><p>To get your designs ready for an AI, you have to treat your Figma library like it’s an <strong>API for your design system</strong>. It needs to be structured, versioned, and documented with machine-like precision.</p><ul><li><strong>Auto Layout is Non-Negotiable:</strong> This is the big one. If you don’t use Auto Layout, your designs are just static layers with random positions. An AI can’t figure out spacing rules or responsive behavior from that. Use Auto Layout for everything.</li></ul><p><strong>Master Variants and Variables:</strong></p><ul><li><strong>Component Variants:</strong> This is how you teach an AI about states (hover, focused, disabled) and variations (primary, secondary, small, large). A single “Button” component with well-defined variants is way more valuable to an AI than twenty separate button frames.</li><li><strong>Figma Variables:</strong> All your styles — colors, spacing, radii — must be applied using Figma Variables. This is how you implement your design tokens. It ensures the AI generates code with CSS variables (var(--color-background-button-primary)) instead of hard-coded magic numbers (#3498db).</li><li><strong>Library Governance:</strong> For teams, use Figma’s admin features to manage and approve official libraries. This ensures everyone — including the AI — is working from the same single source of truth.</li></ul><p>It’s a simple “Garbage In, Garbage Out” situation. Technical debt in your Figma file will become technical debt in your codebase.</p><blockquote>A poorly built component in Figma tells the AI to write bad code.</blockquote><h3>2.2 Cursor: Your AI Co-Pilot for Code</h3><p>Cursor is an AI-first code editor that’s built as a <strong>fork of VS Code</strong>. This is huge, because it means you can bring all your favorite extensions, themes, and keyboard shortcuts with you. The low learning curve makes it a kind of Trojan horse for getting AI into your daily workflow.</p><p>For people bridging design and code, a few of Cursor’s features are game-changers:</p><ul><li><strong>Codebase-Aware Chat:</strong> Cursor can scan your entire project to understand your coding style and architecture. When you ask it to build something new, it can make it fit right in with your existing code.</li><li><strong>Inline Editing &amp; Generation (</strong>Ctrl+K<strong>):</strong> This is your go-to for small jobs. Select some code, hit Ctrl+K, and tell it in plain English what to do—refactor it, or generate something new from scratch.</li><li><strong>Agent Mode (</strong>Ctrl+I<strong>):</strong> This mode gives the AI more freedom for complex, multi-file tasks. A prompt like &quot;Build a user registration page&quot; will make the agent figure out which files to create or change and then do it.21 It&#39;s powerful, but you need to give clear instructions and review its work carefully.</li><li><strong>The </strong>.cursorrules<strong> File:</strong> This is a hidden gem. You can create a file in your repo to give the AI high-level instructions that stick around, like &quot;Keep commit messages under 50 characters&quot;. It&#39;s a great way to pre-program the AI to follow your team&#39;s conventions.</li></ul><h3>The MCP Bridge</h3><p>The bridge connecting the smarts in your Figma file to the AI engine in Cursor is the Model Context Protocol (MCP). Understanding how it works, and how it stacks up against other methods, is key.</p><h3>3.1 A Quick Rundown of Handoff Methods</h3><p>There are a few ways to get a design from Figma into code. Here’s how they compare.</p><p><strong>The Screenshot Method</strong></p><p>This is the quick-and-dirty approach: you feed a static image of the design to the AI. The AI is left to guess at everything — structure, colors, spacing.</p><ul><li><strong>The Good:</strong> It’s incredibly fast and simple. No setup needed.</li><li><strong>The Bad:</strong> The code quality is low. You get brittle, hard-coded “magic values” that are a nightmare to maintain because the AI has no semantic context.</li><li><strong>Best For:</strong> Quick, disposable mockups where the code quality doesn’t matter.</li></ul><p><strong>The Enhanced Prompt Method</strong></p><p>This is a step up. You give the AI a screenshot, but you also write a detailed text prompt to give it more guidance.</p><ul><li><strong>The Good:</strong> You get more control over the output than with just an image, and it’s still very fast.</li><li><strong>The Bad:</strong> It still relies on the AI guessing from a picture, and the quality depends heavily on how good you are at writing prompts. The code isn’t connected to your design system.</li><li><strong>Best For:</strong> Rapidly prototyping a concept when you have specific requirements.</li></ul><p><strong>The Figma Dev Mode Method</strong></p><p>This approach uses Figma’s built-in Dev Mode to get structured data like CSS properties and dimensions.</p><ul><li><strong>The Good:</strong> It provides accurate dimensions and styles, and it’s built right into Figma.</li><li><strong>The Bad:</strong> It’s still a manual copy-and-paste job. It doesn’t give you the deep semantic context, like your token names or component logic. Plus, it requires a paid Figma plan.</li><li><strong>Best For:</strong> A traditional handoff where a developer needs to pull specific, accurate values from a design.</li></ul><p><strong>The Third-Party Plugin Method (e.g., Builder.io)</strong></p><p>Tools like Builder.io’s Visual Copilot use their own powerful AI models to analyze your Figma layers and generate high-quality code.</p><ul><li><strong>The Good:</strong> The code generation is often very accurate and can be configured to match your existing coding style.</li><li><strong>The Bad:</strong> You’re relying on a third-party service, which can have its own learning curve and specific rules.</li><li><strong>Best For:</strong> Teams that want a powerful, ready-to-go solution and don’t want to mess with setting up MCP.</li></ul><p><strong>The Model Context Protocol (MCP) Method</strong></p><p>This is the highest-fidelity approach. MCP is an open protocol that creates a live, direct data channel between Figma and your AI tool.</p><ul><li><strong>The Good:</strong> This is as good as it gets. The AI reads your full semantic structure, component hierarchy, and token relationships, generating clean, maintainable, system-aligned code. It’s also based on an open protocol, which is great for the future.</li><li><strong>The Bad:</strong> It requires the Figma Desktop App and the setup can be a bit tricky since the protocol is still in beta. It can also sometimes struggle with library components versus local ones.</li><li><strong>Best For:</strong> Teams with a mature design system who want the tightest possible integration between design and code.</li></ul><h3>3.2 What Exactly is MCP?</h3><p>At its heart, MCP is an open standard that lets AI models talk to other tools and data sources in a structured way. It’s not just for Figma and Cursor.</p><p>In our workflow, the Figma Desktop App runs a local server that acts as an MCP endpoint. When you give Cursor a special “link to selection” from Figma, it’s not visiting a URL. It’s sending a request to that local server. The server then sends back all the juicy data about the selected object — its layers, Auto Layout rules, variables (tokens), and component properties — as structured data (like JSON) that the AI can understand. This is the key difference: it’s a direct conversation with the design’s data, not a guess based on its looks.</p><h3>3.3 How to Get Connected</h3><p>Setting up the MCP workflow takes a few steps and a bit of patience, since it’s still in beta.</p><p><strong>What you’ll need:</strong></p><ol><li><strong>Figma Desktop App:</strong> The workflow depends on the local server, so it won’t work in the browser version of Figma.</li><li><strong>An Editor with MCP Support:</strong> You’ll need a tool like Cursor that has a built-in MCP client.</li></ol><p><strong>Step-by-Step Setup:</strong></p><ol><li><strong>Enable the MCP Server in Figma:</strong> Go to the main menu in the Figma Desktop App and turn on the Dev Mode MCP Server.</li><li><strong>Configure the MCP Client in Cursor:</strong> In Cursor, go to Cursor → Settings → Cursor Settings → MCP Tools and select &quot;Add new global MCP server&quot;.</li><li><strong>Add the Server Config:</strong> You’ll need to add a bit of JSON to tell Cursor how to talk to the Figma server:</li></ol><pre>&quot;chat.mcp.discovery.enabled&quot;: true,<br> &quot;mcp&quot;: {<br>   &quot;servers&quot;: {<br>     &quot;Figma Dev Mode MCP&quot;: {<br>       &quot;type&quot;: &quot;sse&quot;,<br>       &quot;url&quot;: &quot;http://127.0.0.1:3845/sse&quot;<br>     }<br>   }<br> },<br> &quot;chat.agent.enabled&quot;: true</pre><blockquote>Open the chat toolbar ⌥⌘B and switch to Agent mode, then open the selection tool menu and look for a section labeled: MCP Server: Figma Dev Mode MCP.</blockquote><p><strong>Common Problems:</strong></p><p>Since it’s a beta feature, you might hit some snags. Users have reported connection errors that can sometimes be fixed by restarting both apps. You might also find that links copied from Figma’s Dev Mode work better than the standard “Copy link to selection”. You may need to experiment a bit.</p><h3>The Workflow in Action</h3><p>Okay, theory’s over. Let’s see how this all works in practice by building a real component from start to finish.</p><h3>4.1 Case Study: Building a User Profile Card</h3><p><strong>The Goal:</strong> We need to build a new “User Profile Card” component. The design is done in a well-structured Figma file: it uses Auto Layout, has component variants for different states, and applies semantic design tokens. The target is a React component styled with Tailwind CSS.</p><p><strong>The Prompting Process:</strong></p><p>The magic starts by getting the context from Figma into Cursor.</p><ol><li>In Figma, right-click the main “User Profile Card” component.</li><li>Go to Copy/Paste as → Copy link to selection.</li><li>In Cursor, open a chat and get ready to write a great prompt.</li></ol><p>Writing good prompts is a new core skill. It’s about giving the AI the right mix of freedom and constraints.</p><p>A lazy prompt is just asking for trouble. Something like, “Make this Figma design,” followed by a link, will get you a result, but probably not a great one.</p><p>A high-quality prompt, on the other hand, gives the AI clear instructions and context. It’s less of a command and more of a detailed brief.</p><ul><li><strong>Set the Scene &amp; Goal:</strong> Start by giving the AI a role. “You are a senior front-end developer specializing in React and Design Systems. Your task is to create a new, production-ready React component based on the provided Figma design.” This immediately sets a high bar for the quality of the code.</li><li><strong>Provide Business Context:</strong> Tell the AI <em>why</em> this component exists. “This component, named UserProfileCard, will be part of our application&#39;s user settings page. It should be reusable and accept user data via props.&quot; This helps the AI make smarter decisions about naming and structure.</li><li><strong>Define the Tech Stack:</strong> Be explicit. “Generate the code using React with TypeScript. Use functional components and React Hooks. For styling, use Tailwind CSS utility classes. Do not write any custom CSS.” This prevents the AI from guessing or using outdated patterns.</li><li><strong>Dictate Structure and Naming:</strong> Don’t leave file structure to chance. “Create a new file at src/components/UserProfileCard.tsx. The component should accept a user object prop with name, avatarUrl, and status fields.&quot; This ensures the new code fits neatly into your existing project.</li><li><strong>Point to the High-Fidelity Data:</strong> Finally, direct the AI to use the good stuff. “Here is the link to the Figma design: [Figma link]. Pay close attention to the auto-layout for spacing and use the semantic design tokens for all colors.” This tells the AI to use the rich data from MCP, not just guess from the visuals.</li></ul><h3>4.2 The Code Itself: Semantic vs. Literal</h3><p>The difference in code quality between an MCP-driven workflow and just using a screenshot is night and day.</p><p>The MCP Result (Clean, Semantic Code):</p><p>A good prompt like the one above will result in a clean, maintainable React component that’s hooked into your design system.</p><pre>// src/components/UserProfileCard.tsx<br>import React from &#39;react&#39;;<br><br>type UserProfileCardProps = {<br>  user: {<br>    name: string;<br>    avatarUrl: string;<br>    status: &#39;online&#39; | &#39;offline&#39;;<br>  };<br>  variant: &#39;default&#39; | &#39;editable&#39;;<br>};<br>export const UserProfileCard: React.FC&lt;UserProfileCardProps&gt; = ({ user, variant }) =&gt; {<br>  return (<br>    &lt;div className=&quot;flex items-center p-4 bg-surface-default rounded-lg shadow-md&quot;&gt;<br>      &lt;img src={user.avatarUrl} alt={user.name} className=&quot;w-16 h-16 rounded-full mr-4&quot; /&gt;<br>      &lt;div&gt;<br>        &lt;h3 className=&quot;text-lg font-bold text-text-primary&quot;&gt;{user.name}&lt;/h3&gt;<br>        &lt;p className={`text-sm ${user.status === &#39;online&#39;? &#39;text-text-success&#39; : &#39;text-text-muted&#39;}`}&gt;<br>          {user.status}<br>        &lt;/p&gt;<br>      &lt;/div&gt;<br>      {variant === &#39;editable&#39; &amp;&amp; (<br>        &lt;button className=&quot;ml-auto btn btn-secondary&quot;&gt;Edit&lt;/button&gt;<br>      )}<br>    &lt;/div&gt;<br>  );<br>};</pre><p>Notice how the code uses Tailwind classes that map to semantic tokens (bg-surface-default, text-text-primary) and has a structure that reflects the component&#39;s props and variants.</p><p>The Screenshot Result (Messy, Literal Code):</p><p>In contrast, a prompt using only a screenshot would produce code that looks okay but is a mess under the hood.</p><pre>// A component generated from a screenshot<br>//...<br>&lt;div style={{ display: &#39;flex&#39;, alignItems: &#39;center&#39;, padding: &#39;16px&#39;, backgroundColor: &#39;#FFFFFF&#39;, borderRadius: &#39;8px&#39;, boxShadow: &#39;0 2px 4px rgba(0,0,0,0.1)&#39; }}&gt;<br>  &lt;img src=&quot;placeholder.jpg&quot; alt=&quot;User&quot; style={{ width: &#39;64px&#39;, height: &#39;64px&#39;, borderRadius: &#39;50%&#39;, marginRight: &#39;16px&#39; }} /&gt;<br>  &lt;div&gt;<br>    &lt;h3 style={{ fontSize: &#39;18px&#39;, fontWeight: &#39;700&#39;, color: &#39;#111827&#39; }}&gt;John Doe&lt;/h3&gt;<br>    &lt;p style={{ fontSize: &#39;14px&#39;, color: &#39;#4CAF50&#39; }}&gt;online&lt;/p&gt;<br>  &lt;/div&gt;<br>&lt;/div&gt;ja</pre><p>This code is full of hard-coded “magic numbers.” It’s disconnected from any design system, hard to maintain, and not responsive.</p><h3>4.3 The Human-AI Dance: Iteration and Refinement</h3><p>The AI’s first draft is just that, a draft. Think of it as the work of a super-fast junior developer. Your job is to be the senior dev who reviews the code, refines it, and adds the complex logic the AI can’t figure out on its own.</p><p>This is also a conversation with the AI in Cursor.</p><ul><li><strong>Refactoring:</strong> You can follow up with a prompt like, “Refactor this to use our useUser hook instead of props.&quot;</li><li><strong>Adding Logic:</strong> You can write complex logic yourself or prompt the AI: “Add an onClick handler to the edit button that calls the openEditModal function.&quot;</li><li><strong>Ensuring Accessibility:</strong> This is a huge one. You can prompt the AI: “Make sure this component is fully accessible. Add the right ARIA attributes and make sure the status is announced by screen readers.” This uses the AI’s knowledge but with your human oversight.</li></ul><p>This new workflow flips the old process on its head.</p><p>It’s no longer Design -&gt; Develop -&gt; Test.</p><p>It&#39;s System Architecture -&gt; AI Generation -&gt; Human Refinement. The time you used to spend manually coding the UI is now spent architecting the system upfront and refining the AI&#39;s output at the end.</p><h3>What’s Next for Us?</h3><p>This AI stuff isn’t just about making us faster; it’s changing our jobs. By automating the boring, repetitive parts of turning a design into UI code, AI is pushing us to move “up the stack.” We’re shifting from being hands-on implementers to being architects and orchestrators of these intelligent systems.</p><ul><li><strong>You as the Architect:</strong> Your main job becomes designing and maintaining the smart, machine-readable design systems that the AI consumes. It’s all about systems thinking and information architecture.</li><li><strong>You as the Orchestrator:</strong> Your other main job is to direct the AI. You’ll write high-quality prompts, review the AI’s code, and connect that AI-generated UI to the complex business logic and data that makes an application work.</li></ul><p>This shift is happening because AI, for now, can’t do things that require human judgment or strategic collaboration.</p><blockquote>Your value is amplified because you’re the human in the loop, making sure the final product is not just technically correct, but also smart, useful, and ethical.</blockquote><h3>5.1 The Future of “Living” Design Systems</h3><p>Looking ahead, the relationship between AI and design systems will get even tighter. Right now, the AI <em>consumes</em> the system. In the future, the AI will help <em>maintain and evolve</em> it, creating “living systems” that adapt on their own.</p><p>Imagine a future where an AI can:</p><ul><li><strong>Automatically audit your codebase</strong> for components that have drifted from the design system and open a pull request to fix them.</li><li><strong>Analyze user data</strong> and suggest new patterns for the design system that would solve common user problems.</li><li><strong>Generate documentation and tests</strong> for new components automatically, cutting down on the boring maintenance work.</li></ul><p>This all points to a future of <strong>adaptive and personalized interfaces</strong>, where the design system is a dynamic engine that powers UIs that can change in real-time based on the user, all driven by AI.</p><h3>Mastering Your Co-Pilot</h3><p>So, is AI coming for our jobs? Nope. But it is changing the game. Automating UI code puts a huge premium on the skills that <em>can’t</em> be automated: big-picture systems thinking, smart architecture, and strategic judgment. The AI is only as good as the system you give it. In this new world, the system <em>is</em> the skill.</p><p>The future belongs to those who can build the most intelligent and robust systems for their AI co-pilots to use. The challenge and the opportunity for the modern Design Engineer is to evolve from a builder of interfaces into a master architect of this new, collaborative intelligence.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c20a3a0412b4" width="1" height="1" alt=""><hr><p><a href="https://www.designsystemscollective.com/how-ai-turns-figma-into-code-c20a3a0412b4">How AI Turns Figma into Code</a> was originally published in <a href="https://www.designsystemscollective.com/">Design Systems Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Design Systems Through a Dev’s Eyes]]></title>
            <link>https://www.designsystemscollective.com/your-guide-to-design-systems-from-a-dev-whos-been-in-the-trenches-163fbcf7e5a9?source=rss-8adaf9d64ef7------2</link>
            <guid isPermaLink="false">https://medium.com/p/163fbcf7e5a9</guid>
            <category><![CDATA[design-engineer]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[design-to-code]]></category>
            <dc:creator><![CDATA[Carmen Ansio]]></dc:creator>
            <pubDate>Sun, 22 Jun 2025 12:06:51 GMT</pubDate>
            <atom:updated>2025-06-26T10:34:00.167Z</atom:updated>
            <content:encoded><![CDATA[<p>So, you’ve heard the term “design system” thrown around. Maybe you think it’s just a fancy UI kit or a style guide that designers obsess over. If that’s you, let’s have a chat. Because if you’re an engineer, a design system is about to become your new best friend.</p><p>I’m going to break down what a design system <em>really</em> is, why you should care, and how to build one that doesn’t suck. We’ll go from the absolute basics to the pro-level stuff, all from an engineer’s point of view.</p><h3>Part 1: The Basics — What Are We Even Talking About?</h3><h3>First things first: A Design System is a Product, Not a Project</h3><p>Let’s get this straight: if you treat your design system like a project with a start and an end date, it’s already dead. It’s the number one reason these initiatives fail.</p><p>A design system is a living, breathing <strong>product</strong>. Its users? The designers and developers in your own company. It needs a team, a roadmap, and constant love and care to stay relevant. It’s not a static PDF you create once and forget about; it’s a core piece of your company’s infrastructure.</p><p>Think of it as the single source of truth that finally gets designers and engineers to speak the same language. When you start treating it like a product, you can justify the resources to keep it alive. And trust me, you’ll want to.</p><h3>How to Sell This to Your Boss (Without Mentioning Pretty Colors)</h3><p>Forget aesthetics for a minute. The real value of a design system for engineers is all about speed and risk reduction. When you’re talking to leadership, frame it in terms they understand: efficiency, quality, and saving money.</p><ul><li><strong>Killing Off Debt (The Tech and Design Kind):</strong> Without a system, every team builds their own version of a button. The result? A bloated, buggy codebase and a user experience that feels like a “poorly organized thrift store.” Every one-off component is a new place for bugs to hide and a new headache to maintain. A design system gives you one, battle-tested button to rule them all. It systematically cuts down on the junk that slows you down.</li><li><strong>Hitting Ludicrous Speed:</strong> This is the big one. A good design system is like a massive box of high-quality LEGO bricks. Instead of building every tiny piece from scratch, you’re just assembling. Developers can stop wasting brainpower on pixel-pushing and start solving actual, interesting user problems. This means you ship features faster, which is a huge win for the business.</li><li><strong>Making Your Product Not-So-Buggy:</strong> Components in a design system are usually well-tested for things like browser quirks and accessibility. When you use them, you inherit all that quality for free. Fewer bugs, a more polished product, and a consistent experience that makes users feel like they know what they’re doing.</li></ul><blockquote>Lead with the metrics: “We can cut UI bug reports by X%,” or “We can ship features Y% faster.” Now you’re not just making things pretty; you’re making the business smarter.</blockquote><h3>Where Did This Idea Even Come From? (A Quick History Lesson)</h3><p>This whole “systems” thing isn’t new. It’s an idea stolen from architecture. Back in the 70s, a guy named Christopher Alexander wrote a book called <em>A Pattern Language</em>, which was all about how common building problems have reusable solutions (or “patterns”). Sound familiar?</p><p>In the digital world, Brad Frost’s <strong>Atomic Design</strong> was the game-changer. He gave us a simple analogy: build interfaces like you build with atoms, molecules, and organisms. Atoms are your basic HTML tags (labels, inputs), molecules are small groups (a search form), and organisms are bigger chunks (the site header). This clicked with engineers, especially as frameworks like React made everyone think in components. It gave us a shared vocabulary to finally bridge the gap between design and code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m2fb_YCpY3WUJxKNUjLPdA.png" /><figcaption>Image credit: Brad Frost, bradfrost.com</figcaption></figure><h3>Part 2: The Nitty-Gritty — What’s Actually In a Design System?</h3><h3>The Four Layers of the Cake</h3><p>Don’t think of a design system as just a flat folder of components. It’s a layered cake, where each layer builds on the last. Here’s a simple way to picture it:</p><ol><li><strong>Foundations (The ‘Why’):</strong> This is the core. It’s not your entire brand bible, but the specific rules for digital stuff: the exact color palettes, the type scale, how to use the logo, etc. It’s the philosophy.</li><li><strong>Tokens (The ‘What’):</strong> This is the magic layer. It turns the philosophy into data. The idea of a “primary brand color” becomes a variable like $color-brand-primary with a hex code attached. These are your single source of truth for every style.</li><li><strong>Core Systems (The ‘How’):</strong> This layer provides ready-made solutions for common problems, like a grid system for layout or the logic for light/dark mode. It uses the tokens to build these systems.</li><li><strong>Components (The ‘Things’):</strong> This is the layer everyone sees and uses — the actual buttons, cards, and menus. A well-built component is made from the layers beneath it: it’s arranged by the Core Systems and colored with the Tokens. That’s what makes it so powerful.</li></ol><h3>Deep Dive: Design Tokens are the API for Your UI</h3><p>If you only pay attention to one technical part of this article, make it this one. <strong>Design tokens are the most critical piece of a modern design system.</strong> They are design decisions, stored as data. They are the API that connects your design language to your code.</p><h4>Why We Can’t Just Use Variables</h4><p>The idea of design tokens came from Salesforce back in 2014. They had a massive product suite and needed to keep it all looking consistent. At first, this was just simple Sass variables. But what happens when you need a dark mode? You can’t just change $brand-primary from blue to a lighter blue, because its <em>role</em> might change completely. What was a background color might now be a text color.</p><p>This problem forced the evolution from a flat list of variables to a tiered token architecture. This isn’t just a nice-to-have; it’s a requirement for any system that needs to do more than one thing.</p><h4>The Three Tiers of Tokens</h4><p>A scalable token system has three layers. This is how you handle theming without going insane.</p><ol><li><strong>Primitive Tokens (The Palette):</strong> This is your giant box of crayons — every possible color, spacing unit, etc., that your brand might use. The names are generic, like blue-500 or space-4. They have no context. Think of these as &quot;private&quot; variables; product developers shouldn&#39;t touch them directly.</li><li><strong>Semantic Tokens (The Meaning):</strong> This is the most important layer. It connects the raw primitives to their purpose. For example, the token color-background-interactive-primary might point to blue-500 in your light theme. But in your dark theme, that <em>same</em> semantic token could point to blue-300. Your developers <em>only</em> use these semantic tokens. This is the secret to theming: you can swap out the entire look of an app just by changing what the semantic tokens point to, without touching a single line of component code.</li><li><strong>Component-Specific Tokens (The Overrides):</strong> This is the “break glass in case of emergency” layer. These tokens apply a style to one specific part of one component. For example, maybe your Tooltip component needs a sharper corner radius than everything else. You could create a border-radius-tooltip token. Use these sparingly, or you’ll lose consistency.</li></ol><p>Here’s what that structure might look like in code:</p><pre>{<br>  &quot;color&quot;: {<br>    &quot;primitive&quot;: {<br>      &quot;blue&quot;: {<br>        &quot;500&quot;: { &quot;value&quot;: &quot;#0052cc&quot; },<br>        &quot;300&quot;: { &quot;value&quot;: &quot;#5E9EFF&quot; }<br>      }<br>    },<br>    &quot;semantic&quot;: {<br>      &quot;background&quot;: {<br>        &quot;interactive&quot;: {<br>          &quot;primary&quot;: {<br>            &quot;light&quot;: { &quot;value&quot;: &quot;{color.primitive.blue.500.value}&quot; },<br>            &quot;dark&quot;: { &quot;value&quot;: &quot;{color.primitive.blue.300.value}&quot; }<br>          }<br>        }<br>      }<br>    },<br>    &quot;component&quot;: {<br>      &quot;button&quot;: {<br>        &quot;background&quot;: {<br>          &quot;primary&quot;: { &quot;value&quot;: &quot;{color.semantic.background.interactive.primary}&quot; }<br>        }<br>      }<br>    }<br>  }<br>}</pre><h4>How to Name Your Tokens (So People Actually Use Them)</h4><p>Your token names are your API. Make them predictable. A good convention is [category]-[component]-[variant]-[state].</p><ul><li><strong>Example:</strong> color-background-button-primary-hover</li></ul><p>The golden rule: <strong>Name tokens by their role, not their value.</strong> Call it color-text-danger, not red. Why? Because if your brand decides danger is now orange, you only have to update the token&#39;s value. The name is still meaningful, and you avoid a massive, soul-crushing find-and-replace mission.</p><h4>The Magic Wand: Tools for Transforming Tokens</h4><p>So you’ve got your tokens defined in a neutral format like JSON. How do you get them into CSS, Swift, and Android XML? You use a transformation engine.</p><p>The industry standard is <strong>Style Dictionary</strong>. It’s a tool that takes your JSON files and spits out code in almost any format you can imagine. This is how you enforce your design system as the single source of truth. A designer updates a color, you run the pipeline, and new, versioned packages get published for every platform. Another killer tool is <strong>Tokens Studio for Figma</strong>, which lets you manage tokens in a UI inside Figma and can sync them straight to a GitHub repo.</p><h3>Components and Patterns: Your LEGOs and Instruction Manuals</h3><p>While tokens are the soul, components and patterns are the body.</p><ul><li><strong>Components</strong> are the tangible, coded LEGO bricks: the buttons, inputs, and cards. They have a clear API (their props) and defined behavior.</li><li><strong>Patterns</strong> are the instruction manuals. They’re reusable solutions to common problems, like how to handle a login flow or what an empty state should look like. A pattern often uses several components together to achieve a user goal.</li></ul><p>Big-league systems like Google’s Material Design have huge libraries of both, often categorized by what they do (Actions, Communication, etc.). The Atomic Design hierarchy (Atoms, Molecules, Organisms) is a great way to structure your component library to encourage building big things from small, reusable pieces.</p><h3>Part 2: The Architect — Strategy and Rules of the Road</h3><h3>You Need a Unicorn: The Design Engineer</h3><p>The success of your design system rests on a special kind of person: the <strong>Design Engineer</strong>. This isn’t just a front-end dev who likes pretty things, or a designer who knows a little CSS. This is a true hybrid, a specialist who lives at the intersection of design and code. They might be called a UX Engineer, a Creative Technologist, or a Design System Architect, but their job is the same: to be the bridge. They’re “designers who code,” equally happy architecting a component API as they are tweaking an animation in Figma.</p><h4>What Do They Actually Do?</h4><ul><li><strong>Build Prototypes in Real Code:</strong> Forget click-through mockups. A Design Engineer builds high-fidelity prototypes with actual code to test complex interactions and see how they <em>feel</em> on a real device. This saves countless hours by spotting technical problems early.</li><li><strong>Build and Maintain the Component Library:</strong> This is their bread and butter. They turn design specs into performant, accessible, and easy-to-use coded components.</li><li><strong>Architect the Whole System:</strong> They make the big technical decisions: monorepo or multi-repo? What CI/CD pipeline do we need? How do we manage the token pipeline?</li><li><strong>Spread the Gospel:</strong> A system is useless if no one uses it. The Design Engineer is an evangelist. They write the docs, run workshops, and provide the support that builds trust and gets other teams on board.</li></ul><h4>Solving the “Handoff from Hell”</h4><p>The traditional handoff from design to development is a broken mess. Designers create static pictures that don’t account for edge cases or technical limits, and engineers are left to guess what they meant.</p><p>The Design Engineer kills this problem. By being in the room from the start, they can ask the hard questions early: “What happens when this text is super long?” “What’s the keyboard navigation supposed to be?” “Can we even get this data from the API?” This collaboration means what gets designed is what actually gets built, saving everyone a world of pain.</p><h3>How to Structure Your Code: The Big Decisions</h3><p>The technical architecture of your system will define its future. These are the big choices a Design Engineer has to make.</p><h4>One Big Folder or a Million Little Ones? The Great Repo Debate</h4><p><strong>The Monorepo:</strong> This is a single repository that holds everything — your tokens, your React components, your docs, all in one place.</p><ul><li><strong>Why it’s awesome:</strong> It makes sharing code a breeze. A change to a token and the component that uses it can happen in one single commit. Tooling and testing are standardized across the board.</li><li><strong>The catch:</strong> It can get slow as it grows, and your CI/CD pipeline needs to be smart enough to only test the stuff that actually changed.</li></ul><p><strong>The Multi-repo:</strong> A separate repo for everything. One for tokens, one for components, etc.</p><ul><li><strong>Why it’s simple:</strong> Each part has clear ownership and its own release cycle.</li><li><strong>The catch:</strong> Welcome to “dependency hell.” A change in the token repo means you have to update every single component repo that uses it. It’s slow and a recipe for things getting out of sync.</li></ul><p><strong>The verdict? For most design systems, the monorepo is the way to go.</strong> The benefits of easy dependency management are just too good to pass up, especially with modern tooling.</p><h4>Your Monorepo Toolkit</h4><p>To pull off a monorepo, you need the right tools:</p><ul><li><strong>Workspace Management (Yarn/PNPM Workspaces):</strong> These tools let your local packages talk to each other without having to publish them to npm first. Super handy for development.</li><li><strong>Task Orchestration (Turborepo/Nx):</strong> These are the brains of the operation. They understand which packages depend on others and are smart about running tasks. Change the docs? It won’t waste time re-testing your components. They also have amazing caching, which makes builds lightning fast.</li><li><strong>Versioning and Publishing (Changesets/Lerna):</strong> When you’re ready to release, these tools help you version and publish all your packages. They figure out what changed, prompt you for the right version bump, generate changelogs, and push to npm.</li></ul><p>Want to see a masterclass in action? Check out <strong>Shopify’s Polaris</strong> on GitHub. It’s a beautifully organized monorepo using PNPM and Turborepo.</p><h4>How to Release Updates Without Causing Mass Panic</h4><p>Your versioning strategy is a contract with your users (the other devs). If they can’t trust your updates, they’ll stop using your system.</p><blockquote>Use Semantic Versioning (SemVer). No Excuses.</blockquote><p>This is non-negotiable. The rules are simple:</p><ul><li><strong>MAJOR (X.y.z):</strong> For breaking changes. Users know they’ll have to do some work to upgrade.</li><li><strong>MINOR (x.Y.z):</strong> For new features that don’t break anything. A safe upgrade.</li><li><strong>PATCH (x.y.Z):</strong> For bug fixes that don’t break anything. A <em>very</em> safe upgrade.</li></ul><h3>Pick Your Release Style</h3><p>How you apply SemVer depends on your company’s culture.</p><p><strong>Major Library Versioning</strong></p><p>The whole system is one big package (like my-system@5.0.0), and releases are large and infrequent. This is great for big companies like IBM (Carbon) or Google (Material UI) that need stability and can plan for major migrations.</p><ul><li><strong>Pros:</strong> It’s simple to manage, ensures everyone is on a consistent set of components, and provides predictable, stable releases.</li><li><strong>Cons:</strong> Breaking changes are disruptive to the whole system, forcing large migrations. The release cycle is slow, and teams can’t get individual fixes quickly.</li></ul><p><strong>Incremental Library Versioning</strong></p><p>The system is still one package, but releases are small, frequent, and mostly non-breaking. This is perfect for agile organizations like Adobe (Spectrum) or Salesforce (Lightning) that value speed and continuous improvement.</p><ul><li><strong>Pros:</strong> Allows for continuous delivery of fixes and features with low friction for adopting teams.</li><li><strong>Cons:</strong> Requires excellent communication and clear release notes so consumers don’t get lost in the frequent updates.</li></ul><p><strong>Component-Level Versioning</strong></p><p>Every single component is its own package (like @my-system/button@1.2.0). This offers maximum flexibility and is used by large, decentralized companies like Twilio (Paste) and Atlassian.</p><ul><li><strong>Pros:</strong> Teams can update a single component without touching the rest of their UI, isolating the impact of breaking changes.</li><li><strong>Cons:</strong> Can lead to “dependency hell” in applications and a risk of visual inconsistency if teams use components from different generations. It also requires more tooling overhead.</li></ul><p>The key is to match your release style to how your product teams work. Don’t be a blocker.</p><p><strong>Be a Good Communicator</strong></p><ul><li><strong>Breaking Changes:</strong> Announce them early and often. Provide clear migration guides that walk people through the changes step-by-step.</li><li><strong>The Changelog:</strong> This is your most important communication tool. Don’t just dump git commits. Write a human-readable log with clear sections like Added, Changed, and Fixed for every release.</li></ul><h3>Who’s in Charge Here? Governance and Contribution</h3><p>Governance is just a fancy word for the rules about who can build what and how. Without it, you have chaos.</p><h4>Picking Your Governance Style: Centralized vs. Federated</h4><p><strong>Centralized</strong></p><p>A single, dedicated team builds and owns the whole system. This model is ideal for companies in regulated fields like finance or healthcare, or for those just starting their design system journey where establishing a strong foundation is key.</p><ul><li><strong>Pros:</strong> Super consistent and high-quality, with clear ownership and efficient decision-making.</li><li><strong>Cons:</strong> The team can become a bottleneck and may lose touch with what product teams actually need. It can be perceived as restrictive.</li></ul><p><strong>Federated</strong></p><p>Responsibility is shared among people from different product teams who contribute part-time. This scales well and is great for large, mature organizations with many autonomous teams and a strong existing design culture.</p><ul><li><strong>Pros:</strong> Highly scalable, contributions come from people with deep product knowledge, and it fosters a sense of ownership that drives adoption.</li><li><strong>Cons:</strong> The risk of inconsistency is high without strong oversight, and it can be hard to drive major initiatives without a central authority.</li></ul><p><strong>Hybrid (Hub-and-Spoke)</strong></p><p>A small central team (the “hub”) manages the core architecture and governance, while contributors from product teams (the “spokes”) build and contribute components back to the system. This is the “best of both worlds” and the model most large companies land on.</p><ul><li><strong>Pros:</strong> Balances central control with distributed contribution, providing strategic oversight with local autonomy.</li><li><strong>Cons:</strong> Requires excellent communication between the hub and spokes, and defining the boundaries of responsibility can be tricky.</li></ul><h4>The “You Must Be This Tall to Ride” Guide to Contributing</h4><p>You need a formal process for adding new things to the system. This is your quality gate.</p><ul><li><strong>The Proposal:</strong> It starts with a detailed GitHub issue. The template should force the person to explain the <em>problem</em> they’re solving, not just the solution they want.</li><li><strong>The “Definition of Ready”:</strong> Before anyone writes a line of code, the proposal needs to be fully baked. This means final designs, accessibility rules defined, and the component’s API (its props) all figured out.</li><li><strong>The Pull Request:</strong> The contribution is submitted as a PR. This is where the robots take over. Linters check code style, unit tests run, and visual regression tests check for accidental visual changes. Then, humans from the design system team review it for quality and consistency.</li><li><strong>Approval &amp; Release:</strong> Once it passes all the checks, the PR is merged. This can automatically trigger the release pipeline, which versions and publishes the new package for everyone to use.</li></ul><h3>Part 3: The Builder — Getting Your Hands Dirty</h3><h3>From Figma to React: The Dream vs. The Reality</h3><p>The journey from a pretty picture in Figma to a working React component is where things usually fall apart.</p><ul><li><strong>The Old Way:</strong> Designers hand over “redline” specs, and engineers manually translate every pixel value into code. It’s slow, boring, and full of errors.</li><li><strong>The AI Dream:</strong> Tools like <strong>Locofy</strong>, <strong>Builder.io</strong>, and <strong>Anima</strong> promise to turn your Figma designs into code with one click. And they kind of do! They can create responsive layouts and even generate components with props.</li><li><strong>The Reality Check:</strong> The code they spit out is… okay. It’s great for a first draft, but it’s often not production-ready. It can be messy, inefficient, and miss the mark on accessibility.</li></ul><p>So, are these tools useless? Not at all! They just change the game. The new workflow isn’t about replacing engineers; it’s about giving them a better starting point. Instead of asking an AI to build a generic button from scratch, you prompt it to use <em>your</em> button: Generate a form that uses &lt;MyCoolButton variant=&quot;primary&quot;&gt;.</p><p>Your design system becomes the quality-control layer for AI. The Design Engineer’s job shifts from manual coding to expertly refactoring the AI’s output to meet production standards.</p><h3>The Great Debate: React-Only or Plays-Well-With-Others?</h3><p>This is a huge architectural choice: do you build your components for a specific framework (like React) or make them framework-agnostic (with Web Components)?</p><p><strong>The Case for React:</strong></p><ul><li><strong>Great Developer Experience:</strong> The ecosystem is mature, and developers are already productive in it.</li><li><strong>Performance:</strong> The Virtual DOM is great for complex apps with lots of updates.</li><li><strong>The Downside: Lock-in.</strong> If your company ever decides to move off React, you have to rebuild everything from scratch.</li></ul><p><strong>The Case for Web Components:</strong></p><ul><li><strong>Future-Proof:</strong> They’re built on browser standards. A Web Component you build today will still work in ten years, no matter what framework is cool then.</li><li><strong>True Encapsulation:</strong> The Shadow DOM keeps styles from leaking in or out, so your component looks the same everywhere.</li><li><strong>The Downside: Clunky DX.</strong> The tooling and ecosystem aren’t as polished. You often end up writing wrappers to make them play nice with frameworks anyway, which kind of defeats the purpose.</li></ul><p><strong>The Pragmatic Answer? A Hybrid Approach.</strong> Build your core, universal elements (buttons, inputs) as framework-agnostic Web Components. Then, build thin, framework-specific libraries (like for React) that wrap these core components to provide a nicer developer experience. You get long-term stability <em>and</em> a great DX.</p><h3>How to Build Components That Don’t Suck (in React)</h3><p>No matter the framework, your components need to be fast and accessible.</p><h4>Performance is a Feature</h4><ul><li><strong>Stop Unnecessary Re-renders:</strong> This is the biggest performance killer in React. Use React.memo to wrap components so they only re-render when their props change. Use useMemo and useCallback to cache expensive calculations and functions.</li><li><strong>Keep State Local:</strong> Don’t use global state for everything. The more local your state is, the fewer components will re-render when it changes.</li><li><strong>Lazy Load Your Components:</strong> Your app shouldn’t have to load the code for every single component on the first page load. Use React.lazy and Suspense to load components only when they&#39;re needed.</li><li><strong>Virtualize Long Lists:</strong> If you’re rendering a list with thousands of items, don’t put them all in the DOM. Use a “virtualization” library like react-window to only render the items the user can actually see.</li></ul><h4>Bake Accessibility In from the Start</h4><p>Accessibility isn’t a feature you add later. It’s a requirement.</p><ul><li><strong>Use Semantic HTML:</strong> If it looks like a button, make it a &lt;button&gt;. This gives you a ton of accessibility for free.</li><li><strong>Use ARIA When You Have To:</strong> For complex components, use ARIA attributes (role=&quot;dialog&quot;, aria-expanded=&quot;true&quot;) to tell screen readers what&#39;s going on.</li><li><strong>Manage Focus:</strong> This is critical for keyboard users. When a modal opens, you <em>must</em> move focus inside it and trap it there. When it closes, you <em>must</em> return focus to whatever opened it. Use useRef and useEffect to handle this.</li><li><strong>Make Everything Keyboard-Navigable:</strong> Every interactive element must work with a keyboard. Period.</li></ul><p>Here’s a quick example of an accessible button component in React:</p><pre>import React from &#39;react&#39;;<br>import PropTypes from &#39;prop-types&#39;;<br><br>const AccessibleButton = ({ onClick, children, ariaLabel }) =&gt; {<br>  return (<br>    &lt;button<br>      type=&quot;button&quot;<br>      className=&quot;btn&quot;<br>      onClick={onClick}<br>      aria-label={ariaLabel |<br>| children}<br>    &gt;<br>      {children}<br>    &lt;/button&gt;<br>  );<br>};<br>AccessibleButton.propTypes = {<br>  onClick: PropTypes.func.isRequired,<br>  children: PropTypes.node.isRequired,<br>  ariaLabel: PropTypes.string,<br>};<br>export default AccessibleButton;</pre><h3>Your Automated Quality Control Factory: Testing at Scale</h3><p>A bug in a design system component is a bug that ships to <em>every</em> product. Your testing game has to be strong. This is where a CI/CD pipeline becomes your best friend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qcs63GdOeZ2RBOFMPeTW0Q.png" /><figcaption>Image credit: ByteByteGo, bytebytego.com</figcaption></figure><p>On every pull request, your pipeline should automatically:</p><ul><li>Build the code and run unit tests.</li><li>Lint the code to check for style issues.</li><li>Run your token transformation engine.</li><li>Run visual regression tests.</li><li>Once merged, automatically version and publish the packages to npm and deploy your documentation site.</li></ul><h4>Visual Regression Testing: The Ultimate Safety Net</h4><p>Unit tests are great, but they can’t see. They won’t catch that you accidentally changed the button color from blue to hot pink. Visual regression testing does. It’s like an automated game of “spot the difference” for your UI.</p><p>Here’s how it works:</p><ul><li>You take a “baseline” screenshot of what a component is <em>supposed</em> to look like.</li><li>Whenever code changes, the pipeline takes a new screenshot.</li><li>A tool compares the two and highlights any differences.</li><li>A human looks at the “diff.” If it’s an intended change, you approve it and it becomes the new baseline. If it’s a bug, you reject the PR.</li></ul><p>Tools like <a href="https://www.chromatic.com/"><strong>Chromatic</strong></a> (from the Storybook team) and <a href="https://percy.io/"><strong>Percy.io</strong></a> make this process dead simple and integrate right into your pull requests. This is the single best way to prevent accidental visual bugs from spreading everywhere.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w1i0kz1PTjidaw1QkpzlwA.png" /><figcaption>Image credit: Chromatic, <a href="http://chromatic.com/">chromatic.com</a></figcaption></figure><h3>Part 4: The Fun Stuff — Advanced Moves and The Future</h3><h3>One System, Many Looks: The Magic of Theming</h3><p>So you need to support light mode, dark mode, and three different sub-brands from one system. Nightmare, right? Not if you architected your tokens correctly.</p><p>This is where your semantic tokens shine. Your components are built to use a token like color-background-primary. To create a new theme, you just create a new token file that maps that same token to a different primitive value.</p><ul><li><strong>Light Theme:</strong> color-background-primary -&gt; white</li><li><strong>Dark Theme:</strong> color-background-primary -&gt; black</li></ul><p>The user flips a switch, the app loads the new token set, and voilà — instant theme change. No component code was harmed in the making of this feature. Figma’s Variables and Modes let you do this right in your design tool, and tools like <strong>Tokens Studio</strong> can sync it all to code.</p><h3>Stealing from the Greats: What We Can Learn from Google, IBM, Shopify, and Stripe</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5B3K8A9gk9EHo9NmEeuFA.png" /><figcaption>Image credit: Material UI, <a href="https://m3.material.io/foundations/design-tokens/overview">m3.material.io</a></figcaption></figure><ul><li><strong>Google Material Design:</strong> They are the masters of theming. With <a href="https://m3.material.io/">Material</a> You, their entire system is built on a deep, three-tiered token architecture that allows for incredible customization. They also provide native component libraries for Android, Flutter, and the Web, showing a commitment to cross-platform consistency.</li><li><strong>IBM Carbon:</strong> <a href="https://carbondesignsystem.com/">Carbon</a> is a masterclass in enterprise-grade systems. Their focus on accessibility is second to none, and it’s baked into every component. Architecturally, their commitment to providing first-party packages for React and Web Components, while supporting community versions for others, is a smart, pragmatic way to meet developers where they are.</li><li><strong>Shopify Polaris:</strong> If you want to see an amazing developer experience, look at <a href="https://polaris-react.shopify.com/">Polaris</a>. Their monorepo is a work of art, and their documentation is crystal clear, which is critical for their huge ecosystem of third-party app developers.</li></ul><p><a href="https://stripe.com/en-es/payments/elements"><strong>Stripe Elements</strong></a>, for example, is a set of prebuilt UI components for building payment forms. The genius here is that Elements abstracts away massive complexity — like PCI compliance, input validation, localization, and accessibility — while still allowing enough customization to match a brand’s look and feel. Their system thinking extends deep into their API design, which is famously consistent and predictable, demonstrating that a great system considers the entire developer experience, not just the UI. For third-party developers building apps inside the Stripe Dashboard, they provide a separate, more constrained set of UI components and tokens, intentionally limiting custom styling to ensure the core Stripe experience remains cohesive and accessible.</p><p>Here’s a simple example of how you might use Stripe Elements in a React app:</p><pre>import {Elements} from &#39;@stripe/react-stripe-js&#39;;<br>import {loadStripe} from &#39;@stripe/stripe-js&#39;;<br>import CheckoutForm from &#39;./CheckoutForm&#39;;<br><br>// Make sure to call `loadStripe` outside of a component&#39;s render to avoid<br>// recreating the `Stripe` object on every render.<br>const stripePromise = loadStripe(&#39;your-publishable-key&#39;);<br>function App() {<br>  const options = {<br>    // passing the client secret obtained from the server<br>    clientSecret: &#39;{{CLIENT_SECRET}}&#39;,<br>  };<br>  return (<br>    &lt;Elements stripe={stripePromise} options={options}&gt;<br>      &lt;CheckoutForm /&gt;<br>    &lt;/Elements&gt;<br>  );<br>};</pre><h3>The Next Frontier: Your New Junior Dev is a Robot</h3><p>AI is about to change everything, and design systems are at the center of it all.</p><h4>AI as Your Co-Pilot</h4><p>AI isn’t going to take your job. It’s going to take the most boring parts of your job. LLMs can already be trained on your system’s docs to write boilerplate code for new components, generate unit tests, and even translate your entire library from React to Vue.</p><p>But let’s be real: the code it generates is maybe 50–80% of the way there. It’s a great “junior dev” that gives you a solid first draft, but it still needs a human expert to review it, refine it, and get it over the finish line.</p><p>The crazy part? The better your design system is documented, the better the AI will be. A great design system is now a prerequisite for leveraging AI effectively.</p><h4>The Tools are Getting Smarter</h4><p>This is moving fast. <strong>Figma AI</strong> is building AI right into the design tool to do things like auto-name your layers. <strong>GitHub Copilot</strong> is getting smarter about suggesting code based on your existing system. And Microsoft’s work on its <strong>Copilot</strong> framework shows a future where design systems aren’t just libraries of components, but intelligent “agents” that can perform complex tasks based on natural language.</p><h4>So, Are We All Out of a Job?</h4><p>Nope. Your job is just getting more interesting. As AI handles more of the grunt work, the role of the Design Engineer shifts from <em>maker</em> to <em>curator</em> and <em>orchestrator</em>.</p><p>Your value will be in your <em>taste</em> — your ability to look at 100 AI-generated options and know which one is right. You’ll be the architect who builds the clean, well-documented systems that the AI trains on. You’ll be the one solving the hard problems that AI can’t touch.</p><h3>The Takeaway</h3><p>A design system isn’t just a library of components. It’s a product. It’s a strategic asset. It’s the engine that lets you build better, more consistent products, faster.</p><p>From an engineer’s perspective, it’s about applying smart architecture, solid tooling, and rigorous processes to solve the chaos of modern product development. The future isn’t about being replaced by machines; it’s about learning to conduct the orchestra. And the Design Engineer is standing at the podium, baton in hand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=163fbcf7e5a9" width="1" height="1" alt=""><hr><p><a href="https://www.designsystemscollective.com/your-guide-to-design-systems-from-a-dev-whos-been-in-the-trenches-163fbcf7e5a9">Design Systems Through a Dev’s Eyes</a> was originally published in <a href="https://www.designsystemscollective.com/">Design Systems Collective</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>