frontend-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Frontend Design Skill

Frontend Design Skill

此技能指导创建独特的生产级前端界面,避免平庸的"AI 粗糙"美学。实现真正可用的代码,并高度关注美学细节和创意选择。
This skill guides the creation of unique, production-grade frontend interfaces, avoiding mediocre "AI-generated rough" aesthetics. It delivers truly functional code with a strong focus on aesthetic details and creative choices.

When to Use This Skill

When to Use This Skill

使用此技能当用户请求:
  • 构建 Web 组件、页面或完整应用程序
  • 创建着陆页、仪表盘或营销页面
  • 设计 React、Vue 或原生 HTML/CSS 界面
  • 美化或重新设计现有的 Web UI
  • 创建海报、素材或视觉设计元素(用于 Web)
  • 需要高设计品质和独特美学的任何前端项目
关键触发词: Web 组件、页面、应用、网站、着陆页、仪表盘、React 组件、HTML/CSS、UI 设计、美化、前端
Use this skill when the user requests:
  • Building web components, pages, or full applications
  • Creating landing pages, dashboards, or marketing pages
  • Designing React, Vue, or native HTML/CSS interfaces
  • Beautifying or redesigning existing web UIs
  • Creating posters, materials, or visual design elements (for web use)
  • Any frontend project requiring high design quality and unique aesthetics
Key trigger words: Web components, pages, applications, websites, landing pages, dashboards, React components, HTML/CSS, UI design, beautification, frontend

核心原则

Core Principles

在编写代码之前,必须进行深入的设计思考。每个界面都应该是独特的、有意图的、令人难忘的。
Before writing any code, thorough design thinking is essential. Every interface should be unique, purposeful, and memorable.

设计思维流程

Design Thinking Process

在实现任何代码之前,回答以下问题:
Before implementing any code, answer the following questions:

1. 目的 (Purpose)

1. Purpose

  • 问题: 此界面解决什么问题?
  • 用户: 谁使用它?在什么情境下使用?
  • 目标: 用户需要完成什么任务?
  • Question: What problem does this interface solve?
  • Users: Who will use it? In what context?
  • Goals: What tasks do users need to complete?

2. 风格方向 (Style Direction)

2. Style Direction

选择一个明确且大胆的美学方向。不要选择"现代简约"这样的通用描述,而是选择极致的风格:
风格选项(但不限于这些):
  • 极简主义: 极度克制,大量留白,精准排版
  • 极致混乱: 密集布局,重叠元素,视觉冲击
  • 复古未来主义: 80年代霓虹色,网格,合成波风格
  • 有机/自然: 流动形状,自然色调,柔和曲线
  • 奢华/精致: 优雅字体,金色点缀,精细细节
  • 俏皮/玩具感: 明亮色彩,圆角,趣味动画
  • 编辑/杂志风格: 大胆排版,网格系统,黑白为主
  • 粗犷/原始: 单色,硬边,实用主义
  • 装饰艺术/几何: 对称图案,几何形状,高对比度
  • 柔和/粉彩: 温和色彩,渐变,梦幻感
  • 工业/实用: 系统字体,单色,功能优先
  • 新拟态: 柔和阴影,浮雕效果,微妙深度
  • 玻璃态: 模糊背景,透明度,光感
关键: 选择清晰的概念方向并精准执行。大胆的极致主义和精致的极简主义都有效——关键在于意图,而不是强度。
Choose a clear and bold aesthetic direction. Avoid generic descriptions like "modern minimalist"; instead, opt for extreme styles:
Style Options (but not limited to these):
  • Minimalism: Extreme restraint, ample white space, precise typography
  • Maximalist Chaos: Dense layouts, overlapping elements, visual impact
  • Retro-futurism: 80s neon colors, grids, synthwave style
  • Organic/Natural: Flowing shapes, natural tones, soft curves
  • Luxurious/Exquisite: Elegant fonts, gold accents, fine details
  • Playful/Toy-like: Bright colors, rounded corners, fun animations
  • Editorial/Magazine Style: Bold typography, grid systems, black and white focused
  • Rugged/Primitive: Monochrome, hard edges, pragmatism
  • Art Deco/Geometric: Symmetric patterns, geometric shapes, high contrast
  • Soft/Pastel: Gentle colors, gradients, dreamy feel
  • Industrial/Pragmatic: System fonts, monochrome, function-first
  • Neumorphism: Soft shadows, embossed effects, subtle depth
  • Glass Morphism: Blurred backgrounds, transparency, light feel
Key: Choose a clear conceptual direction and execute it precisely. Both bold maximalism and refined minimalism work—the key is intent, not intensity.

3. 技术限制 (Constraints)

3. Constraints

  • 使用什么框架?(React, Vue, 原生 HTML/CSS)
  • 性能要求?(动画复杂度,文件大小)
  • 可访问性要求?(ARIA 标签,键盘导航,色彩对比度)
  • 浏览器兼容性?
  • Which framework to use? (React, Vue, native HTML/CSS)
  • Performance requirements? (Animation complexity, file size)
  • Accessibility requirements? (ARIA labels, keyboard navigation, color contrast)
  • Browser compatibility?

4. 差异化 (Differentiation)

4. Differentiation

  • 记忆点: 是什么让它令人难忘?
  • 独特性: 用户会记住哪一个细节?
  • 惊喜: 哪里会让用户眼前一亮?
  • Memorable point: What makes it unforgettable?
  • Uniqueness: Which detail will users remember?
  • Surprise: Where will users be impressed?

前端美学指南

Frontend Aesthetics Guide

1. 排版 (Typography)

1. Typography

原则: 字体选择是设计的灵魂。
Do:
  • ✅ 选择独特且有个性的字体
  • ✅ 标题使用引人注目的字体,正文使用易读字体
  • ✅ 尝试意想不到的字体配对
  • ✅ 使用字体变体(font-weight, font-style)创造层次
  • ✅ 精确控制字间距(letter-spacing)和行高(line-height)
Don't:
  • ❌ 使用通用字体:Arial, Helvetica, Inter, Roboto, 系统字体
  • ❌ 所有文本使用相同的字体和大小
  • ❌ 忽略字体加载性能(使用 font-display: swap)
推荐字体来源:
  • Google Fonts (选择小众、独特的字体)
  • 自定义字体(如果项目允许)
示例字体组合:
css
/* 极简编辑风格 */
--font-heading: 'Playfair Display', serif;
--font-body: 'Source Sans Pro', sans-serif;

/* 现代科技风格 */
--font-heading: 'Space Mono', monospace;
--font-body: 'DM Sans', sans-serif;

/* 优雅奢华风格 */
--font-heading: 'Cormorant Garamond', serif;
--font-body: 'Lato', sans-serif;
Principle: Font selection is the soul of design.
Do:
  • ✅ Choose unique and distinctive fonts
  • ✅ Use eye-catching fonts for headings, readable fonts for body text
  • ✅ Try unexpected font pairings
  • ✅ Use font variations (font-weight, font-style) to create hierarchy
  • ✅ Precisely control letter-spacing and line-height
Don't:
  • ❌ Use generic fonts: Arial, Helvetica, Inter, Roboto, system fonts
  • ❌ Use the same font and size for all text
  • ❌ Ignore font loading performance (use font-display: swap)
Recommended Font Sources:
  • Google Fonts (choose niche, unique fonts)
  • Custom fonts (if the project allows)
Example Font Combinations:
css
/* Minimalist editorial style */
--font-heading: 'Playfair Display', serif;
--font-body: 'Source Sans Pro', sans-serif;

/* Modern tech style */
--font-heading: 'Space Mono', monospace;
--font-body: 'DM Sans', sans-serif;

/* Elegant luxurious style */
--font-heading: 'Cormorant Garamond', serif;
--font-body: 'Lato', sans-serif;

2. 颜色与主题 (Color & Theme)

2. Color & Theme

原则: 颜色定义情绪和品牌。
Do:
  • ✅ 使用 CSS 变量保持一致性
  • ✅ 主色调 + 鲜明点缀色的组合
  • ✅ 考虑色彩心理学(蓝色=信任,红色=紧迫,绿色=成功)
  • ✅ 使用渐变营造深度(但要有品味)
  • ✅ 保持色彩对比度(WCAG AA 标准:至少 4.5:1)
Don't:
  • ❌ 俗套配色:白色背景 + 紫色渐变
  • ❌ 过多颜色(3-5 个主色已足够)
  • ❌ 忽略可访问性
示例主题:
css
:root {
  /* 极简黑白 */
  --color-primary: #000000;
  --color-secondary: #ffffff;
  --color-accent: #ff3366;

  /* 复古未来 */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #00fff5;
  --color-highlight: #ff006e;

  /* 自然有机 */
  --color-primary: #2d6a4f;
  --color-secondary: #52b788;
  --color-accent: #ffc857;
}
Principle: Colors define mood and brand.
Do:
  • ✅ Use CSS variables for consistency
  • ✅ Combine primary color + striking accent color
  • ✅ Consider color psychology (blue=trust, red=urgency, green=success)
  • ✅ Use gradients to create depth (but tastefully)
  • ✅ Maintain color contrast (WCAG AA standard: at least 4.5:1)
Don't:
  • ❌ Clichéd color schemes: white background + purple gradient
  • ❌ Too many colors (3-5 primary colors are sufficient)
  • ❌ Ignore accessibility
Example Themes:
css
:root {
  /* Minimalist black and white */
  --color-primary: #000000;
  --color-secondary: #ffffff;
  --color-accent: #ff3366;

  /* Retro-futurism */
  --color-primary: #1a1a2e;
  --color-secondary: #16213e;
  --color-accent: #00fff5;
  --color-highlight: #ff006e;

  /* Natural organic */
  --color-primary: #2d6a4f;
  --color-secondary: #52b788;
  --color-accent: #ffc857;
}

3. 动效 (Animation & Motion)

3. Animation & Motion

原则: 动画应该增强体验,而不是分散注意力。
Do:
  • ✅ 优先使用 CSS 动画(性能更好)
  • ✅ 设计页面加载动画(首次印象)
  • ✅ 使用
    animation-delay
    实现元素逐个显示
  • ✅ 悬停状态添加微妙过渡
  • ✅ 滚动触发动画(Intersection Observer)
  • ✅ 对于 React,使用 Framer Motion 或 React Spring
Don't:
  • ❌ 过度使用动画(每个元素都在动)
  • ❌ 动画持续时间过长(> 500ms 会让人不耐烦)
  • ❌ 忽略
    prefers-reduced-motion
    媒体查询
示例动画:
css
/* 页面加载 - 元素逐个淡入 */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 悬停效果 */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}
Principle: Animations should enhance the experience, not distract from it.
Do:
  • ✅ Prioritize CSS animations (better performance)
  • ✅ Design page load animations (first impression)
  • ✅ Use
    animation-delay
    to achieve sequential element display
  • ✅ Add subtle transitions for hover states
  • ✅ Scroll-triggered animations (Intersection Observer)
  • ✅ For React, use Framer Motion or React Spring
Don't:
  • ❌ Overuse animations (every element moving)
  • ❌ Animation duration too long (> 500ms will make people impatient)
  • ❌ Ignore
    prefers-reduced-motion
    media query
Example Animations:
css
/* Page load - elements fade in one by one */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hover effect */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

4. 空间构成 (Spatial Composition)

4. Spatial Composition

原则: 布局应该引导视线,创造视觉节奏。
Do:
  • ✅ 尝试不对称布局
  • ✅ 使用重叠元素创造深度
  • ✅ 对角线流程引导视线
  • ✅ 打破网格的元素(但有意图)
  • ✅ 宽敞的留白或精心控制的密度
  • ✅ 使用 Grid 和 Flexbox 创造复杂布局
Don't:
  • ❌ 所有元素居中对齐
  • ❌ 均匀分布的网格(无聊)
  • ❌ 忽略响应式设计
示例布局技巧:
css
/* 不对称网格 */
.grid-asymmetric {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

/* 重叠效果 */
.overlap-container {
  position: relative;
}

.overlap-item {
  position: absolute;
  z-index: 2;
  transform: translate(-20%, -20%);
}

/* 对角线流程 */
.diagonal-section {
  transform: skewY(-3deg);
  padding: 100px 0;
}

.diagonal-section > * {
  transform: skewY(3deg);
}
Principle: Layout should guide the eye and create visual rhythm.
Do:
  • ✅ Try asymmetric layouts
  • ✅ Use overlapping elements to create depth
  • ✅ Diagonal flow to guide the eye
  • ✅ Break grid elements (but purposefully)
  • ✅ Generous white space or carefully controlled density
  • ✅ Use Grid and Flexbox to create complex layouts
Don't:
  • ❌ Center-align all elements
  • ❌ Uniformly distributed grids (boring)
  • ❌ Ignore responsive design
Example Layout Techniques:
css
/* Asymmetric grid */
.grid-asymmetric {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

/* Overlap effect */
.overlap-container {
  position: relative;
}

.overlap-item {
  position: absolute;
  z-index: 2;
  transform: translate(-20%, -20%);
}

/* Diagonal flow */
.diagonal-section {
  transform: skewY(-3deg);
  padding: 100px 0;
}

.diagonal-section > * {
  transform: skewY(3deg);
}

5. 背景和视觉细节 (Background & Visual Details)

5. Background & Visual Details

原则: 背景营造氛围和深度。
Do:
  • ✅ 渐变网格
  • ✅ 噪点纹理
  • ✅ 几何图案
  • ✅ 分层透明度
  • ✅ 戏剧性阴影
  • ✅ 装饰性边框
  • ✅ 自定义光标(如果适合风格)
  • ✅ 颗粒叠加效果
Don't:
  • ❌ 纯色背景(除非极简风格)
  • ❌ 低质量或不相关的库存图片
  • ❌ 过度使用阴影(box-shadow 污染)
示例背景效果:
css
/* 渐变网格背景 */
.gradient-grid {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 50px 50px, 50px 50px, 100% 100%;
}

/* 噪点纹理 */
.noise-texture {
  position: relative;
}

.noise-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* 玻璃态效果 */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}
Principle: Backgrounds create atmosphere and depth.
Do:
  • ✅ Gradient grids
  • ✅ Noise textures
  • ✅ Geometric patterns
  • ✅ Layered transparency
  • ✅ Dramatic shadows
  • ✅ Decorative borders
  • ✅ Custom cursors (if suitable for the style)
  • ✅ Grain overlay effects
Don't:
  • ❌ Solid color backgrounds (unless minimalist style)
  • ❌ Low-quality or irrelevant stock images
  • ❌ Overuse shadows (box-shadow pollution)
Example Background Effects:
css
/* Gradient grid background */
.gradient-grid {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 50px 50px, 50px 50px, 100% 100%;
}

/* Noise texture */
.noise-texture {
  position: relative;
}

.noise-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
}

/* Glass morphism effect */
.glass-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

避免通用 AI 美学

Avoid Generic AI Aesthetics

绝对禁止的元素:
  • ❌ 过度使用的字体:Inter, Roboto, Arial, 系统字体
  • ❌ 俗套配色:白色背景 + 紫色渐变
  • ❌ 可预测的布局模式(居中卡片网格)
  • ❌ 缺乏特定上下文特征的千篇一律设计
如何避免:
  • ✅ 为每个项目选择不同的字体
  • ✅ 在浅色/深色主题之间变化
  • ✅ 尝试不同的布局结构
  • ✅ 添加独特的品牌元素和个性
Absolutely Forbidden Elements:
  • ❌ Overused fonts: Inter, Roboto, Arial, system fonts
  • ❌ Clichéd color schemes: white background + purple gradient
  • ❌ Predictable layout patterns (centered card grids)
  • ❌ One-size-fits-all designs lacking context-specific features
How to Avoid:
  • ✅ Choose different fonts for each project
  • ✅ Alternate between light/dark themes
  • ✅ Try different layout structures
  • ✅ Add unique brand elements and personality

实现复杂性与美学匹配

Match Implementation Complexity to Aesthetics

关键原则: 代码复杂度应与设计愿景相匹配。
Key Principle: Code complexity should match the design vision.

极繁主义设计 → 复杂代码

Maximalist Design → Complex Code

  • 大量动画和过渡效果
  • 多层叠加元素
  • 复杂的交互状态
  • 详细的视觉效果(粒子、渐变、纹理)
jsx
// 示例:复杂的动画卡片
<motion.div
  initial={{ opacity: 0, scale: 0.8, rotateX: -15 }}
  animate={{ opacity: 1, scale: 1, rotateX: 0 }}
  whileHover={{
    scale: 1.05,
    rotateY: 5,
    boxShadow: "0 25px 50px rgba(0,0,0,0.2)"
  }}
  transition={{
    type: "spring",
    stiffness: 300,
    damping: 20
  }}
>
  {/* 复杂内容 */}
</motion.div>
  • Numerous animations and transitions
  • Multiple layered elements
  • Complex interaction states
  • Detailed visual effects (particles, gradients, textures)
jsx
// Example: Complex animated card
<motion.div
  initial={{ opacity: 0, scale: 0.8, rotateX: -15 }}
  animate={{ opacity: 1, scale: 1, rotateX: 0 }}
  whileHover={{
    scale: 1.05,
    rotateY: 5,
    boxShadow: "0 25px 50px rgba(0,0,0,0.2)"
  }}
  transition={{
    type: "spring",
    stiffness: 300,
    damping: 20
  }}
>
  {/* Complex content */}
</motion.div>

极简主义设计 → 精准代码

Minimalist Design → Precise Code

  • 克制的动画(仅在关键时刻)
  • 精确的间距和排版
  • 细微的过渡效果
  • 关注细节而非数量
css
/* 示例:精致的极简主义 */
.minimal-card {
  padding: 60px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: border-color 0.3s ease;
}

.minimal-card:hover {
  border-color: rgba(0,0,0,0.2);
}

.minimal-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 20px 0;
}
  • Restrained animations (only at critical moments)
  • Precise spacing and typography
  • Subtle transition effects
  • Focus on details rather than quantity
css
/* Example: Exquisite minimalism */
.minimal-card {
  padding: 60px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.08);
  transition: border-color 0.3s ease;
}

.minimal-card:hover {
  border-color: rgba(0,0,0,0.2);
}

.minimal-card h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 20px 0;
}

工作流程

Workflow

第 1 步:理解需求

Step 1: Understand Requirements

  • 阅读用户请求,提取关键信息
  • 确定项目类型(组件、页面、完整应用)
  • 识别技术栈(React、Vue、原生 HTML/CSS)
  • Read the user's request and extract key information
  • Determine the project type (component, page, full application)
  • Identify the tech stack (React, Vue, native HTML/CSS)

第 2 步:设计思考

Step 2: Design Thinking

  • 回答设计思维流程中的 4 个问题
  • 选择明确的美学方向
  • 在心中可视化最终效果
  • Answer the 4 questions in the design thinking process
  • Choose a clear aesthetic direction
  • Visualize the final result in your mind

第 3 步:技术决策

Step 3: Technical Decisions

  • 选择框架和工具
  • 决定动画库(Framer Motion、CSS、React Spring)
  • 确定字体来源
  • Choose frameworks and tools
  • Decide on animation libraries (Framer Motion, CSS, React Spring)
  • Determine font sources

第 4 步:实现

Step 4: Implementation

  • 编写语义化 HTML 结构
  • 实现 CSS 样式(使用 CSS 变量)
  • 添加交互和动画
  • 确保响应式设计
  • Write semantic HTML structure
  • Implement CSS styles (using CSS variables)
  • Add interactions and animations
  • Ensure responsive design

第 5 步:精细化

Step 5: Refinement

  • 调整间距和排版
  • 优化动画时间
  • 测试不同屏幕尺寸
  • 确保可访问性(ARIA、键盘导航)
  • Adjust spacing and typography
  • Optimize animation timings
  • Test on different screen sizes
  • Ensure accessibility (ARIA, keyboard navigation)

示例场景

Example Scenarios

场景 1: 创建着陆页

Scenario 1: Create a Landing Page

用户请求: "帮我创建一个 SaaS 产品的着陆页"
设计思考:
  • 目的:展示产品价值,吸引用户注册
  • 风格:现代科技 + 编辑风格,使用 Space Grotesk 字体,黑白 + 蓝色点缀
  • 布局:不对称,英雄区域占据 70% 屏幕,对角线流程
  • 差异化:独特的字体配对,大胆的排版层次
实现重点:
  • Hero section 使用大字号标题(4-6rem)
  • 滚动触发的淡入动画
  • 玻璃态 CTA 按钮
  • 响应式网格展示功能
User Request: "Help me create a landing page for a SaaS product"
Design Thinking:
  • Purpose: Showcase product value and attract user sign-ups
  • Style: Modern tech + editorial style, using Space Grotesk font, black and white + blue accents
  • Layout: Asymmetric, hero section occupies 70% of the screen, diagonal flow
  • Differentiation: Unique font pairing, bold typography hierarchy
Implementation Focus:
  • Hero section uses large-size headings (4-6rem)
  • Scroll-triggered fade-in animations
  • Glass morphism CTA buttons
  • Responsive grid for feature display

场景 2: 设计仪表盘

Scenario 2: Design a Dashboard

用户请求: "创建一个数据分析仪表盘"
设计思考:
  • 目的:清晰展示数据,支持快速决策
  • 风格:实用主义 + 精致,使用 IBM Plex Sans,深色主题
  • 布局:网格系统,卡片式布局,数据可视化优先
  • 差异化:微妙的动画过渡,悬停显示详细信息
实现重点:
  • 深色背景减少眼睛疲劳
  • 卡片使用柔和阴影和边框
  • 图表使用鲜明的点缀色
  • 加载状态使用骨架屏
User Request: "Create a data analysis dashboard"
Design Thinking:
  • Purpose: Clearly display data and support quick decision-making
  • Style: Pragmatic + exquisite, using IBM Plex Sans, dark theme
  • Layout: Grid system, card-based layout, data visualization priority
  • Differentiation: Subtle animation transitions, hover to show detailed information
Implementation Focus:
  • Dark background to reduce eye strain
  • Cards use soft shadows and borders
  • Charts use striking accent colors
  • Skeleton screens for loading states

场景 3: React 组件库

Scenario 3: React Component Library

用户请求: "创建一套自定义按钮组件"
设计思考:
  • 目的:可复用、可定制的按钮系统
  • 风格:灵活,支持多种变体
  • 技术:使用 styled-components 或 CSS modules
  • 差异化:独特的悬停效果和加载状态
实现重点:
  • 主按钮、次要按钮、文本按钮变体
  • 大小变体(small, medium, large)
  • 加载和禁用状态
  • 平滑的过渡动画
User Request: "Create a set of custom button components"
Design Thinking:
  • Purpose: Reusable, customizable button system
  • Style: Flexible, supports multiple variants
  • Technology: Use styled-components or CSS modules
  • Differentiation: Unique hover effects and loading states
Implementation Focus:
  • Primary, secondary, text button variants
  • Size variants (small, medium, large)
  • Loading and disabled states
  • Smooth transition animations

代码质量标准

Code Quality Standards

必须遵守:

  • ✅ 语义化 HTML(
    <header>
    ,
    <nav>
    ,
    <main>
    ,
    <article>
  • ✅ BEM 命名规范或 CSS Modules
  • ✅ CSS 变量用于颜色和间距
  • ✅ 移动优先的响应式设计
  • ✅ 可访问性(ARIA 标签,键盘导航)
  • ✅ 性能优化(图片懒加载,字体优化)
Must Follow:
  • ✅ Semantic HTML (
    <header>
    ,
    <nav>
    ,
    <main>
    ,
    <article>
    )
  • ✅ BEM naming convention or CSS Modules
  • ✅ CSS variables for colors and spacing
  • ✅ Mobile-first responsive design
  • ✅ Accessibility (ARIA labels, keyboard navigation)
  • ✅ Performance optimization (image lazy loading, font optimization)
Forbidden:
  • ❌ Inline styles (except for dynamic values)
  • ❌ Unnecessary
    !important
  • ❌ Hard-coded color values (use CSS variables)
  • ❌ Unoptimized images
  • ❌ Meaningless class names (
    .box1
    ,
    .container2
    )

禁止:

Tech Stack References

Recommended Tools:

  • ❌ 内联样式(除非动态值)
  • ❌ 不必要的
    !important
  • ❌ 硬编码的颜色值(使用 CSS 变量)
  • ❌ 未优化的图片
  • ❌ 无意义的类名(
    .box1
    ,
    .container2
  • Fonts: Google Fonts, Font Squirrel
  • Colors: Coolors.co, Adobe Color
  • Animations: Framer Motion (React), Anime.js, GreenSock
  • Icons: Heroicons, Lucide, Phosphor Icons
  • CSS Frameworks: Tailwind CSS (custom configuration), styled-components

技术栈参考

Avoid:

推荐工具:

  • 字体: Google Fonts, Font Squirrel
  • 颜色: Coolors.co, Adobe Color
  • 动画: Framer Motion (React), Anime.js, GreenSock
  • 图标: Heroicons, Lucide, Phosphor Icons
  • CSS 框架: Tailwind CSS (自定义配置), styled-components
  • ❌ Bootstrap, Material-UI (prone to generic appearance)
  • ❌ Default Tailwind CSS configuration (needs customization)

避免:

Checklist

  • ❌ Bootstrap, Material-UI(容易产生通用外观)
  • ❌ 默认 Tailwind 配置(需要自定义)
After completing the implementation, verify the following:
  • Chose a unique font combination (not Inter/Roboto/Arial)
  • Color scheme has a clear aesthetic direction
  • At least 1-2 carefully designed animations
  • Layout is not a simple centered grid
  • Has unique visual details (backgrounds, textures, shadows)
  • Responsive design looks good on mobile and desktop
  • Accessibility standards are met (contrast, ARIA)
  • Code is clear and maintainable
  • Performance is good (no janky animations, fast loading)

检查清单

Final Reminder

在完成实现后,验证以下内容:
  • 选择了独特的字体组合(不是 Inter/Roboto/Arial)
  • 颜色方案有明确的美学方向
  • 至少有 1-2 处精心设计的动画
  • 布局不是简单的居中网格
  • 有独特的视觉细节(背景、纹理、阴影)
  • 响应式设计在手机和桌面都好看
  • 可访问性标准达标(对比度、ARIA)
  • 代码清晰、可维护
  • 性能良好(无卡顿动画,快速加载)
Creative interpretation is key. Don't ask users "What color do you want?"; instead, make bold design decisions based on context. Every design should be unique. Alternate between light/dark themes, fonts, and aesthetic styles across different projects.
Strive for excellence, not perfection. A design with strong personality is better than a "safe" but mediocre one. Dare to experiment and surprise users.

最后提醒

创造性诠释是关键。不要问用户"你想要什么颜色?",而是基于上下文做出大胆的设计决策。每个设计都应该是独一无二的。在不同项目之间变化浅色/深色主题、字体和美学风格。
追求卓越,而非完美。一个有强烈个性的设计胜过一个"安全"但平庸的设计。敢于尝试,为用户带来惊喜。