Analysis of GitHub's Primer Design System
A close study of GitHub's Primer, reverse-engineered in Figma to understand how a mature design system holds together.
- Roles
- UX Designer · Design System
- Duration
- 4 weeks
- Year
- 2025
Figma

Understanding and reconstructing GitHub's design system
I reverse-engineered GitHub's Primer design system to learn how a mature one is actually built. Working in three phases — interface inventory, foundations, and component architecture — I rebuilt key parts in Figma, using local variables to wire tokens, states, and themes together. The point was to see, firsthand, how Primer holds up across contexts and color modes.
Why I studied Primer
I like how Primer looks and how it behaves, and I wanted to learn from a real production system instead of theorizing about one. Rebuilding it in Figma was the most direct way to study how decisions, tokens, and reuse get structured at that scale. It also forced me to get sharper at Figma variables for dark/light, states, and variants.
System thinking
Get clearer on how themes, tokens, and accessibility actually relate to each other
Atomic design at scale
See how atomic design holds up when applied to a real production library, not a tutorial example
Figma variables
Use variables and logic inside Figma to handle dark/light modes, states, and variants in one place
Library quality
Build an artifact that shows how a component library supports code quality and product UX together
Interface inventory
Mapping the system's foundation
I started with a UI audit across GitHub's product, pulling out the core elements — buttons, links, inputs, nav — and documenting how each one looks, how its states change, and how it shifts between themes. The audit gave me a baseline of what was actually in the system before I tried to rebuild any of it.
Foundations
Before rebuilding components I mapped the underlying tokens: color, spacing, typography, and the relationships between them that power light/dark switching.
Atoms
Reconstructing GitHub's basic elements
I rebuilt the basics first: buttons, links, and inputs. For each one, I worked through every property, variation, and theme combination (light and dark). The lever that made it scale was Figma local variables — wiring component properties to variables meant a single change at the token layer cascaded through every state and theme, instead of needing to be re-applied to each variant by hand.
Buttons
All primary, secondary, and invisible button variants recreated with semantic controls for icon toggles and modes.
Inputs
Built adaptive text inputs with full state coverage (rest, hover, disabled, error) and token-based layout.
Links
Captured usage across interactions and modes, and tokenized typography and color handling for scale.
Molecules
Bringing logic into reusable component sets
Working up from the atoms, I built molecular components — icon buttons, nav items — that combine multiple atoms with their own behavioral logic. The toggles for these live in Figma's right-hand panel, so a designer can switch a state without digging into the component itself.
Icon buttons
Navigation components
Organisms
Data-rich, flexible components with inherited logic
To go beyond surface-level components, I rebuilt GitHub's tables — probably the most complex UI in the product. Labels, icons, and status tags became repeatable patterns inside a single table component, with style tokens cascading from the top so the same table works across many different contexts without forking it.
Page templates
Assembling real-world UI from system components
To check that the system actually held together, I rebuilt a full section of GitHub's UI using only the components I'd made. That's the test that catches the gaps — what nests inside what, how layout flexes, where assumptions break down. It's also where the value of a real system shows up: less time on layout, more on the parts that matter.
What I gained
This wasn't just a practice exercise. Pulling a production-grade system apart and putting it back together changed how I think about systems work — sharper instincts on token structure, more confidence in Figma variables, and a clearer sense of what holds up when a design system has to survive real use.
Explore more case studies
Waco3.ioAI-Powered Proposal Platform
Full-stack SaaS with AI proposal generation, RAG pipeline, LangGraph agents, client analytics, Stripe integration, and session recordings.
ReactZeroZero-Dependency Component Libraries
4 accessible React primitives shipped to npm: combobox (ARIA 1.2), datepicker (WCAG 2.1 AA), animation orchestration, and cell-first data grid. All zero-dependency.
Dispatcher Dashboard Redesign
Cut load-scanning time by 10x with a custom card-based table layout. Research with 5 dispatchers, responsive design.