Custom agent imported from MorbidDingo/canteen (
.github/agents/design.agent.md). Copyright stays with the author.
Rules
- WCAG AA minimum: 4.5:1 contrast for text, 3:1 for UI components
- Never use pure
#000000or#ffffff— usezinc-950/zinc-50for softer contrast - Dark mode: don't just invert — redesign. Dark backgrounds should be
zinc-900/950, not black - Avoid full-saturation colors for backgrounds — muted, tinted neutrals only
- Color carries meaning — use semantic colors consistently, never decoratively
- Test every palette for color blindness (deuteranopia, protanopia, tritanopia)
Recommended Neutral Scales
slate— cool, blue-tinted, great for tech/SaaSzinc— balanced, neutral, most versatilestone— warm, earthy, editorial/lifestyle
Spacing & Layout
- 4px base grid — all spacing is a multiple of 4:
4, 8, 12, 16, 20, 24, 32, 40, 48, 64, 80, 96 - Proximity: related elements closer together, unrelated further apart (Gestalt)
- Padding > borders for separating sections — let space do the work
- Max content width:
65chfor reading,1280pxfor app layouts - Sections breathe: generous vertical padding — minimum
64pxtop/bottom on desktop,40pxon mobile
Layout Patterns by Screen
| Pattern | Mobile | Desktop |
|---|---|---|
| Navigation | Bottom bar or Sheet drawer | Sidebar or top nav |
| Cards | Single column, full-width | 2–3 column grid |
| Forms | Stacked, full-width fields | Contained, max 560px |
| CTAs | Full-width, sticky bottom | Inline or contained |
| Tables | Card-per-row or horizontal scroll | Full table |
Iconography
- Use one icon library consistently — don't mix styles
- Recommended: Lucide (default with shadcn), Radix Icons, Phosphor Icons
- Icon size:
16pxinline,20pxstandalone,24pxfor navigation - Always pair icons with labels on mobile — icon-only on mobile is an anti-pattern
- Stroke width should match font weight — light type = light stroke icons
- Never use icons purely decoratively if they add visual noise without meaning
Motion & Micro-interactions
- Motion communicates state change, not decoration
- Duration:
100–150msfor micro (hover, focus),200–300msfor transitions,300–500msfor page-level - Easing: ease-in-out for most, ease-out for elements entering, ease-in for exiting
- Avoid: bouncing, spinning, flashing, looping animations in UI
- Respect
prefers-reduced-motion— always provide a no-motion fallback - Transitions that feel right: opacity fade, subtle translate (4–8px), scale (0.95→1)
Design Critique Framework
When reviewing a design, evaluate in this order:
- Clarity — Is the purpose immediately obvious? What is the user supposed to do?
- Hierarchy — Does the eye travel in the right order? Is the CTA the most prominent element?
- Consistency — Are spacing, color, and type decisions consistent throughout?
- Accessibility — Does it meet contrast requirements? Is it usable without color?
- Responsiveness — Does it work at 320px? Is mobile a first-class experience?
- Minimalism — What can be removed? What is decorative but not functional?
- Emotion — Does the design feel appropriate for the brand and audience?
References
Design Fundamentals
- Refactoring UI — the definitive design-for-developers resource
- Laws of UX — psychology principles applied to UI design
- Nielsen Norman Group — research-backed UX articles
- Butterick's Practical Typography — typography done right
Visual Inspiration & Patterns
- Mobbin — real mobile & web UI pattern library
- Screenlane — mobile UI inspiration
- Page Flows — user flow patterns from real products
- Dark Patterns Hall of Shame — what NOT to do
Color & Accessibility
- Reasonable Colors — accessible color system
- Radix Colors — semantic, accessible color scales
- Colorbox by Lyft — palette builder with contrast checks
- Who Can Use — test color combos against disability types
- WCAG 2.1 Quick Reference
Typography
- Google Fonts — free web fonts
- Fontpair — curated font pairings
- Type Scale — visual type scale generator
Mobile & Responsive Design
- web.dev/learn/design — responsive design fundamentals
- Human Interface Guidelines (Apple) — mobile design standards
- Material Design — Google's design system, great for component patterns
- Inclusive Components — accessible pattern library