design-handoff-spec
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDesign Handoff Specialist
Design Handoff专家
Эксперт по созданию спецификаций для передачи дизайна в разработку.
专注于创建设计到开发交付的规范专家。
Core Competencies
核心能力
Precision & Clarity
精准清晰
- Exact measurements and spacing
- Consistent units (px, rem, em)
- Color values in multiple formats
- Absolute and relative measurements
- 精确的尺寸与间距
- 统一的单位(px, rem, em)
- 多格式的颜色值
- 绝对与相对测量值
Developer-Focused
面向开发者
- CSS-structured properties
- Component hierarchies
- Interactive state transitions
- Responsive breakpoints
- CSS结构化属性
- 组件层级
- 交互状态过渡
- 响应式断点
Asset Management
资源管理
- Export formats and sizes
- Naming conventions
- Compression requirements
- Accessibility considerations
- 导出格式与尺寸
- 命名规范
- 压缩要求
- 无障碍设计考量
Component Specification Template
组件规范模板
markdown
undefinedmarkdown
undefinedComponent: [Name]
Component: [Name]
Overview
Overview
- Type: Atom / Molecule / Organism
- Status: Ready for development
- Figma Link: [link]
- Type: Atom / Molecule / Organism
- Status: Ready for development
- Figma Link: [link]
Usage Context
Usage Context
- Where this component appears
- Related components
- Usage guidelines
- Where this component appears
- Related components
- Usage guidelines
Variants
Variants
| Variant | Description | Use Case |
|---|---|---|
| Primary | Main action | CTAs, forms |
| Secondary | Alternative action | Cancel, back |
| Tertiary | Low emphasis | Links in text |
| Destructive | Dangerous action | Delete, remove |
undefined| Variant | Description | Use Case |
|---|---|---|
| Primary | Main action | CTAs, forms |
| Secondary | Alternative action | Cancel, back |
| Tertiary | Low emphasis | Links in text |
| Destructive | Dangerous action | Delete, remove |
undefinedLayout & Positioning
布局与定位
css
/* Component Structure */
.button {
/* Box Model */
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
/* Dimensions */
min-width: 120px;
height: 44px;
padding: 12px 24px;
/* Position Context */
position: relative;
z-index: 1;
}
/* Spacing Relationships */
.button-group {
display: flex;
gap: 12px; /* Between buttons */
}
.form-field + .button {
margin-top: 24px; /* Form to button */
}css
/* Component Structure */
.button {
/* Box Model */
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
/* Dimensions */
min-width: 120px;
height: 44px;
padding: 12px 24px;
/* Position Context */
position: relative;
z-index: 1;
}
/* Spacing Relationships */
.button-group {
display: flex;
gap: 12px; /* Between buttons */
}
.form-field + .button {
margin-top: 24px; /* Form to button */
}Typography Specifications
排版规范
yaml
Button Text:
font-family: "Inter", -apple-system, sans-serif
font-size: 14px / 0.875rem
font-weight: 600
line-height: 20px / 1.43
letter-spacing: 0.01em
text-transform: none
color: #FFFFFF
Label Text:
font-family: "Inter", sans-serif
font-size: 12px / 0.75rem
font-weight: 500
line-height: 16px / 1.33
letter-spacing: 0.02em
color: #6B7280yaml
Button Text:
font-family: "Inter", -apple-system, sans-serif
font-size: 14px / 0.875rem
font-weight: 600
line-height: 20px / 1.43
letter-spacing: 0.01em
text-transform: none
color: #FFFFFF
Label Text:
font-family: "Inter", sans-serif
font-size: 12px / 0.75rem
font-weight: 500
line-height: 16px / 1.33
letter-spacing: 0.02em
color: #6B7280Color Specifications
颜色规范
yaml
Primary Button:
background:
default: "#2563EB" # Blue-600
hover: "#1D4ED8" # Blue-700
active: "#1E40AF" # Blue-800
disabled: "#93C5FD" # Blue-300
text:
default: "#FFFFFF"
disabled: "#DBEAFE" # Blue-100
border:
default: "transparent"
focus: "#3B82F6" # Blue-500 (ring)
Secondary Button:
background:
default: "#F3F4F6" # Gray-100
hover: "#E5E7EB" # Gray-200
active: "#D1D5DB" # Gray-300
disabled: "#F9FAFB" # Gray-50
text:
default: "#374151" # Gray-700
disabled: "#9CA3AF" # Gray-400yaml
Primary Button:
background:
default: "#2563EB" # Blue-600
hover: "#1D4ED8" # Blue-700
active: "#1E40AF" # Blue-800
disabled: "#93C5FD" # Blue-300
text:
default: "#FFFFFF"
disabled: "#DBEAFE" # Blue-100
border:
default: "transparent"
focus: "#3B82F6" # Blue-500 (ring)
Secondary Button:
background:
default: "#F3F4F6" # Gray-100
hover: "#E5E7EB" # Gray-200
active: "#D1D5DB" # Gray-300
disabled: "#F9FAFB" # Gray-50
text:
default: "#374151" # Gray-700
disabled: "#9CA3AF" # Gray-400Interactive States
交互状态
yaml
States:
default:
description: "Initial state"
cursor: pointer
hover:
description: "Mouse over"
transition: "all 150ms ease-in-out"
transform: "translateY(-1px)"
shadow: "0 4px 6px -1px rgba(0,0,0,0.1)"
active:
description: "Mouse down / touch"
transform: "translateY(0)"
shadow: "0 1px 2px 0 rgba(0,0,0,0.05)"
focus:
description: "Keyboard focus"
outline: "none"
ring: "2px solid #3B82F6"
ring-offset: "2px"
disabled:
description: "Not interactive"
cursor: "not-allowed"
opacity: 0.5
pointer-events: "none"
loading:
description: "Action in progress"
cursor: "wait"
content: "Spinner icon"yaml
States:
default:
description: "Initial state"
cursor: pointer
hover:
description: "Mouse over"
transition: "all 150ms ease-in-out"
transform: "translateY(-1px)"
shadow: "0 4px 6px -1px rgba(0,0,0,0.1)"
active:
description: "Mouse down / touch"
transform: "translateY(0)"
shadow: "0 1px 2px 0 rgba(0,0,0,0.05)"
focus:
description: "Keyboard focus"
outline: "none"
ring: "2px solid #3B82F6"
ring-offset: "2px"
disabled:
description: "Not interactive"
cursor: "not-allowed"
opacity: 0.5
pointer-events: "none"
loading:
description: "Action in progress"
cursor: "wait"
content: "Spinner icon"Responsive Breakpoints
响应式断点
yaml
Breakpoints:
mobile:
range: "320px - 767px"
button-height: 48px
button-padding: "14px 20px"
font-size: 16px
full-width: true
tablet:
range: "768px - 1023px"
button-height: 44px
button-padding: "12px 24px"
font-size: 14px
full-width: false
desktop:
range: "1024px+"
button-height: 40px
button-padding: "10px 20px"
font-size: 14px
full-width: falseyaml
Breakpoints:
mobile:
range: "320px - 767px"
button-height: 48px
button-padding: "14px 20px"
font-size: 16px
full-width: true
tablet:
range: "768px - 1023px"
button-height: 44px
button-padding: "12px 24px"
font-size: 14px
full-width: false
desktop:
range: "1024px+"
button-height: 40px
button-padding: "10px 20px"
font-size: 14px
full-width: falseAsset Requirements
资源要求
yaml
Icons:
format: SVG (preferred), PNG fallback
sizes:
- 16x16 (small)
- 20x20 (default)
- 24x24 (large)
naming: "icon-{name}-{size}.svg"
color: "currentColor" for flexibility
Images:
format: WebP (preferred), JPEG fallback
sizes:
- 1x: base size
- 2x: retina
- 3x: high-density mobile
naming: "{name}@{scale}x.{format}"
compression: 80% quality
Exports from Figma:
- Export as SVG for icons
- Export as PNG 1x, 2x, 3x for images
- Use "Export for Web" presetyaml
Icons:
format: SVG (preferred), PNG fallback
sizes:
- 16x16 (small)
- 20x20 (default)
- 24x24 (large)
naming: "icon-{name}-{size}.svg"
color: "currentColor" for flexibility
Images:
format: WebP (preferred), JPEG fallback
sizes:
- 1x: base size
- 2x: retina
- 3x: high-density mobile
naming: "{name}@{scale}x.{format}"
compression: 80% quality
Exports from Figma:
- Export as SVG for icons
- Export as PNG 1x, 2x, 3x for images
- Use "Export for Web" presetAnimation Specifications
动画规范
css
/* Transition Tokens */
:root {
--transition-fast: 150ms ease-in-out;
--transition-normal: 250ms ease-in-out;
--transition-slow: 350ms ease-in-out;
}
/* Button Hover Animation */
.button {
transition:
background-color var(--transition-fast),
transform var(--transition-fast),
box-shadow var(--transition-fast);
}
.button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
/* Loading Spinner */
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.button-spinner {
animation: spin 1s linear infinite;
}css
/* Transition Tokens */
:root {
--transition-fast: 150ms ease-in-out;
--transition-normal: 250ms ease-in-out;
--transition-slow: 350ms ease-in-out;
}
/* Button Hover Animation */
.button {
transition:
background-color var(--transition-fast),
transform var(--transition-fast),
box-shadow var(--transition-fast);
}
.button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
/* Loading Spinner */
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.button-spinner {
animation: spin 1s linear infinite;
}Accessibility Requirements
无障碍设计要求
yaml
WCAG Compliance:
contrast:
normal-text: "4.5:1 minimum"
large-text: "3:1 minimum"
ui-components: "3:1 minimum"
focus:
indicator: "visible focus ring"
style: "2px solid, 2px offset"
color: "meets contrast requirement"
touch-target:
minimum: "44x44px"
recommended: "48x48px"
screen-reader:
- Meaningful button text
- aria-label for icon-only buttons
- aria-disabled for disabled state
- aria-busy for loading state
Example:
```html
<button
class="button button--primary"
aria-label="Submit form"
aria-busy="false"
>
<span class="button__text">Submit</span>
</button>undefinedyaml
WCAG Compliance:
contrast:
normal-text: "4.5:1 minimum"
large-text: "3:1 minimum"
ui-components: "3:1 minimum"
focus:
indicator: "visible focus ring"
style: "2px solid, 2px offset"
color: "meets contrast requirement"
touch-target:
minimum: "44x44px"
recommended: "48x48px"
screen-reader:
- Meaningful button text
- aria-label for icon-only buttons
- aria-disabled for disabled state
- aria-busy for loading state
Example:
```html
<button
class="button button--primary"
aria-label="Submit form"
aria-busy="false"
>
<span class="button__text">Submit</span>
</button>undefinedDesign Tokens
Design Tokens
json
{
"color": {
"primary": {
"50": "#EFF6FF",
"100": "#DBEAFE",
"500": "#3B82F6",
"600": "#2563EB",
"700": "#1D4ED8"
},
"gray": {
"50": "#F9FAFB",
"100": "#F3F4F6",
"700": "#374151",
"900": "#111827"
}
},
"spacing": {
"1": "4px",
"2": "8px",
"3": "12px",
"4": "16px",
"6": "24px",
"8": "32px"
},
"borderRadius": {
"sm": "4px",
"md": "6px",
"lg": "8px",
"full": "9999px"
},
"shadow": {
"sm": "0 1px 2px 0 rgba(0,0,0,0.05)",
"md": "0 4px 6px -1px rgba(0,0,0,0.1)",
"lg": "0 10px 15px -3px rgba(0,0,0,0.1)"
}
}json
{
"color": {
"primary": {
"50": "#EFF6FF",
"100": "#DBEAFE",
"500": "#3B82F6",
"600": "#2563EB",
"700": "#1D4ED8"
},
"gray": {
"50": "#F9FAFB",
"100": "#F3F4F6",
"700": "#374151",
"900": "#111827"
}
},
"spacing": {
"1": "4px",
"2": "8px",
"3": "12px",
"4": "16px",
"6": "24px",
"8": "32px"
},
"borderRadius": {
"sm": "4px",
"md": "6px",
"lg": "8px",
"full": "9999px"
},
"shadow": {
"sm": "0 1px 2px 0 rgba(0,0,0,0.05)",
"md": "0 4px 6px -1px rgba(0,0,0,0.1)",
"lg": "0 10px 15px -3px rgba(0,0,0,0.1)"
}
}Implementation Notes
实施说明
markdown
undefinedmarkdown
undefinedZ-Index Hierarchy
Z-Index层级
| Element | Z-Index |
|---|---|
| Base content | 0 |
| Dropdown | 10 |
| Sticky header | 20 |
| Modal backdrop | 30 |
| Modal content | 40 |
| Tooltip | 50 |
| Toast notification | 60 |
| Element | Z-Index |
|---|---|
| Base content | 0 |
| Dropdown | 10 |
| Sticky header | 20 |
| Modal backdrop | 30 |
| Modal content | 40 |
| Tooltip | 50 |
| Toast notification | 60 |
Performance Considerations
性能考量
- Use CSS transforms over position changes
- Avoid layout shifts on state changes
- Lazy load images below the fold
- Preload critical fonts
- 使用CSS变换替代位置修改
- 避免状态切换时的布局偏移
- 懒加载视口下方的图片
- 预加载关键字体
Browser Support
浏览器支持
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Dependencies
依赖项
- Inter font (Google Fonts)
- Heroicons for icons
- Tailwind CSS utilities (optional)
undefined- Inter字体(Google Fonts)
- Heroicons图标库
- Tailwind CSS工具类(可选)
undefinedQA Checklist
QA检查清单
markdown
undefinedmarkdown
undefinedVisual Verification
视觉验证
- Matches Figma design at all breakpoints
- Colors match specifications exactly
- Typography matches specs
- Spacing is pixel-perfect
- Icons render correctly
- 在所有断点下与Figma设计一致
- 颜色完全符合规范
- 排版符合要求
- 间距像素级精准
- 图标渲染正确
Interactive Verification
交互验证
- All states work correctly
- Transitions are smooth
- Focus states visible
- Touch targets adequate
- 所有状态正常工作
- 过渡动画流畅
- 焦点状态可见
- 触摸目标尺寸达标
Accessibility Verification
无障碍验证
- Contrast ratios pass WCAG AA
- Focus indicators visible
- Screen reader announces correctly
- Keyboard navigation works
- 对比度符合WCAG AA标准
- 焦点指示器可见
- 屏幕阅读器播报正确
- 键盘导航正常
Cross-Browser
跨浏览器验证
- Chrome
- Firefox
- Safari
- Edge
- Mobile Safari
- Chrome Android
undefined- Chrome
- Firefox
- Safari
- Edge
- Mobile Safari
- Chrome Android
undefinedЛучшие практики
最佳实践
- Single source of truth — Figma как источник правды
- Design tokens — переменные вместо хардкода
- Component-first — документируйте компоненты, не страницы
- State completeness — все состояния задокументированы
- Accessibility built-in — a11y с самого начала
- Developer communication — регулярные синки с разработкой
- 单一事实来源 — 将Figma作为唯一可信来源
- Design Tokens — 使用变量而非硬编码
- 组件优先 — 记录组件而非页面
- 状态完整性 — 记录所有交互状态
- 内置无障碍支持 — 从初始阶段就考虑a11y
- 开发者沟通 — 与开发团队定期同步