UI/UX Design
When to Use This Skill
Activate this skill when:
- Building or designing web/mobile interfaces
- Choosing colors, typography, or layout systems
- Implementing responsive design (mobile-first)
- Ensuring accessibility compliance (WCAG 2.2)
- Setting up Shadcn/ui + Tailwind CSS projects
- Creating micro-interactions and animations
- Reviewing UI/UX decisions before coding
Core Design Principles
1. Mobile-First Always
- Start with 320px width (smallest phone)
- Breakpoints: 576px (phone), 768px (tablet), 992px (laptop), 1200px (desktop)
- Single-column default, expand only when space allows
2. Visual Hierarchy
Guide user attention using:
- Size: Larger = more important
- Color: Bright/contrasting = attention
- Whitespace: More space = emphasis
- Proximity: Related items grouped together
- Contrast: Dark on light or light on dark (4.5:1 minimum for text)
3. Whitespace is Your Weapon
- Space elements in multiples of 8px (8, 16, 24, 32, 48, 64)
- Breathing room between sections: 48-64px minimum
- Padding inside cards: 24-32px
Quick Reference
Color System
Build a primary color scale (50-900):
- Primary: Brand color (CTAs, links, active states)
- Neutrals: Grays 50-900 (text, backgrounds, borders)
- Semantic: Success (green), Error (red), Warning (yellow/orange)
Tools: Huevy.app, Coolors.co, Adobe Color
Typography Scale (8px baseline)
text-xs: 12px / 16px line-height
text-sm: 14px / 20px
text-base: 16px / 24px (body default)
text-lg: 18px / 28px
text-xl: 20px / 28px
text-2xl: 24px / 32px
text-3xl: 30px / 36px (section headers)
text-4xl: 36px / 40px
text-5xl: 48px / 1 (hero titles)
Font pairing: 2 fonts max (sans-serif for UI, optional serif for headings)
Layout Patterns
- CSS Grid: 2D layouts (page structure)
- Flexbox: 1D layouts (component internals)
- Auto-fit grid:
repeat(auto-fit, minmax(280px, 1fr)) (no media queries!)
Micro-Interactions
- Hover: Scale 1.05x (buttons feel clickable)
- Click: Scale 0.95x (tactile feedback)
- Duration: 0.2-0.3s max (keep it subtle)
- Animate only:
transform and opacity (GPU accelerated)
Accessibility (WCAG 2.2)
- Text contrast: 4.5:1 minimum (normal text), 3:1 (large text)
- UI components: 3:1 contrast minimum
- Keyboard navigation: Tab order logical, focus states visible (3:1 contrast)
- ARIA labels: Always provide for buttons, images, interactive elements
Shadcn/ui + Tailwind Stack
Setup (Next.js)
npx create-next-app@latest project-name --typescript --tailwind --app
cd project-name
npx shadcn@latest init
Choose: Style (Default), Base color (Blue or custom), CSS variables (Yes)
Adding Components
npx shadcn@latest add button
npx shadcn@latest add card
npx shadcn@latest add dialog
npx shadcn@latest add calendar
Components appear in components/ui/ — you own the code, customize freely.
Tailwind Best Practices
- Use design tokens (not arbitrary values):
p-4 not p-[17px]
- Responsive utilities:
w-full md:w-1/2 lg:w-1/3
- Dark mode:
dark:bg-gray-900 dark:text-white
Pre-Build Checklist
Before writing code, confirm:
Inspiration Sources
Study these products:
- Linear (linear.app) — Best keyboard-first UI, subtle animations
- Stripe Dashboard — Clean data visualization, perfect spacing
- Vercel — Minimalist, fast, modern gradients
- Notion — Intuitive drag-and-drop, clear hierarchy
Tools:
- Figma (mockups before coding)
- WebAIM Contrast Checker (accessibility)
- Coolors/Huevy (color palettes)
The 5 Laws of Beautiful UI
- Contrast creates hierarchy (big vs small, dark vs light)
- Whitespace creates calm (never fear empty space)
- Consistency builds trust (same patterns repeated)
- Feedback confirms action (animations, success messages)
- Accessibility includes everyone (contrast, keyboard, screen readers)
Full Reference
For comprehensive deep-dives (component patterns, animation examples, responsive grid techniques), see UI_UX_MASTER_GUIDE.md in this skill directory.
Last Updated: 2026-02-05
1---2name: ui-ux-design-43description: Modern UI/UX design principles, patterns, and best practices for web and mobile applications. Use when building user interfaces, designing layouts, choosing color palettes, implementing responsive design, ensuring accessibility (WCAG), or creating beautiful modern applications. Includes 2026 design trends, Tailwind CSS patterns, Shadcn/ui integration, micro-interactions, and mobile-first responsive design.4---5
6# UI/UX Design
7
8---
9
10## When to Use This Skill
11
12Activate this skill when:
13- Building or designing web/mobile interfaces
14- Choosing colors, typography, or layout systems
15- Implementing responsive design (mobile-first)
16- Ensuring accessibility compliance (WCAG 2.2)
17- Setting up Shadcn/ui + Tailwind CSS projects
18- Creating micro-interactions and animations
19- Reviewing UI/UX decisions before coding
20
21---
22
23## Core Design Principles
24
25### 1. Mobile-First Always
26- Start with 320px width (smallest phone)
27- Breakpoints: 576px (phone), 768px (tablet), 992px (laptop), 1200px (desktop)
28- Single-column default, expand only when space allows
29
30### 2. Visual Hierarchy
31Guide user attention using:
32- **Size:** Larger = more important
33- **Color:** Bright/contrasting = attention
34- **Whitespace:** More space = emphasis
35- **Proximity:** Related items grouped together
36- **Contrast:** Dark on light or light on dark (4.5:1 minimum for text)
37
38### 3. Whitespace is Your Weapon
39- Space elements in multiples of 8px (8, 16, 24, 32, 48, 64)
40- Breathing room between sections: 48-64px minimum
41- Padding inside cards: 24-32px
42
43---
44
45## Quick Reference
46
47### Color System
48Build a primary color scale (50-900):
49- **Primary:** Brand color (CTAs, links, active states)
50- **Neutrals:** Grays 50-900 (text, backgrounds, borders)
51- **Semantic:** Success (green), Error (red), Warning (yellow/orange)
52
53Tools: Huevy.app, Coolors.co, Adobe Color
54
55### Typography Scale (8px baseline)
56```
57text-xs: 12px / 16px line-height
58text-sm: 14px / 20px
59text-base: 16px / 24px (body default)
60text-lg: 18px / 28px
61text-xl: 20px / 28px
62text-2xl: 24px / 32px
63text-3xl: 30px / 36px (section headers)
64text-4xl: 36px / 40px
65text-5xl: 48px / 1 (hero titles)
66```
67
68**Font pairing:** 2 fonts max (sans-serif for UI, optional serif for headings)
69
70### Layout Patterns
71- **CSS Grid:** 2D layouts (page structure)
72- **Flexbox:** 1D layouts (component internals)
73- **Auto-fit grid:** `repeat(auto-fit, minmax(280px, 1fr))` (no media queries!)
74
75### Micro-Interactions
76- **Hover:** Scale 1.05x (buttons feel clickable)
77- **Click:** Scale 0.95x (tactile feedback)
78- **Duration:** 0.2-0.3s max (keep it subtle)
79- **Animate only:** `transform` and `opacity` (GPU accelerated)
80
81### Accessibility (WCAG 2.2)
82- **Text contrast:** 4.5:1 minimum (normal text), 3:1 (large text)
83- **UI components:** 3:1 contrast minimum
84- **Keyboard navigation:** Tab order logical, focus states visible (3:1 contrast)
85- **ARIA labels:** Always provide for buttons, images, interactive elements
86
87---
88
89## Shadcn/ui + Tailwind Stack
90
91### Setup (Next.js)
92```bash
93npx create-next-app@latest project-name --typescript --tailwind --app
94cd project-name
95npx shadcn@latest init
96```
97
98Choose: Style (Default), Base color (Blue or custom), CSS variables (Yes)
99
100### Adding Components
101```bash
102npx shadcn@latest add button
103npx shadcn@latest add card
104npx shadcn@latest add dialog
105npx shadcn@latest add calendar
106```
107
108Components appear in `components/ui/` — you own the code, customize freely.
109
110### Tailwind Best Practices
111- Use design tokens (not arbitrary values): `p-4` not `p-[17px]`
112- Responsive utilities: `w-full md:w-1/2 lg:w-1/3`
113- Dark mode: `dark:bg-gray-900 dark:text-white`
114
115---
116
117## Pre-Build Checklist
118
119Before writing code, confirm:
120- [ ] Color palette defined (primary + neutrals + semantic colors)
121- [ ] Typography scale chosen (6-8 sizes)
122- [ ] Component library picked (Shadcn + Tailwind)
123- [ ] Mobile breakpoints planned (576px, 768px, 992px)
124- [ ] Accessibility contrast ratios checked (4.5:1 text, 3:1 UI)
125- [ ] Micro-interaction list (hover, click, success states)
126- [ ] Grid layout sketched (mobile → desktop progression)
127
128---
129
130## Inspiration Sources
131
132**Study these products:**
133- Linear (linear.app) — Best keyboard-first UI, subtle animations
134- Stripe Dashboard — Clean data visualization, perfect spacing
135- Vercel — Minimalist, fast, modern gradients
136- Notion — Intuitive drag-and-drop, clear hierarchy
137
138**Tools:**
139- Figma (mockups before coding)
140- WebAIM Contrast Checker (accessibility)
141- Coolors/Huevy (color palettes)
142
143---
144
145## The 5 Laws of Beautiful UI
146
1471. **Contrast creates hierarchy** (big vs small, dark vs light)
1482. **Whitespace creates calm** (never fear empty space)
1493. **Consistency builds trust** (same patterns repeated)
1504. **Feedback confirms action** (animations, success messages)
1515. **Accessibility includes everyone** (contrast, keyboard, screen readers)
152
153---
154
155## Full Reference
156
157For comprehensive deep-dives (component patterns, animation examples, responsive grid techniques), see `UI_UX_MASTER_GUIDE.md` in this skill directory.
158
159---
160
161**Last Updated:** 2026-02-05