Frontend UI Design
Create visually distinctive, aesthetically pleasing frontend interfaces that avoid generic "AI slop" patterns.
When to Use
Use this skill when:
- User requests frontend UI creation (HTML, CSS, JavaScript, or React)
- User asks to build a webpage, landing page, or web interface
- User wants to create visual components or layouts
- User mentions design, aesthetics, or "make it look good"
- User asks for dashboard, portfolio, or application UI
Core Principle
CRITICAL: Without explicit aesthetic guidance, Claude defaults to generic, conservative designs (white backgrounds, purple accents, Inter/Roboto fonts, predictable layouts). This skill provides research-backed strategies to create distinctive, visually interesting interfaces.
The Four Design Dimensions
Always address these four areas when creating frontend UIs:
1. Typography
AVOID these overused fonts:
- Inter, Roboto, Arial, Helvetica, system fonts
USE distinctive alternatives:
- Monospace: JetBrains Mono, Fira Code, IBM Plex Mono, Space Mono
- Display/Geometric: Space Grotesk, Clash Display, Epilogue, Syne
- Serif: Playfair Display, Crimson Pro, Libre Baskerville, Merriweather
- Modern Sans: Outfit, Manrope, General Sans, Satoshi
Typography Best Practices:
- Use high contrast pairings: display + monospace, serif + geometric sans
- Employ extreme weight variations: 100/200 vs 800/900 (not just 400 vs 600)
- Create dramatic size jumps: 3x+ differences, not 1.5x
- Load fonts from Google Fonts and state choices explicitly before coding
Example pairing:
Heading: Clash Display (800 weight, 4rem)
Body: JetBrains Mono (300 weight, 0.9rem)
Accent: Space Grotesk (700 weight, 1.2rem)
2. Color & Theme
AVOID these clichéd schemes:
- Purple gradients on white backgrounds
- Generic blue-and-white corporate palettes
- Timid, evenly-distributed colors
- Predictable light mode with subtle accents
USE cohesive aesthetics with CSS variables:
- Commit to a theme: Cyberpunk, Solarpunk, Brutalist, Neo-Tokyo, Retro-Future, Terminal, Vaporwave
- Dominant colors with sharp accents: Not all colors equally represented
- Draw from IDE themes: Dracula, Nord, Gruvbox, Tokyo Night, Monokai
- Cultural aesthetics: Japanese minimalism, Swiss design, Memphis style
Color Strategy:
- Define CSS custom properties for consistency
- Choose 2-3 dominant colors and 1-2 sharp accents
- Consider dark themes as often as light themes
- Use gradients sparingly but boldly when used
Example theme (Cyberpunk):
--bg-primary: #0a0e27;
--bg-secondary: #16213e;
--accent-neon: #00ff9f;
--accent-pink: #ff006e;
--text-primary: #e0e0e0;
--text-muted: #8892b0;
3. Motion
Implementation approach:
- For HTML: CSS-only animations
- For React: Use Framer Motion library when available
- Focus on high-impact moments over scattered micro-interactions
- One well-orchestrated page load with staggered reveals > many small animations
Motion Best Practices:
- Use
animation-delay for staggered effects
- Animate on mount/page load for impact
- Keep animations smooth (ease-out, ease-in-out)
- Duration: 0.4s-0.8s for most transitions
Example staggered reveal:
.fade-in {
animation: fadeIn 0.6s ease-out forwards;
opacity: 0;
}
.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
@keyframes fadeIn {
to { opacity: 1; transform: translateY(0); }
from { opacity: 0; transform: translateY(20px); }
}
4. Backgrounds
AVOID: Solid white or solid single-color backgrounds
USE atmosphere and depth:
- Layered CSS gradients: Multiple gradients with varying opacity
- Geometric patterns: Grid lines, dots, diagonal stripes
- Contextual effects: Noise texture, grain, subtle animations
- Thematic elements: Match overall aesthetic (circuits for tech, organic shapes for nature)
Background Techniques:
/* Layered gradients */
background:
radial-gradient(circle at 20% 50%, rgba(120, 0, 255, 0.3) 0%, transparent 50%),
radial-gradient(circle at 80% 80%, rgba(0, 255, 200, 0.2) 0%, transparent 50%),
linear-gradient(135deg, #0a0e27 0%, #16213e 100%);
/* Grid pattern */
background-image:
linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
background-size: 50px 50px;
/* Dots pattern */
background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
background-size: 20px 20px;
Critical Warnings: Avoid "AI Slop"
Think outside the box! It is CRITICAL that you:
- ✅ Vary between light and dark themes (don't default to light)
- ✅ Use different fonts each time (avoid convergence on Space Grotesk)
- ✅ Try different aesthetics (cyberpunk, brutalist, retro, minimalist)
- ❌ Never use: Inter, Roboto, Arial as primary fonts
- ❌ Never default to: White background with purple accents
- ❌ Avoid: Cookie-cutter layouts, predictable component patterns
- ❌ Don't create: Generic designs lacking context-specific character
Workflow
When creating frontend UIs, follow this process:
Step 1: Understand Context
Ask clarifying questions about:
- Purpose of the interface
- Target audience
- Desired mood/feeling
- Any specific aesthetic preferences
Step 2: Choose Aesthetic Direction
Pick a cohesive theme based on context:
- Tech/Dev: Terminal, Cyberpunk, Hacker aesthetic
- Creative: Vaporwave, Memphis, Brutalist
- Professional: Swiss design, Minimalist, Editorial
- Organic: Solarpunk, Nature-inspired, Warm tones
Step 3: State Design Decisions Explicitly
Before writing code, declare:
Theme: [chosen aesthetic]
Fonts: [heading font], [body font], [accent font]
Colors: [dominant colors and accents]
Motion: [key animations planned]
Background: [approach chosen]
Step 4: Implement with Best Practices
Technical Requirements:
- Use vanilla HTML, CSS, JavaScript OR React as requested
- Include Tailwind CSS if appropriate
- Inline all CSS and JavaScript for single-file deliverables
- Load fonts from Google Fonts
- Use CSS custom properties for theming
- Ensure responsive design (mobile-first approach)
Step 5: Create High-Impact Moments
- Orchestrate page load animations
- Use staggered reveals for content
- Add hover states that feel responsive
- Consider scroll-triggered animations sparingly
Examples
Example 1: Developer Portfolio (Dark Theme)
Stated Design:
- Theme: Terminal/Hacker aesthetic with green accents
- Fonts: JetBrains Mono (all text), weight variations for hierarchy
- Colors: Dark bg (#0d1117), green accent (#39ff14), muted gray text
- Motion: Typing animation on hero text, staggered fade-in on projects
- Background: Subtle grid pattern with scanline effect
Key Features:
- Monospace typography throughout
- CRT monitor aesthetic with scanlines
- Green phosphor glow effects
- Terminal-style navigation
Example 2: Creative Agency Landing (Light Theme)
Stated Design:
- Theme: Swiss Brutalist with bold typography
- Fonts: Clash Display (headings 900 weight), Space Grotesk (body 300 weight)
- Colors: Off-white (#f5f5f0), black, one sharp red accent (#ff0000)
- Motion: Bold elements sliding in from edges on load
- Background: Off-white with subtle noise texture
Key Features:
- Extreme type sizing (hero at 6rem+)
- Asymmetric grid layout
- Sharp geometric shapes as accents
- High contrast black/white with red sparingly
Example 3: App Dashboard (Dark Theme)
Stated Design:
- Theme: Neo-Tokyo night with pink/cyan accents
- Fonts: Outfit (headings 700), IBM Plex Mono (data/numbers)
- Colors: Dark navy (#0a1128), pink (#ff006e), cyan (#00f5ff)
- Motion: Smooth transitions on card hovers, data count-up animations
- Background: Dark with subtle radial gradient and grid
Key Features:
- Neon-style accents on interactive elements
- Glassmorphism cards with backdrop blur
- Monospace for all numerical data
- Glowing borders on focus states
Isolated Dimension Prompting
For targeted control, you can isolate single dimensions:
Typography-Only Adjustment
"Keeping all other design elements the same, update only the typography using Crimson Pro for headings and Fira Code for body text with extreme weight contrast."
Theme-Only Adjustment
"Lock the aesthetic to a Solarpunk theme: warm earth tones, organic shapes, nature-inspired patterns, green/gold accents, optimistic futuristic feel."
Motion-Only Enhancement
"Add a well-orchestrated page load sequence: hero fades in first (0.5s), then navigation staggers in (0.2s delays), then content cards reveal bottom-to-top."
Font Rotation Strategy
To avoid convergence on the same fonts, rotate through these distinctive combinations:
Set 1 - Terminal Aesthetic:
- JetBrains Mono + IBM Plex Mono
Set 2 - Modern Editorial:
- Playfair Display + Space Grotesk
Set 3 - Geometric Bold:
Set 4 - Retro Future:
Set 5 - Elegant Tech:
Set 6 - Neo Brutalist:
Quality Checklist
Before delivering, verify:
Notes
- Source: Based on Anthropic's "Prompting for Frontend Aesthetics" research
- Variety is critical: Consciously vary themes, fonts, and approaches across different projects
- Context matters: Match aesthetic to purpose (playful vs professional, technical vs creative)
- Bold choices: Better to be distinctive than safe and generic
- Performance: Keep animations performant (CSS transforms, not layout changes)
- Accessibility: Ensure sufficient contrast ratios and readable font sizes
References
For deeper exploration, consult REFERENCE.md for:
- Extended font pairing library
- Detailed color palette examples
- Animation cookbook
- Background pattern recipes
- Theme architecture examples
1---2name: frontend-ui-33description: Create aesthetically pleasing, visually distinctive frontend UIs using research-backed prompting strategies from Anthropic's frontend aesthetics cookbook4---5
6# Frontend UI Design
7
8Create visually distinctive, aesthetically pleasing frontend interfaces that avoid generic "AI slop" patterns.
9
10## When to Use
11
12Use this skill when:
13- User requests frontend UI creation (HTML, CSS, JavaScript, or React)
14- User asks to build a webpage, landing page, or web interface
15- User wants to create visual components or layouts
16- User mentions design, aesthetics, or "make it look good"
17- User asks for dashboard, portfolio, or application UI
18
19## Core Principle
20
21**CRITICAL**: Without explicit aesthetic guidance, Claude defaults to generic, conservative designs (white backgrounds, purple accents, Inter/Roboto fonts, predictable layouts). This skill provides research-backed strategies to create distinctive, visually interesting interfaces.
22
23## The Four Design Dimensions
24
25Always address these four areas when creating frontend UIs:
26
27### 1. Typography
28
29**AVOID these overused fonts**:
30- Inter, Roboto, Arial, Helvetica, system fonts
31
32**USE distinctive alternatives**:
33- **Monospace**: JetBrains Mono, Fira Code, IBM Plex Mono, Space Mono
34- **Display/Geometric**: Space Grotesk, Clash Display, Epilogue, Syne
35- **Serif**: Playfair Display, Crimson Pro, Libre Baskerville, Merriweather
36- **Modern Sans**: Outfit, Manrope, General Sans, Satoshi
37
38**Typography Best Practices**:
39- Use **high contrast pairings**: display + monospace, serif + geometric sans
40- Employ **extreme weight variations**: 100/200 vs 800/900 (not just 400 vs 600)
41- Create **dramatic size jumps**: 3x+ differences, not 1.5x
42- Load fonts from Google Fonts and state choices explicitly before coding
43
44**Example pairing**:
45```
46Heading: Clash Display (800 weight, 4rem)
47Body: JetBrains Mono (300 weight, 0.9rem)
48Accent: Space Grotesk (700 weight, 1.2rem)
49```
50
51### 2. Color & Theme
52
53**AVOID these clichéd schemes**:
54- Purple gradients on white backgrounds
55- Generic blue-and-white corporate palettes
56- Timid, evenly-distributed colors
57- Predictable light mode with subtle accents
58
59**USE cohesive aesthetics with CSS variables**:
60- **Commit to a theme**: Cyberpunk, Solarpunk, Brutalist, Neo-Tokyo, Retro-Future, Terminal, Vaporwave
61- **Dominant colors with sharp accents**: Not all colors equally represented
62- **Draw from IDE themes**: Dracula, Nord, Gruvbox, Tokyo Night, Monokai
63- **Cultural aesthetics**: Japanese minimalism, Swiss design, Memphis style
64
65**Color Strategy**:
661. Define CSS custom properties for consistency
672. Choose 2-3 dominant colors and 1-2 sharp accents
683. Consider dark themes as often as light themes
694. Use gradients sparingly but boldly when used
70
71**Example theme (Cyberpunk)**:
72```css
73--bg-primary: #0a0e27;
74--bg-secondary: #16213e;
75--accent-neon: #00ff9f;
76--accent-pink: #ff006e;
77--text-primary: #e0e0e0;
78--text-muted: #8892b0;
79```
80
81### 3. Motion
82
83**Implementation approach**:
84- **For HTML**: CSS-only animations
85- **For React**: Use Framer Motion library when available
86- Focus on **high-impact moments** over scattered micro-interactions
87- One well-orchestrated page load with staggered reveals > many small animations
88
89**Motion Best Practices**:
90- Use `animation-delay` for staggered effects
91- Animate on mount/page load for impact
92- Keep animations smooth (ease-out, ease-in-out)
93- Duration: 0.4s-0.8s for most transitions
94
95**Example staggered reveal**:
96```css
97.fade-in {
98 animation: fadeIn 0.6s ease-out forwards;
99 opacity: 0;
100}
101
102.fade-in:nth-child(1) { animation-delay: 0.1s; }
103.fade-in:nth-child(2) { animation-delay: 0.2s; }
104.fade-in:nth-child(3) { animation-delay: 0.3s; }
105
106@keyframes fadeIn {
107 to { opacity: 1; transform: translateY(0); }
108 from { opacity: 0; transform: translateY(20px); }
109}
110```
111
112### 4. Backgrounds
113
114**AVOID**: Solid white or solid single-color backgrounds
115
116**USE atmosphere and depth**:
117- **Layered CSS gradients**: Multiple gradients with varying opacity
118- **Geometric patterns**: Grid lines, dots, diagonal stripes
119- **Contextual effects**: Noise texture, grain, subtle animations
120- **Thematic elements**: Match overall aesthetic (circuits for tech, organic shapes for nature)
121
122**Background Techniques**:
123
124```css
125/* Layered gradients */
126background:
127 radial-gradient(circle at 20% 50%, rgba(120, 0, 255, 0.3) 0%, transparent 50%),
128 radial-gradient(circle at 80% 80%, rgba(0, 255, 200, 0.2) 0%, transparent 50%),
129 linear-gradient(135deg, #0a0e27 0%, #16213e 100%);
130
131/* Grid pattern */
132background-image:
133 linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
134 linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
135background-size: 50px 50px;
136
137/* Dots pattern */
138background-image: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
139background-size: 20px 20px;
140```
141
142## Critical Warnings: Avoid "AI Slop"
143
144**Think outside the box!** It is CRITICAL that you:
145
146- ✅ **Vary between light and dark themes** (don't default to light)
147- ✅ **Use different fonts each time** (avoid convergence on Space Grotesk)
148- ✅ **Try different aesthetics** (cyberpunk, brutalist, retro, minimalist)
149- ❌ **Never use**: Inter, Roboto, Arial as primary fonts
150- ❌ **Never default to**: White background with purple accents
151- ❌ **Avoid**: Cookie-cutter layouts, predictable component patterns
152- ❌ **Don't create**: Generic designs lacking context-specific character
153
154## Workflow
155
156When creating frontend UIs, follow this process:
157
158### Step 1: Understand Context
159Ask clarifying questions about:
160- Purpose of the interface
161- Target audience
162- Desired mood/feeling
163- Any specific aesthetic preferences
164
165### Step 2: Choose Aesthetic Direction
166Pick a cohesive theme based on context:
167- **Tech/Dev**: Terminal, Cyberpunk, Hacker aesthetic
168- **Creative**: Vaporwave, Memphis, Brutalist
169- **Professional**: Swiss design, Minimalist, Editorial
170- **Organic**: Solarpunk, Nature-inspired, Warm tones
171
172### Step 3: State Design Decisions Explicitly
173Before writing code, declare:
174```
175Theme: [chosen aesthetic]
176Fonts: [heading font], [body font], [accent font]
177Colors: [dominant colors and accents]
178Motion: [key animations planned]
179Background: [approach chosen]
180```
181
182### Step 4: Implement with Best Practices
183
184**Technical Requirements**:
185- Use vanilla HTML, CSS, JavaScript OR React as requested
186- Include Tailwind CSS if appropriate
187- Inline all CSS and JavaScript for single-file deliverables
188- Load fonts from Google Fonts
189- Use CSS custom properties for theming
190- Ensure responsive design (mobile-first approach)
191
192### Step 5: Create High-Impact Moments
193- Orchestrate page load animations
194- Use staggered reveals for content
195- Add hover states that feel responsive
196- Consider scroll-triggered animations sparingly
197
198## Examples
199
200### Example 1: Developer Portfolio (Dark Theme)
201
202**Stated Design**:
203- Theme: Terminal/Hacker aesthetic with green accents
204- Fonts: JetBrains Mono (all text), weight variations for hierarchy
205- Colors: Dark bg (#0d1117), green accent (#39ff14), muted gray text
206- Motion: Typing animation on hero text, staggered fade-in on projects
207- Background: Subtle grid pattern with scanline effect
208
209**Key Features**:
210- Monospace typography throughout
211- CRT monitor aesthetic with scanlines
212- Green phosphor glow effects
213- Terminal-style navigation
214
215### Example 2: Creative Agency Landing (Light Theme)
216
217**Stated Design**:
218- Theme: Swiss Brutalist with bold typography
219- Fonts: Clash Display (headings 900 weight), Space Grotesk (body 300 weight)
220- Colors: Off-white (#f5f5f0), black, one sharp red accent (#ff0000)
221- Motion: Bold elements sliding in from edges on load
222- Background: Off-white with subtle noise texture
223
224**Key Features**:
225- Extreme type sizing (hero at 6rem+)
226- Asymmetric grid layout
227- Sharp geometric shapes as accents
228- High contrast black/white with red sparingly
229
230### Example 3: App Dashboard (Dark Theme)
231
232**Stated Design**:
233- Theme: Neo-Tokyo night with pink/cyan accents
234- Fonts: Outfit (headings 700), IBM Plex Mono (data/numbers)
235- Colors: Dark navy (#0a1128), pink (#ff006e), cyan (#00f5ff)
236- Motion: Smooth transitions on card hovers, data count-up animations
237- Background: Dark with subtle radial gradient and grid
238
239**Key Features**:
240- Neon-style accents on interactive elements
241- Glassmorphism cards with backdrop blur
242- Monospace for all numerical data
243- Glowing borders on focus states
244
245## Isolated Dimension Prompting
246
247For targeted control, you can isolate single dimensions:
248
249### Typography-Only Adjustment
250"Keeping all other design elements the same, update only the typography using Crimson Pro for headings and Fira Code for body text with extreme weight contrast."
251
252### Theme-Only Adjustment
253"Lock the aesthetic to a Solarpunk theme: warm earth tones, organic shapes, nature-inspired patterns, green/gold accents, optimistic futuristic feel."
254
255### Motion-Only Enhancement
256"Add a well-orchestrated page load sequence: hero fades in first (0.5s), then navigation staggers in (0.2s delays), then content cards reveal bottom-to-top."
257
258## Font Rotation Strategy
259
260To avoid convergence on the same fonts, rotate through these distinctive combinations:
261
262**Set 1 - Terminal Aesthetic**:
263- JetBrains Mono + IBM Plex Mono
264
265**Set 2 - Modern Editorial**:
266- Playfair Display + Space Grotesk
267
268**Set 3 - Geometric Bold**:
269- Clash Display + Manrope
270
271**Set 4 - Retro Future**:
272- Space Mono + Outfit
273
274**Set 5 - Elegant Tech**:
275- Crimson Pro + Fira Code
276
277**Set 6 - Neo Brutalist**:
278- Syne + General Sans
279
280## Quality Checklist
281
282Before delivering, verify:
283
284- [ ] Fonts are NOT Inter, Roboto, Arial, or system fonts
285- [ ] Color scheme is NOT white background with purple accents
286- [ ] Typography has extreme weight variations (100-200 vs 800-900)
287- [ ] Size jumps are 3x+ for hierarchical contrast
288- [ ] Background has depth (gradients, patterns, or effects)
289- [ ] Motion is orchestrated (staggered, purposeful)
290- [ ] Theme is cohesive and context-appropriate
291- [ ] CSS custom properties are used for consistency
292- [ ] Design avoids generic, cookie-cutter patterns
293- [ ] Aesthetic is distinctive and memorable
294
295## Notes
296
297- **Source**: Based on Anthropic's "Prompting for Frontend Aesthetics" research
298- **Variety is critical**: Consciously vary themes, fonts, and approaches across different projects
299- **Context matters**: Match aesthetic to purpose (playful vs professional, technical vs creative)
300- **Bold choices**: Better to be distinctive than safe and generic
301- **Performance**: Keep animations performant (CSS transforms, not layout changes)
302- **Accessibility**: Ensure sufficient contrast ratios and readable font sizes
303
304## References
305
306For deeper exploration, consult REFERENCE.md for:
307- Extended font pairing library
308- Detailed color palette examples
309- Animation cookbook
310- Background pattern recipes
311- Theme architecture examples