Design handoff is the process of translating a design into code. When done poorly, developers guess at spacing, colors, and behavior. When done well, implementation matches the design exactly.
The Handoff Problem
Common issues when designers hand off to developers:
| Problem | What Happens |
|---|---|
| No specs | Developer guesses spacing and sizes |
| Missing states | No designs for hover, error, loading, empty |
| Inconsistent values | 13px here, 15px there, 14px somewhere else |
| No responsive designs | Developer improvises mobile layout |
| Outdated designs | Code gets built from an old version |
The solution is a shared system: design tokens, clear documentation, and communication.
Design Tokens
Design tokens are the smallest design decisions — colors, spacing, typography — stored as named values that both designers and developers use.
From Figma to CSS
Your Figma file uses these values:
Color: Primary Blue (#2563eb)
Spacing: 4, 8, 16, 24, 32, 48
Font: Inter, 400/600/700
Radius: 4px, 8px, 12px
Shadow: 0 1px 3px rgba(0,0,0,0.1)Turn them into CSS custom properties:
:root {
/* Colors */
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-text: #111827;
--color-text-secondary: #6b7280;
--color-bg: #ffffff;
--color-bg-secondary: #f9fafb;
--color-border: #e5e7eb;
--color-error: #dc2626;
--color-success: #16a34a;
/* Spacing */
--space-1: 4px;
--space-2: 8px;
--space-3: 12px;
--space-4: 16px;
--space-5: 20px;
--space-6: 24px;
--space-8: 32px;
--space-12: 48px;
/* Typography */
--font-sans: 'Inter', system-ui, sans-serif;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.25rem;
--text-xl: 1.5rem;
--text-2xl: 2rem;
/* Border radius */
--radius-sm: 4px;
--radius-md: 8px;
--radius-lg: 12px;
/* Shadows */
--shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}Now instead of hardcoding #2563eb everywhere, you use var(--color-primary). Change it once, it updates everywhere.
With Tailwind CSS
If you're using Tailwind, extend the config:
// tailwind.config.js
export default {
theme: {
extend: {
colors: {
primary: '#2563eb',
'primary-hover': '#1d4ed8',
},
borderRadius: {
DEFAULT: '8px',
},
},
},
}Extracting CSS from Figma
Using Dev Mode
- Open the Figma file
- Switch to Dev Mode (toggle in the top toolbar)
- Click any element
- The right panel shows CSS properties
What you'll see:
/* Figma shows you this */
width: 320px;
height: 48px;
padding: 12px 24px;
background: #2563EB;
border-radius: 8px;
font-family: Inter;
font-size: 16px;
font-weight: 600;
color: #FFFFFF;What to Use and What to Ignore
| Figma Output | Use It? | Why |
|---|---|---|
| Colors | Yes | Exact values matter |
| Font properties | Yes | Match the design |
| Padding/gap | Yes | Spacing should be exact |
| Border radius | Yes | Visual detail |
| Width/height | Usually no | Use responsive CSS instead |
| Position: absolute (x, y) | No | Use flexbox/grid layout |
Never hardcode widths. Figma shows pixel-perfect static dimensions. Your code needs to be responsive.
/* Bad — copied from Figma */
.card {
width: 384px;
height: 256px;
position: absolute;
left: 528px;
top: 320px;
}
/* Good — responsive implementation */
.card {
width: 100%;
max-width: 384px;
padding: var(--space-6);
background: var(--color-bg);
border-radius: var(--radius-md);
box-shadow: var(--shadow-sm);
}Handling Missing States
A complete design should include all these states:
Component States
| State | Example |
|---|---|
| Default | Normal appearance |
| Hover | Mouse over |
| Active/Pressed | Being clicked |
| Focus | Keyboard navigation |
| Disabled | Can't interact |
| Loading | Waiting for data |
Page States
| State | Example |
|---|---|
| Empty | No data yet ("No results found") |
| Loading | Skeleton screens or spinners |
| Error | Something went wrong |
| Partial | Some data loaded, some failed |
| Success | Action completed |
If the design doesn't include a state, ask before implementing. Don't guess — your guess might not match what the designer intended.
Responsive Implementation
Figma designs are usually static at one or two breakpoints. You need to fill in the gaps.
Common Approach
- Desktop design (1440px or 1280px) — the primary design
- Mobile design (375px) — sometimes provided
- Everything in between — you figure this out
Translation Strategy
/* Desktop: 3-column grid (from Figma) */
.grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 24px;
}
/* Tablet: 2 columns (you decide) */
@media (max-width: 1024px) {
.grid {
grid-template-columns: repeat(2, 1fr);
}
}
/* Mobile: 1 column (from Figma mobile design) */
@media (max-width: 640px) {
.grid {
grid-template-columns: 1fr;
gap: 16px;
}
}Collaboration Best Practices
For Developers Working with Designers
- Ask questions early — "What happens when this list is empty?" is easier to answer before you've coded it
- Flag impossible designs — some layouts can't work responsively. Raise this before building.
- Share implementation constraints — "We can't animate this without a 200KB library. Is it worth it?"
- Show your work in progress — get feedback before you've finished, not after
- Use the same vocabulary — learn basic design terms (kerning, leading, whitespace, hierarchy)
For Solo Developers
When you're both designer and developer:
- Wireframe first — even a 5-minute paper sketch saves hours
- Use a design system — don't make every decision from scratch (use Shadcn, Radix, or similar)
- Copy layouts, not styles — find a site you like and study its structure
- Limit your choices — pick one font, 5 colors, and a spacing scale. Stick to them.
- Get feedback — show someone your work and watch them use it
Checklist: Before You Code
Before turning a design into code, verify you have:
- All component states (hover, focus, disabled, loading, error)
- Mobile and desktop layouts
- Color values and font specifications
- Spacing values (padding, margins, gaps)
- Interaction behavior (what happens on click, scroll, submit)
- Empty states and edge cases
- Assets exported (icons, illustrations, images)
- Agreed-on breakpoints for responsive design
Summary
- Design tokens create a shared language between design and code
- Extract colors, spacing, and font values from Figma — but use responsive CSS, not pixel-perfect coordinates
- Always ask about missing states (hover, error, empty, loading)
- Fill in responsive gaps between the breakpoints provided in the design
- Communicate early and often — assumptions lead to rework
- Solo developers: use a design system and limit your choices