Mockups to code
As a senior designer on a B2B telecom admin portal, I kept seeing my designs rebuilt by hand and drifting in the product. I proposed a new way of working, proved it on one page and won engineering over. Today I lead a live React component library that design and engineering both build with.
The problem
The admin portal had grown over many years. Screens looked and behaved differently, and every new feature re-solved the same patterns: tables, filters, dialogs, empty states.
Developers rebuilt Figma designs by hand, so spacing, states and behaviour drifted. I saw the same gap on every project I handed over, so I set out to fix the handoff itself rather than one more screen.
Proving it on one page first
Before asking anyone to change how they work, I tested the idea on Incoming Call Routing (ICR), a page due for a refactor. I built it as a working prototype in the portal's own stack, and an engineer ran it against the portal's real styles.
What worked
- Faster handoff: developers built from the prototype, not from Figma.
- Fewer mismatches between the design and the shipped page.
- Problems showed up early, inside the real portal layout.
- Earlier validation with product and users caught edge cases and missed use cases.
- Design and engineering discussed the same code, not screenshots.
What needed fixing
- One-off code: nothing carried over to the next page.
- No shared tokens: hard-coded colours, spacing and type drifted.
- Legacy CSS: the portal's old page styles clashed with the prototype's.
Fix the gaps at their source: tokens and components first, then new and refactored pages on a shared library. Engineering agreed that every new feature starts as a code-ready prototype on it. An engineer set up the repository, Storybook and our first AI agent guide; I built the core components in about two weeks.
How I built it
- 1Set the rules for turning Figma into components.
I decide each component's tokens, states, keyboard behaviour and which existing parts it reuses. Those rules live in our AI agent guide, so AI speeds up the build while the decisions stay mine, and I review every change before it's committed.
- 2Built it in the portal's own stack.
React, Tailwind and design tokens in the engineers' own folder structure, so a component moves straight into the product. Engineers guided me on architecture where I needed it.
- 3Documented every component in Storybook.
Docs, variants and live controls for each component, kept in step with the library automatically.
- 4Prototyped with the real components.
Prototypes load the same component files engineers use, so every component change reaches every prototype.
- 5Shared one repository with the engineers.
Design and engineering review each other's pull requests.
A look inside the code
I'm not an engineer, but I work in the same code. Three excerpts, each with a plain-language note:
/*
* StatusCard: summary tile
* label Body 4 · neutral-500
* value Subtitle 1 · neutral-900
* 6px below the label
* subtitle Smaller Text · neutral-500
* 4px below the value
* Surface fill, 8px radius, card shadow,
* 24px padding.
*/The design spec lives in the component
My Figma spec's type, colours and spacing sit at the top of the component, so engineers see the design intent where they work.
<StatusCard
label="Extensions & devices"
value="13"
subtitle="2 awaiting a MAC"
/>One line on the page
Each summary card on the Asset Management page is one line like this, and the product uses the same component, so the card can't drift.
States default, hover, focus-visible,
active, disabled, error
Accessibility correct roles and labels;
keyboard operable
Breaking never remove or rename props
change without a new major versionRules the AI has to follow
From our agent guide. AI drafts components only inside these rules, and I check its work against them before anything is committed.
Prototyping in code-ready form
Every project is delivered as a working prototype, so developers reuse what it already uses instead of translating a mockup.
The walkthrough below shows Asset Management, a single page where admins see every device in a customer's office, from internet routers to desk phones. It highlights what needs attention, such as phones that aren't set up yet, and lets admins add, replace or return equipment without leaving the page.
Design decisions on this page
- Summary first
- Four cards answer “what needs my attention?” before any table.
- Grouped by device type
- Each device type has its own section and actions, so admins never scan one long list.
- Calm by default
- Bulk actions appear only when rows are selected, and long lists collapse behind “Show more”.
What it changed in the library
- Asset Management
- Its dense tables drove a pinned actions column, responsive pagination and five new components for every page. Before handoff, I checked it against the library rules with AI's help.
- Consistency check
- Z-index values had drifted from 1 to 9999. One shared scale of layer tokens replaced them, and toasts stopped hiding behind dialogs in every prototype at once.
- Engineers extend it
- Engineers contributed a server-driven searchable select, a row actions menu and a tooltip refactor, all through reviewed pull requests.
A live library, not a one-time handoff
The library evolves with every project. Nothing is handed over once and frozen; work loops between design and engineering:
- 1I design a feature as a prototype on the library.
- 2Engineers build the real page from it.
They add the data, logic and tests.
- 3The finished page comes back to the design repository.
On demo data, I refine its look and layout.
- 4Engineers review my changes and pull them into the product.
The portal's own tests run before anything ships.
- 5New and improved components go out as a library release.
Every page that uses them updates.
- Design → devMy configuration menu update went in as a pull request, approved by an engineer.
- Dev → designAn engineer's search bar change, linked to a portal ticket, was approved by me.
- Before a pullI check whether incoming engineering changes affect any prototype, with AI doing the first pass.
Quality built in
- Accessibility
- Every component covers keyboard focus and labels; dialogs close with Escape and announce themselves to screen readers. Storybook's accessibility checker flags contrast and labelling issues as I work.
- Testing
- Before handoff, an automated check opens every prototype and product page and fails on errors or blank screens. The portal's own tests run before my edits reach the product.
Decisions and trade-offs
- The engineers' stack, not a design tool's
- Learning their conventions took time and guidance, but it removed the rebuild step entirely.
- Prototypes without a build step
- They load slower than the product, but anyone on the team can open or edit one in a browser.
- A clear line between design and logic
- I own look, layout and components; engineers own data, logic, tests and releases. When a change needs their side, I write it up instead of working around it.
Result
- 50%less development time (engineers' estimate)
- 3.5×faster design reviews on average
- 2 weeksto build the core library after the pilot
- 39components in the library
- 15code-ready prototypes delivered
- Consistent by default
- Prototypes and the product share one set of components, so a fix made once reaches every page.
- A new role
- I moved from handing over mockups to working inside the product's code, with engineers as day-to-day collaborators.
What I learned
Moving fidelity from the mockup into the component made quality something the whole team can enforce.
- A small pilot convinced engineering more than a presentation could have: they saw it working on a real page.
- Clear rules make AI useful: it speeds up execution, while judgment calls stay with me and the engineers.
- What I'd do differently: start with tokens on day one. The pilot's hard-coded values were the first thing we undid.
What's next
- Move more legacy screens onto the library, one page at a time, the way the pilot started.
- Take on more front-end work as the library matures, with guidance from our engineers.