Sub topic 14
Prepare the handoff
This chapter covers the last step: giving a developer everything needed to build the homepage without guessing. It assumes you have a finished high-fidelity mockup, a set of design tokens, and a basic reading knowledge of HTML and CSS.
What a handoff contains
A handoff is a package, not a single file. A developer should be able to answer "what does this look like, what does it do, and what are the exact values?" from the package alone.
- The final mockup frames for mobile, tablet, and desktop widths.
- The design tokens: spacing, color, and type-size values with names.
- A component list: buttons, cards, navigation, and any repeated pieces, with their states.
- Notes on behavior: what happens on hover, focus, and error, and where each link goes.
- Exported assets: logos and icons as SVG, photos as sized and compressed files.
- The accessibility notes from your earlier checks, such as contrast results and heading order.
Name things so they match the code
Names are the cheapest way to prevent mistakes. If the mockup says "Blue 500" and the CSS says --color-accent, someone has to translate. Name layers, styles, and tokens the way the code will name them.
The skeleton below shows how the wireframe's ranked content maps to semantic HTML. The hero holds the single primary call to action.
<body>
<header>
<a href="/">Brand</a>
<nav aria-label="Main">
<a href="/products">Products</a>
<a href="/pricing">Pricing</a>
<a href="/contact">Contact</a>
</nav>
</header>
<main>
<section class="hero">
<h1>One clear promise for the visitor</h1>
<p>A short supporting sentence.</p>
<a class="button" href="/signup">Get started</a>
</section>
<section class="features">
<h2>Key benefits</h2>
</section>
<section class="proof">
<h2>What customers say</h2>
</section>
</main>
<footer>
<p>Contact and legal links</p>
</footer>
</body>Name your mockup sections hero, features, and proof to match these class names. The developer then sees the same words in both places.
Hand over tokens as values
Tokens are the decisions from the mockup written as named values. CSS custom properties are a direct way to share them.
:root {
--space-1: 0.5rem;
--space-2: 1rem;
--space-3: 1.5rem;
--space-4: 2.5rem;
--color-text: #1a1a1a;
--color-bg: #ffffff;
--color-accent: #0b5fff;
--font-size-body: 1rem;
--font-size-h2: 1.75rem;
--font-size-h1: 2.5rem;
}
body {
color: var(--color-text);
background: var(--color-bg);
font-size: var(--font-size-body);
}
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }Annotate spacing in the mockup with token names such as space-3, not with pixel measurements. A developer who sees "24 px" has to look up which token that is. A developer who sees space-3 can use it directly.
Specify responsive behavior
Mockups show fixed widths, but the browser has a continuous range. State the breakpoint and the change that happens there. The features section is a good example: one column on small screens, three columns from 48rem upward.
.features {
display: grid;
grid-template-columns: 1fr;
gap: var(--space-3);
padding: var(--space-4) var(--space-2);
}
@media (min-width: 48rem) {
.features {
grid-template-columns: repeat(3, 1fr);
}
}Note what happens between your frames too. Say whether images scale, whether text wraps, and whether the maximum content width is capped.
Document states and edge cases
Static frames hide most of the work. List these for each interactive component:
- Default, hover, focus, active, and disabled states.
- Long text, such as a headline that wraps to three lines.
- Missing content, such as a card without an image.
- Keyboard focus styling, which must stay visible.
The handoff flow
Common errors
- Handing over unapproved frames. Lock the mockup after the final feedback round, and say which version is current.
- Leaving out states. Developers invent hover and focus styles, and they often differ from your intent.
- Exporting everything. Send only the assets the page uses, at the sizes it needs.
- Treating handoff as the end. Plan a review of the built page. Small differences in spacing and type are normal and are cheap to fix at this stage.
Exercise
A mockup annotation says "padding: 40px". The token list defines --space-4 as 2.5rem, with a 16px root font size. How should you change the annotation, and why?
Show answer
Replace it with "space-4". 2.5rem at a 16px root size equals 40px, so the value is the same. The token name lets the developer use the shared variable directly, so the page stays consistent if the scale changes later.
Exercise
Name three items, besides the mockup frames, that a handoff package should include.
Show answer
Any three of: design tokens, a component list with states, behavior notes (hover, focus, link destinations), exported assets, and accessibility notes such as contrast results.