Frontend Design
Create distinctive, production-grade web interfaces that avoid generic AI aesthetics.
Install
git clone https://github.com/thatrebeccarae/claude-marketing.git && cp -r claude-marketing/skills/frontend-design ~/.claude/skills/
Design Thinking Process
1. Understand Context
Before writing code, answer:
- Purpose: What problem does this interface solve? Who uses it?
- Audience: Technical sophistication, expectations, emotional state when arriving
- Constraints: Framework requirements, browser support, performance budget, accessibility needs
2. Commit to an Aesthetic Direction
Choose a specific point of view — not "clean and modern" but a real aesthetic:
| Direction |
Characteristics |
| Brutally minimal |
Monochrome, system fonts, stark spacing, no decoration |
| Maximalist |
Dense, layered, multiple type scales, rich texture |
| Retro-futuristic |
Neon accents, dark backgrounds, grid lines, monospace |
| Organic/natural |
Soft shapes, earth tones, hand-drawn elements, warm |
| Luxury/refined |
Thin serifs, generous whitespace, muted palette, restrained |
| Playful/toy-like |
Rounded shapes, bright primaries, bouncy animations |
| Editorial/magazine |
Strong grid, dramatic type hierarchy, pull quotes |
| Brutalist/raw |
Exposed structure, monospace, raw HTML feeling |
| Art deco/geometric |
Symmetry, metallic accents, decorative borders, angular |
| Soft/pastel |
Light palette, gentle gradients, rounded, approachable |
| Industrial/utilitarian |
Exposed grid, status indicators, dense information |
3. Identify the Memorable Thing
Every interface should have one element someone remembers:
- An unexpected interaction
- A distinctive type treatment
- A bold color choice
- An animation that surprises
- A layout that breaks convention
4. Execute with Intentionality
The key is commitment, not intensity. Maximalism executed fully works. Minimalism executed with precision works. The mushy middle does not.
Typography
Principles
- Choose distinctive fonts, NOT defaults (avoid Arial, Inter, Roboto for display use)
- Pair a display font (personality) with a body font (readability)
- Size hierarchy: display (48-96px), heading (24-36px), body (16-18px), small (12-14px)
- Tight letter-spacing on large display text (-0.02 to -0.04em)
- Normal or slightly loose spacing on body text
Free Font Sources
| Source |
Best For |
| Google Fonts |
Widest selection, easy CDN |
| Fontshare |
High-quality display fonts |
| Fontsource |
Self-hosted, npm installable |
| Atipo Foundry |
Distinctive display faces |
Pairing Strategy
| Display |
Body |
Vibe |
| Serif (dramatic) |
Sans-serif (clean) |
Editorial, luxury |
| Geometric sans |
Humanist sans |
Modern, friendly |
| Monospace |
System sans |
Technical, brutalist |
| Slab serif |
Neutral sans |
Bold, structured |
| Handwritten/display |
Geometric sans |
Playful, creative |
Color & Theme
Building a Palette
- Start with one dominant color (the mood-setter)
- Add 1-2 accent colors (for interaction, emphasis)
- Define neutral scale (backgrounds, borders, text)
- Add semantic colors (success, warning, error)
- Store everything in CSS custom properties
:root {
--color-primary: #...;
--color-accent: #...;
--color-bg: #...;
--color-surface: #...;
--color-text: #...;
--color-text-secondary: #...;
--color-border: #...;
}
Rules
- Dominant + accent, not evenly distributed
- WCAG AA contrast minimum (4.5:1 for text, 3:1 for large text)
- Dark vs. light: commit fully. Do not hedge.
- Test with real content, not lorem ipsum
Motion & Animation
CSS Transitions (Micro-interactions)
.button {
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
CSS @keyframes (Ambient)
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.floating-element { animation: float 3s ease-in-out infinite; }
Scroll-Triggered (IntersectionObserver)
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, { threshold: 0.1 });
document.querySelectorAll('.animate-on-scroll').forEach(el => observer.observe(el));
Staggered Reveals
.stagger-item { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
.stagger-item.visible { opacity: 1; transform: translateY(0); }
.stagger-item:nth-child(1) { transition-delay: 0s; }
.stagger-item:nth-child(2) { transition-delay: 0.1s; }
.stagger-item:nth-child(3) { transition-delay: 0.2s; }
Performance
- Animate only
transform and opacity (GPU-composited)
- Avoid animating
width, height, margin, padding (trigger layout)
- Use
will-change sparingly and only on elements that will animate
- Prefer CSS over JS for simple animations
- Use
prefers-reduced-motion media query for accessibility
Spatial Composition
- Break out of the centered-content-column default
- Use asymmetry and grid-breaking elements intentionally
- Overlap elements with z-index for depth
- Generous negative space OR controlled density — commit to one
- CSS Grid for complex layouts, Flexbox for component alignment
Code Quality
- Semantic HTML (nav, main, article, section, aside, footer)
- Accessible: ARIA labels, keyboard navigation, focus management
- Responsive: mobile-first or fluid, tested at 320-1440px
- Performance: lazy loading images, efficient selectors, minimal JS
- No external dependencies unless essential (CDN fonts are fine)
Anti-Patterns
- Generic AI aesthetics (purple gradients everywhere, glassmorphism on everything)
- Cookie-cutter component libraries used without customization
- Predictable layouts (hero → 3-column → testimonials → CTA)
- "Clean and modern" as the entire design direction
- Overused fonts (Inter, Poppins for display)
- Decorative elements without purpose
- Rounded everything (a specific choice is fine, but default rounding is lazy)
- Dark mode with neon accents (overdone)
For typography pairings, color construction, animation library, and accessibility checklist, see REFERENCE.md.
Brand Context (Optional)
If brand-profile.json exists in the working directory, read it before designing. Use colors (primary, secondary, background, text) for the design system, typography (heading and body fonts) for type selections, aesthetic (mood keywords, texture, negative space) for layout decisions, and imagery (style, composition) for hero sections and visual elements. This profile is produced by the brand-dna skill.
1---2name: frontend-design3description: Create distinctive, production-grade frontend interfaces with high design quality. Covers design thinking, typography pairing, color theory, motion design, spatial composition, and code quality. Generates real working code — HTML/CSS/JS or React — with intentional aesthetic direction, not generic AI output.4license: MIT5---67# Frontend Design89Create distinctive, production-grade web interfaces that avoid generic AI aesthetics.1011## Install1213```bash14git clone https://github.com/thatrebeccarae/claude-marketing.git && cp -r claude-marketing/skills/frontend-design ~/.claude/skills/15```1617## Design Thinking Process1819### 1. Understand Context2021Before writing code, answer:22- **Purpose:** What problem does this interface solve? Who uses it?23- **Audience:** Technical sophistication, expectations, emotional state when arriving24- **Constraints:** Framework requirements, browser support, performance budget, accessibility needs2526### 2. Commit to an Aesthetic Direction2728Choose a specific point of view — not "clean and modern" but a real aesthetic:2930| Direction | Characteristics |31|-----------|----------------|32| Brutally minimal | Monochrome, system fonts, stark spacing, no decoration |33| Maximalist | Dense, layered, multiple type scales, rich texture |34| Retro-futuristic | Neon accents, dark backgrounds, grid lines, monospace |35| Organic/natural | Soft shapes, earth tones, hand-drawn elements, warm |36| Luxury/refined | Thin serifs, generous whitespace, muted palette, restrained |37| Playful/toy-like | Rounded shapes, bright primaries, bouncy animations |38| Editorial/magazine | Strong grid, dramatic type hierarchy, pull quotes |39| Brutalist/raw | Exposed structure, monospace, raw HTML feeling |40| Art deco/geometric | Symmetry, metallic accents, decorative borders, angular |41| Soft/pastel | Light palette, gentle gradients, rounded, approachable |42| Industrial/utilitarian | Exposed grid, status indicators, dense information |4344### 3. Identify the Memorable Thing4546Every interface should have one element someone remembers:47- An unexpected interaction48- A distinctive type treatment49- A bold color choice50- An animation that surprises51- A layout that breaks convention5253### 4. Execute with Intentionality5455The key is commitment, not intensity. Maximalism executed fully works. Minimalism executed with precision works. The mushy middle does not.5657## Typography5859### Principles6061- Choose distinctive fonts, NOT defaults (avoid Arial, Inter, Roboto for display use)62- Pair a display font (personality) with a body font (readability)63- Size hierarchy: display (48-96px), heading (24-36px), body (16-18px), small (12-14px)64- Tight letter-spacing on large display text (-0.02 to -0.04em)65- Normal or slightly loose spacing on body text6667### Free Font Sources6869| Source | Best For |70|--------|----------|71| Google Fonts | Widest selection, easy CDN |72| Fontshare | High-quality display fonts |73| Fontsource | Self-hosted, npm installable |74| Atipo Foundry | Distinctive display faces |7576### Pairing Strategy7778| Display | Body | Vibe |79|---------|------|------|80| Serif (dramatic) | Sans-serif (clean) | Editorial, luxury |81| Geometric sans | Humanist sans | Modern, friendly |82| Monospace | System sans | Technical, brutalist |83| Slab serif | Neutral sans | Bold, structured |84| Handwritten/display | Geometric sans | Playful, creative |8586## Color & Theme8788### Building a Palette89901. Start with one dominant color (the mood-setter)912. Add 1-2 accent colors (for interaction, emphasis)923. Define neutral scale (backgrounds, borders, text)934. Add semantic colors (success, warning, error)945. Store everything in CSS custom properties9596```css97:root {98 --color-primary: #...;99 --color-accent: #...;100 --color-bg: #...;101 --color-surface: #...;102 --color-text: #...;103 --color-text-secondary: #...;104 --color-border: #...;105}106```107108### Rules109110- Dominant + accent, not evenly distributed111- WCAG AA contrast minimum (4.5:1 for text, 3:1 for large text)112- Dark vs. light: commit fully. Do not hedge.113- Test with real content, not lorem ipsum114115## Motion & Animation116117### CSS Transitions (Micro-interactions)118119```css120.button {121 transition: transform 0.2s ease, box-shadow 0.2s ease;122}123.button:hover {124 transform: translateY(-2px);125 box-shadow: 0 4px 12px rgba(0,0,0,0.15);126}127```128129### CSS @keyframes (Ambient)130131```css132@keyframes float {133 0%, 100% { transform: translateY(0); }134 50% { transform: translateY(-10px); }135}136.floating-element { animation: float 3s ease-in-out infinite; }137```138139### Scroll-Triggered (IntersectionObserver)140141```javascript142const observer = new IntersectionObserver((entries) => {143 entries.forEach(entry => {144 if (entry.isIntersecting) {145 entry.target.classList.add('visible');146 }147 });148}, { threshold: 0.1 });149150document.querySelectorAll('.animate-on-scroll').forEach(el => observer.observe(el));151```152153### Staggered Reveals154155```css156.stagger-item { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }157.stagger-item.visible { opacity: 1; transform: translateY(0); }158.stagger-item:nth-child(1) { transition-delay: 0s; }159.stagger-item:nth-child(2) { transition-delay: 0.1s; }160.stagger-item:nth-child(3) { transition-delay: 0.2s; }161```162163### Performance164165- Animate only `transform` and `opacity` (GPU-composited)166- Avoid animating `width`, `height`, `margin`, `padding` (trigger layout)167- Use `will-change` sparingly and only on elements that will animate168- Prefer CSS over JS for simple animations169- Use `prefers-reduced-motion` media query for accessibility170171## Spatial Composition172173- Break out of the centered-content-column default174- Use asymmetry and grid-breaking elements intentionally175- Overlap elements with z-index for depth176- Generous negative space OR controlled density — commit to one177- CSS Grid for complex layouts, Flexbox for component alignment178179## Code Quality180181- Semantic HTML (nav, main, article, section, aside, footer)182- Accessible: ARIA labels, keyboard navigation, focus management183- Responsive: mobile-first or fluid, tested at 320-1440px184- Performance: lazy loading images, efficient selectors, minimal JS185- No external dependencies unless essential (CDN fonts are fine)186187## Anti-Patterns188189- Generic AI aesthetics (purple gradients everywhere, glassmorphism on everything)190- Cookie-cutter component libraries used without customization191- Predictable layouts (hero → 3-column → testimonials → CTA)192- "Clean and modern" as the entire design direction193- Overused fonts (Inter, Poppins for display)194- Decorative elements without purpose195- Rounded everything (a specific choice is fine, but default rounding is lazy)196- Dark mode with neon accents (overdone)197198For typography pairings, color construction, animation library, and accessibility checklist, see [REFERENCE.md](REFERENCE.md).199200## Brand Context (Optional)201202If `brand-profile.json` exists in the working directory, read it before designing. Use colors (primary, secondary, background, text) for the design system, typography (heading and body fonts) for type selections, aesthetic (mood keywords, texture, negative space) for layout decisions, and imagery (style, composition) for hero sections and visual elements. This profile is produced by the `brand-dna` skill.