Yashada Ghag

AI Workflow

Design System: Figma to Production Code

The design system pipeline, Figma to Claude Code to Storybook: components designed in Figma, Claude Code generating Button, InputField, Modal and other React files, and the Button docs in Storybook
Tools
Figma, Claude Code, Storybook
Timeline
2 days

Why I Created This

Traditional design handoff creates a 2-week lag between mockups and working code. Developers rebuild components from scratch, introducing inconsistencies and accessibility gaps. With AI tools like MCP and Claude Code, designers can now generate production-ready code that developers can actually use.

I built this to show what’s possible when design systems don’t stop at Figma. Instead of handing off static components, I’m shipping live, documented components that the whole team can test and iterate on together.


5 Production-Ready Components

Button, Input field, Modal, Banners with full variant coverage, accessibility baked in, and interactive documentation.


How I Built It

Phase 1: Figma Design System Foundation

Built token architecture (colors, spacing, typography) using an 8px grid system and t-shirt sizing for Tailwind translation.

Figma color tokens: surface, border and text/icon swatches for greyscale, primary, error, warning and success, each in subtle, lighter, default and darker steps

Phase 2: MCP-Powered Code Generation

Used the Figma MCP connector to pull component specs and generate React + Tailwind code. Variants become props automatically.

A Claude Code session in the design-system-portfolio repo: a task list to configure tailwind.config.js with the design tokens, export them as JavaScript objects and set up index.css, then Claude's notes on the Tailwind v4 setup

Phase 3: Storybook Integration

Created interactive stories for all component states. Designers and PMs can test real components without running code.

Storybook with the Banner docs page open: the sidebar lists Banner, Button, Icon and InputField stories, and the preview shows success, info, warning and error banners with and without titles

Challenges & Learnings

  • Getting Tailwind to Work in Storybook

    PROBLEM: Tailwind styles weren’t loading in Storybook initially.

    SOLUTION: Added Tailwind import to Storybook’s config file.

    LEARNING: Small config mistakes = big headaches. Now I double-check setup docs first.

  • Keeping Tokens in Sync

    PROBLEM: Manually updating design tokens between Figma and the Tailwind config file risked drift.

    SOLUTION: Used Claude Code to automate the sync instead of doing it manually.

    LEARNING: Automation prevents human error in design systems.


What I learned

This project taught me that design is shifting fast. AI tools like Claude Code and MCP aren’t replacing designers; they’re changing what ‘designing’ means. The designers who catch onto this early and learn to work with AI are the ones who’ll stay relevant.