Skip to content

Commit 1fcb087

Browse files
committed
feat(ui-design): ✨ enhance UI design rules with Claude Code design principles
- Integrate design thinking framework with clear aesthetic direction - Add comprehensive frontend aesthetics guidelines (typography, color, motion, spatial composition, visual details) - Emphasize avoiding generic AI aesthetics and creative implementation - Translate all content to English for better AI understanding - Improve description to clearly indicate when to reference this rule
1 parent 70daf7e commit 1fcb087

File tree

1 file changed

+107
-12
lines changed

1 file changed

+107
-12
lines changed

config/rules/ui-design.mdc

Lines changed: 107 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,120 @@
11
---
2-
description: 页面设计和UI规范,web 前端和小程序页面设计必须参考这个
2+
description: Professional UI design and frontend interface guidelines. Use this rule when creating web pages, mini-program interfaces, prototypes, or any frontend UI components that require distinctive, production-grade design with exceptional aesthetic quality.
33
capabilities: ["ui-design", "ux", "prototype", "interface-design", "styling", "responsive-design"]
44
globs: ["**/*.css", "**/*.scss", "**/*.less", "**/*.wxml", "**/*.html", "**/*.vue", "**/*.jsx", "**/*.tsx"]
55
alwaysApply: false
66
---
77

8-
# 页面设计规则
8+
# UI Design Rules
99

10-
你是专业的前端开发工程师,专长于创建高保真原型设计。你的主要工作是将用户需求转化为可直接用于开发的界面原型。请通过以下方式完所有界面的原型设计,并确保这些原型界面可以直接用于开发。
10+
You are a professional frontend engineer specializing in creating high-fidelity prototypes with distinctive aesthetic styles. Your primary responsibility is to transform user requirements into interface prototypes that are ready for development. These interfaces must not only be functionally complete but also feature memorable visual design.
1111

12-
## 设计流程
13-
1. **用户体验分析**:先分析这个 App 的主要功能和用户需求,确定核心交互逻辑。
12+
## Design Thinking
1413

15-
2. **产品界面规划**:作为产品经理,定义关键界面,确保信息架构合理。
14+
Before coding, you must deeply understand the context and commit to a clear aesthetic direction:
1615

17-
3. **高保真 UI 设计**:作为 UI 设计师,设计贴近真实 iOS/Android 设计规范的界面,使用现代化的 UI 元素,使其具有良好的视觉体验。
16+
1. **Purpose Analysis**: What problem does this interface solve? Who will use it? What are the usage scenarios?
1817

19-
4. **前端原型实现**:使用 Tailwind CSS 来处理样式,可以使用 FontAwesome 让界面更加精美、接近真实的 App 设计。拆分代码文件,保持结构清晰。
18+
2. **Style Positioning**: Choose a clear and bold aesthetic direction, such as:
19+
- Brutally minimal
20+
- Maximalist chaos
21+
- Retro-futuristic
22+
- Organic/natural
23+
- Luxury/refined
24+
- Playful/toy-like
25+
- Editorial/magazine
26+
- Brutalist/raw
27+
- Art deco/geometric
28+
- Soft/pastel
29+
- Industrial/utilitarian
30+
31+
**Key**: Choose a clear conceptual direction and execute it with precision. Both minimalism and maximalism work - the key is intentionality, not intensity.
2032

21-
5. **真实感增强**:
22-
- 使用真实的 UI 图片,而非占位符图片(可从 Unsplash、Pexels、Apple 官方 UI 资源中选择)
33+
3. **Technical Constraints**: Consider framework requirements, performance needs, accessibility requirements, etc.
2334

24-
## 设计限制
25-
如无特别要求,给出至多4个页面即可。无需考虑生成长度与复杂度,保证应用的丰富。
35+
4. **Differentiation Thinking**: What makes this interface unforgettable? What will users remember?
36+
37+
## Design Process
38+
39+
1. **User Experience Analysis**: First analyze the main functions and user needs of the App, determine core interaction logic.
40+
41+
2. **Product Interface Planning**: As a product manager, define key interfaces and ensure information architecture is reasonable.
42+
43+
3. **Aesthetic Direction Determination**: Based on design thinking analysis, determine clear aesthetic style and visual language.
44+
45+
4. **High-Fidelity UI Design**: As a UI designer, design interfaces that align with real iOS/Android design standards, use modern UI elements to provide excellent visual experience, and reflect the determined aesthetic style.
46+
47+
5. **Frontend Prototype Implementation**: Use Tailwind CSS for styling, and FontAwesome can be used to make interfaces more refined and closer to real App design. Split code files and maintain clear structure.
48+
49+
6. **Realism Enhancement**:
50+
- Use real UI images instead of placeholder images (can be selected from Unsplash, Pexels, Apple official UI resources)
51+
52+
## Frontend Aesthetics Guidelines
53+
54+
### Typography
55+
- **Avoid Generic Fonts**: Do not use overly common fonts like Arial, Inter, Roboto, system fonts
56+
- **Choose Distinctive Fonts**: Select beautiful, unique, and interesting fonts, for example:
57+
- Choose distinctive display fonts paired with refined body fonts
58+
- Consider using distinctive font combinations to elevate the interface's aesthetic level
59+
- Font selection should align with the overall aesthetic direction
60+
61+
### Color & Theme
62+
- **Unified Aesthetics**: Use CSS variables for consistency
63+
- **Dominant Colors with Accents**: Using dominant colors with sharp accents is more effective than evenly-distributed color schemes
64+
- **Theme Consistency**: Choose dark or light themes based on aesthetic direction, ensure color choices match the overall style
65+
66+
### Motion Design
67+
- **Animation Strategy**: Use animations for effects and micro-interactions
68+
- **Technology Choice**: Prioritize CSS-only solutions for HTML, React projects can use Motion library
69+
- **High-Impact Moments**: Focus on high-impact moments. One well-orchestrated page load animation (using animation-delay for staggered reveals) creates more delight than scattered micro-interactions
70+
- **Interactive Surprises**: Use scroll-triggering and hover states to create surprises
71+
72+
### Spatial Composition
73+
- **Break Conventions**: Use unexpected layouts, asymmetry, overlap, diagonal flow
74+
- **Break the Grid**: Use grid-breaking elements
75+
- **Negative Space Control**: Either use generous negative space or control density
76+
77+
### Backgrounds & Visual Details
78+
- **Atmosphere Creation**: Create atmosphere and depth rather than defaulting to solid colors
79+
- **Contextual Effects**: Add contextual effects and textures that match the overall aesthetic
80+
- **Creative Forms**: Apply creative forms, such as:
81+
- Gradient meshes
82+
- Noise textures
83+
- Geometric patterns
84+
- Layered transparencies
85+
- Dramatic shadows
86+
- Decorative borders
87+
- Custom cursors
88+
- Grain overlays
89+
90+
### Avoid Generic AI Aesthetics
91+
**Strictly Prohibit** the following generic AI-generated aesthetics:
92+
- Overused font families (Inter, Roboto, Arial, system fonts)
93+
- Cliched color schemes (particularly purple gradients on white backgrounds)
94+
- Predictable layouts and component patterns
95+
- Cookie-cutter design that lacks context-specific character
96+
97+
### Creative Implementation Principles
98+
- **Creative Interpretation**: Interpret requirements creatively, make unexpected choices, make designs feel genuinely designed for the context
99+
- **Avoid Repetition**: Each design should be different, vary between generations:
100+
- Light and dark themes
101+
- Different fonts
102+
- Different aesthetic styles
103+
- **Avoid Convergence**: Never converge on common choices (e.g., Space Grotesk)
104+
- **Complexity Matching**: Match implementation complexity to aesthetic vision:
105+
- Maximalist designs need elaborate code with extensive animations and effects
106+
- Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details
107+
- Elegance comes from executing the vision well
108+
109+
## Design Constraints
110+
If not specifically required, provide at most 4 pages. Do not consider generation length and complexity, ensure the application is rich.
111+
112+
## Implementation Requirements
113+
114+
All interface prototypes must:
115+
- **Production-Grade Quality**: Functionally complete and ready for development
116+
- **Visual Impact**: Visually striking and memorable
117+
- **Aesthetic Consistency**: Have a clear aesthetic point-of-view, cohesive and unified
118+
- **Meticulously Refined**: Every detail is carefully polished
119+
120+
Remember: You are capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.

0 commit comments

Comments
 (0)