Sub topic 14
Prepare the Handoff
This chapter assumes you have finished the earlier chapters. You have a high-fidelity mockup that has passed the accessibility checks and one or more feedback rounds. You also know what design tokens are and have read basic HTML and CSS. The goal now is to give a developer everything needed to build the homepage without guessing, and to keep the build matching the mockup.
What a handoff is
A handoff is the point where the design file stops being the main work and becomes a specification. A good one lets a developer build the page without messaging you for every spacing value or hover color. It does not end the conversation. It makes the remaining conversation about real edge cases instead of missing information.
Handoff quality depends on decisions you already made. Tokens, components, and the grid exist so the developer can reuse them. If the mockup contains one-off values, such as a gray that appears once or a margin of 37 pixels, the handoff will expose them. Fix those in the file first.
What the developer needs
Collect these items before you send anything.
| Item | What it contains | Why it matters |
|---|---|---|
| Final frames | Mobile, tablet, and desktop versions of the homepage | Shows the layout at each breakpoint |
| Token list | Colors, spacing, type sizes, radii, shadows | Becomes CSS variables or theme config |
| Component specs | Buttons, cards, navigation, form fields, with variants and states | Prevents inconsistent rebuilds |
| Annotations | Heading levels, landmarks, link targets, alt text | Carries structure that pictures cannot show |
| Assets | Exported icons, images, logo, font files and licenses | Avoids placeholder or wrong-format files |
| Open issues | Known gaps and decisions still pending | Stops silent assumptions |
Clean up the file
Spend time on the file itself before sharing it. Developers inspect layers, and messy layers produce messy code.
- Name frames and layers by purpose, such as
hero,features-card,footer-links. Remove names likeRectangle 214. - Replace detached copies with real component instances. If a button is a copy of a copy, the developer cannot tell which one is canonical.
- Use auto layout or an equivalent feature so spacing comes from the grid and the spacing scale, not from manual nudging.
- Delete hidden layers, abandoned explorations, and off-canvas scraps. Move alternatives you rejected to a separate page labeled "Archive".
- Put each breakpoint on its own labeled frame, for example
Home / 375,Home / 768,Home / 1280. - Apply tokens through styles or variables. A color picked by hex value does not link back to the token.
Document the tokens
Your tokens already exist in the design tool. Hand them over in a form the developer can paste into code. The CSS from the mockup chapter is a good starting point. Add a second layer of semantic names so components refer to roles, not raw values.
:root {
/* Primitive tokens: raw values from the mockup */
--space-1: 0.5rem;
--space-2: 1rem;
--space-3: 1.5rem;
--space-4: 2.5rem;
--blue-600: #0b5fff;
--gray-900: #1a1a1a;
--white: #ffffff;
--font-size-body: 1rem;
--font-size-h2: 1.75rem;
--font-size-h1: 2.5rem;
/* Semantic tokens: roles that components use */
--color-text: var(--gray-900);
--color-bg: var(--white);
--color-accent: var(--blue-600);
--color-focus-ring: var(--blue-600);
}
.button {
display: inline-block;
padding: var(--space-1) var(--space-3);
color: var(--color-bg);
background: var(--color-accent);
border-radius: 0.25rem;
text-decoration: none;
}
.button:focus-visible {
outline: 3px solid var(--color-focus-ring);
outline-offset: 2px;
}The two layers pay off later. If the brand accent changes, you change one primitive, and every component that uses --color-accent follows. Without the semantic layer, a developer has to search for every place that used the old hex value.
Note the units. The mockup may show pixels, but the CSS uses rem so text and spacing scale with the user's browser font setting. State this in your handoff notes: 16 px equals 1 rem unless the project says otherwise.
Specify states and behavior
A static frame shows one state. Real components have several, and developers will otherwise invent the others. For each interactive component, include the following.
- Default, hover, focus, active, and disabled states for buttons and links.
- Error, success, and empty states for form fields.
- Open and closed states for the mobile navigation menu.
- Loading or missing-image behavior, such as a background color shown while a hero image loads.
Show the keyboard focus state explicitly. Accessibility checks pass in the file only if the focus ring is drawn there. Also note motion: if a card lifts on hover, give the duration and easing, for example 150 ms ease-out, and say that it should be reduced or removed for users who prefer reduced motion.
Annotate structure, not only appearance
Two pages can look identical and differ completely for a screen reader user. Annotations carry the structure. Mark each section with its landmark and heading level, and say which element is the primary call to action.
<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>
<a class="button" href="/signup">Get started</a>
</section>
<section class="features">
<h2>Key benefits</h2>
</section>
</main>An annotation for this page might read: "Hero headline is the only h1. Section titles are h2. The Get started button is a link to /signup, not a button element, because it navigates." Notes like this settle questions the picture cannot answer.
Add alt text for every meaningful image. For decorative images, write "decorative, empty alt" so the developer knows the omission is intentional.
Assets and export
Export assets in formats that suit the content.
- Icons and the logo as SVG, so they stay sharp at any size.
- Photographs as WebP or AVIF, with a JPEG fallback if the project needs one.
- Raster images at 1x and 2x, or provide one large source and let the build pipeline resize it.
- Fonts as licensed files or a link to the font provider, with the exact weights used. List them, for example "Regular 400 and Bold 700". Extra weights slow the page.
Name files predictably, such as hero-desktop.webp and icon-search.svg. State the intended display size so nobody ships a 4000-pixel photo into a 600-pixel slot.
Run the handoff conversation
Do not only send a link. Hold a short walkthrough, ideally 30 minutes, and cover these points in order:
- The page goals and the one primary action.
- The breakpoints and what changes at each.
- The component list and the states.
- Known risks, such as a complex animation or a content block with unpredictable length.
- Open questions and who decides each.
Record decisions in one place, such as a shared document or the ticket tracker. Chat messages get lost.
The process below shows how the handoff continues after the file is shared.
Review the build
After the developer builds the page, compare it to the mockup at each breakpoint. Check these in order: layout and spacing against the grid, type sizes and weights, colors, then states and focus behavior. Test with the keyboard only. Tab through the page and confirm the focus order follows the visual order.
File each difference as a separate item with a screenshot, the breakpoint, the expected value, and the actual value. "Spacing looks off" is not actionable. "At 375 px the gap between hero and features is 16 px, expected --space-4 (40 px)" is.
Not every difference is a bug. Real content, browser text rendering, and a developer's reasonable fix for an edge case can all change the result. Decide whether each difference harms the goals and the audience, and accept the harmless ones.
Common errors
- Sending the file without cleanup. Developers spend hours decoding layer names and detached components.
- Tokens only in the tool. If the values never reach the code as variables, the two will drift apart.
- Missing states. The developer invents a focus style or an error message, and it does not match the system.
- No content rules. If a card title can run to three lines, say how the layout behaves. Mockups show ideal text.
- Treating handoff as a one-way event. Questions will come. Plan time to answer them.
- Skipping the build review. Without it, small deviations ship and become the new standard.
Exercise
A developer builds your homepage and reports that the hero button color differs from the mockup. In the code they used #0b5fff directly in three places. Your design file uses the accent color on buttons, links, and the focus ring. What should you change in the handoff, and why?
Show answer
Provide the color as a token with a semantic name, such as --color-accent defined from the primitive --blue-600, and ask the developer to use that variable in the button, link, and focus-ring styles. A single definition means one edit updates every use when the brand color changes. Hard-coded values in three places can drift apart and are easy to miss in review. Also confirm in the design file that these elements use the color style, not a raw hex value, so the file and the code stay linked.
Exercise
List four things, beyond static frames at three widths, that you would include so a developer does not have to guess how the homepage behaves.
Show answer
Any four of these: the token list; component states (hover, focus, disabled, error); the open and closed states of the mobile navigation; heading levels and landmark annotations; alt text for images; export-ready assets with sizes and formats; font weights and licenses; motion details and the reduced-motion behavior; rules for content of different lengths; and a list of open issues.