Ensures modern, professional UI design by providing principles for spacing, typography, colors, shadows, and interactive states. Use when building any UI component or interface with Next.js/React, Nuxt/Vue, shadcn UI, or Tailwind CSS to ensure consistent, clean, minimal design.
This skill ensures every UI you build looks modern and professional by following proven design principles. Reference this skill whenever building any UI component.
Core Design Principles
1. Clean and Minimal Layout
Use generous white space throughout the interface
Avoid cluttered designs - less is more
Let content breathe with proper spacing
Create visual hierarchy through spacing rather than decoration
Remove unnecessary elements and decorations
2. Neutral Color Palette
Base colors: Use grays and off-whites (not pure white) as the foundation
Accent color: Choose ONE accent color and use it sparingly for emphasis
Avoid: Generic purple/blue gradients - they look dated and unprofessional
Example palette:
Background: bg-zinc-50 or bg-slate-50 or bg-gray-50
Text primary: text-zinc-900 or text-gray-900
Text secondary: text-zinc-600 or text-gray-600
Borders: border-zinc-200 or border-gray-200
Accent: One brand color used only for CTAs and important elements
Bad practice: Rainbow gradients everywhere, every element a different color
3. Spacing System (8px Grid)
Use consistent spacing based on an 8px grid system. In Tailwind CSS, this maps to:
gap-2 or p-2 = 8px
gap-4 or p-4 = 16px
gap-6 or p-6 = 24px
gap-8 or p-8 = 32px
gap-12 or p-12 = 48px
gap-16 or p-16 = 64px
Guidelines:
Use these values consistently throughout your design
Smaller spacing (8-16px) for related elements within a component
Medium spacing (24-32px) for sections within a component
Larger spacing (48-64px) for major layout sections and between components
Typography has clear hierarchy, minimum 16px body text
Maximum 2 fonts used
Shadows are subtle, not heavy
Rounded corners used thoughtfully, not on everything
All interactive elements have hover, active, disabled, and focus states
Mobile-responsive with mobile-first approach
No generic purple/blue gradients
No rainbow gradients
Text is readable (not too small, good contrast)
Spacing is consistent throughout
Cards use borders OR shadows, not both
Common Mistakes to Avoid
Color Mistakes
❌ Pure white backgrounds (bg-white everywhere)
✅ Use off-white (bg-zinc-50, bg-gray-50)
❌ Too many colors, rainbow gradients
✅ Grays + one accent color
❌ Generic purple/blue gradients
✅ Solid colors or very subtle gradients
Spacing Mistakes
❌ Inconsistent spacing (3px, 17px, 23px random values)
✅ 8px grid system (8, 16, 24, 32, 48, 64px)
❌ Cramped, cluttered layouts
✅ Generous white space
Typography Mistakes
❌ Text smaller than 16px for body content
✅ Minimum 16px (text-base) for body
❌ Using 5+ different fonts
✅ Maximum 2 fonts
Shadow Mistakes
❌ Heavy, dark drop shadows
✅ Subtle shadows (shadow-sm, shadow)
❌ Cards with both heavy borders AND heavy shadows
✅ Borders OR shadows, not both
Interactive State Mistakes
❌ No hover effects on buttons
✅ Clear hover, active, disabled, focus states
❌ Missing focus indicators (accessibility issue)
✅ Visible focus rings
Mobile Mistakes
❌ Desktop-only design that breaks on mobile
✅ Mobile-first, responsive design
❌ Tiny touch targets (<44px)
✅ Minimum 44x44px touch targets
Examples in Context
Dashboard Card
// Good example
<div className="bg-white border border-zinc-200 rounded-lg p-6">
<h3 className="text-xl font-semibold text-zinc-900 mb-2">
Revenue
</h3>
<p className="text-3xl font-bold text-zinc-900">
$12,450
</p>
<p className="text-sm text-zinc-600 mt-2">
+12% from last month
</p>
</div>
Feature Section
// Good example with proper spacing
<section className="py-16 px-4">
<div className="max-w-6xl mx-auto">
<h2 className="text-3xl font-bold text-zinc-900 mb-4">
Features
</h2>
<p className="text-base text-zinc-600 mb-12 max-w-2xl">
Everything you need to build modern applications
</p>
<div className="grid md:grid-cols-3 gap-8">
{/* Feature cards with 8px grid spacing */}
</div>
</div>
</section>
When to Apply This Skill
Apply these principles for:
Building new UI components in Next.js/React or Nuxt/Vue
Creating pages and layouts
Designing forms and inputs
Building navigation menus
Creating cards, buttons, and interactive elements
Setting up color schemes and typography
Implementing responsive designs
Working with Tailwind CSS and shadcn UI
Always reference these guidelines before starting any UI work and verify against the checklist before considering the work complete.
1---2name: design-guide-53description: Ensures modern, professional UI design by providing principles for spacing, typography, colors, shadows, and interactive states. Use when building any UI component or interface with Next.js/React, Nuxt/Vue, shadcn UI, or Tailwind CSS to ensure consistent, clean, minimal design.4---56# Design Guide
78This skill ensures every UI you build looks modern and professional by following proven design principles. Reference this skill whenever building any UI component.
910## Core Design Principles
1112### 1. Clean and Minimal Layout
13- Use generous white space throughout the interface
14- Avoid cluttered designs - less is more
15- Let content breathe with proper spacing
16- Create visual hierarchy through spacing rather than decoration
17- Remove unnecessary elements and decorations
1819### 2. Neutral Color Palette
20- **Base colors**: Use grays and off-whites (not pure white) as the foundation
21- **Accent color**: Choose ONE accent color and use it sparingly for emphasis
22- **Avoid**: Generic purple/blue gradients - they look dated and unprofessional
23- **Example palette**:
24 - Background: `bg-zinc-50` or `bg-slate-50` or `bg-gray-50`
25 - Text primary: `text-zinc-900` or `text-gray-900`
26 - Text secondary: `text-zinc-600` or `text-gray-600`
27 - Borders: `border-zinc-200` or `border-gray-200`
28 - Accent: One brand color used only for CTAs and important elements
29- **Bad practice**: Rainbow gradients everywhere, every element a different color
3031### 3. Spacing System (8px Grid)
32Use consistent spacing based on an 8px grid system. In Tailwind CSS, this maps to:
33- `gap-2` or `p-2` = 8px
34- `gap-4` or `p-4` = 16px
35- `gap-6` or `p-6` = 24px
36- `gap-8` or `p-8` = 32px
37- `gap-12` or `p-12` = 48px
38- `gap-16` or `p-16` = 64px
3940**Guidelines**:
41- Use these values consistently throughout your design
42- Smaller spacing (8-16px) for related elements within a component
43- Medium spacing (24-32px) for sections within a component
44- Larger spacing (48-64px) for major layout sections and between components
45- **Bad practice**: Inconsistent spacing (3px here, 17px there, 23px somewhere else)
4647### 4. Typography
48- **Clear hierarchy**: Establish distinct heading levels with size and weight
49- **Readable sizes**: Minimum 16px (`text-base`) for body text - never smaller
50- **Font limit**: Use maximum 2 different fonts (one for headings, one for body)
51- **Line height**: Ensure comfortable reading with `leading-relaxed` or `leading-normal`
52- **Example hierarchy**:
53 - H1: `text-3xl font-bold` or `text-4xl font-bold`
54 - H2: `text-2xl font-semibold`
55 - H3: `text-xl font-semibold`
56 - Body: `text-base` (16px minimum)
57 - Small: `text-sm text-zinc-600`
58- **Bad practice**: Tiny unreadable text below 16px for body content
5960### 5. Shadows
61- Use subtle shadows, not heavy or overdone effects
62- **Light shadow**: `shadow-sm` for slight elevation
63- **Medium shadow**: `shadow` for cards and elevated elements
64- **Avoid**: `shadow-2xl`, dark shadows, or heavy drop shadows
65- Cards should use either clean borders OR subtle shadows, not both
66- **Bad practice**: Heavy, dark shadows that look dated
6768### 6. Rounded Corners
69- Apply rounded corners thoughtfully - not everything needs to be rounded
70- **Typical values**:
71 - Buttons: `rounded-md` (6px) or `rounded-lg` (8px)
72 - Cards: `rounded-lg` (8px) or `rounded-xl` (12px)
73 - Small elements: `rounded` (4px)
74 - Inputs: `rounded-md` (6px)
75- Maintain consistency across similar element types
76- Some elements (like data tables or certain layouts) look better without rounding
7778### 7. Interactive States
79Always define clear states for all interactive elements:
80- **Hover**: Subtle color change or slight elevation
81- **Active/Pressed**: Slightly darker or more emphasis
82- **Disabled**: Reduced opacity (`opacity-50`) and no hover effects
83- **Focus**: Clear focus ring for accessibility (`focus:ring-2 focus:ring-offset-2`)
84- Use smooth transitions: `transition-colors duration-150` or `transition-all duration-200`
8586**Bad practice**: Missing hover states, no disabled states, no focus indicators
8788### 8. Mobile-First Thinking
89- Design for mobile viewport first, then enhance for larger screens
90- Use responsive utilities: `sm:`, `md:`, `lg:`, `xl:`, `2xl:`
91- Ensure touch targets are minimum 44x44px for mobile
92- Test all interactive elements work well on mobile
93- Stack vertically on mobile, use grid/flex on desktop
9495## Component Guidelines
9697### Buttons (Good Example)
98```jsx
99// Primary button - proper implementation
100<button className="
101 bg-zinc-900 text-white
102 px-4 py-2
103 rounded-lg
104 shadow-sm
105 hover:bg-zinc-800
106 active:bg-zinc-950
107 disabled:opacity-50 disabled:cursor-not-allowed
108 focus:ring-2 focus:ring-offset-2 focus:ring-zinc-900
109 transition-colors duration-150
110">
111 Click me
112</button>
113114// Secondary button
115<button className="
116 bg-white text-zinc-900
117 border border-zinc-300
118 px-4 py-2
119 rounded-lg
120 hover:bg-zinc-50
121 active:bg-zinc-100
122 disabled:opacity-50 disabled:cursor-not-allowed
123 transition-colors duration-150
124">
125 Secondary
126</button>
127```
128129**Key elements**:
130- Subtle shadow (`shadow-sm`)
131- Proper padding: `px-4 py-2` minimum
132- Clear hover state with smooth transition
133- NO gradients
134- Disabled state defined
135- Focus state for accessibility
136137**Bad practice**: Heavy gradients, no hover state, insufficient padding, tiny text
138139### Cards (Good Example)
140```jsx
141// Option 1: Clean borders
142<div className="
143 bg-white
144 border border-zinc-200
145 rounded-lg
146 p-6
147">
148 Card content
149</div>
150151// Option 2: Subtle shadow (not both!)
152<div className="
153 bg-white
154 shadow
155 rounded-lg
156 p-6
157">
158 Card content
159</div>
160```
161162**Key elements**:
163- Use borders OR shadows, not both
164- Adequate padding: `p-6` or `p-8`
165- Rounded corners: `rounded-lg` or `rounded-xl`
166- White or off-white background
167- Generous spacing between content
168169**Bad practice**: Both heavy borders AND heavy shadows, cramped content, no padding
170171### Forms (Good Example)
172```jsx
173<div className="space-y-4">
174 <div>
175 <label className="block text-sm font-medium text-zinc-900 mb-2">
176 Email
177 </label>
178 <input
179 type="email"
180 className="
181 w-full px-3 py-2
182 border border-zinc-300 rounded-md
183 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 focus:border-blue-500
184 disabled:bg-zinc-100 disabled:text-zinc-400
185 transition-colors
186 "
187 placeholder="you@example.com"
188 />
189 </div>
190191 <div>
192 <label className="block text-sm font-medium text-zinc-900 mb-2">
193 Password
194 </label>
195 <input
196 type="password"
197 className="
198 w-full px-3 py-2
199 border border-zinc-300 rounded-md
200 focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 focus:border-blue-500
201 "
202 />
203 {error && (
204 <p className="mt-2 text-sm text-red-600">
205 {error}
206 </p>
207 )}
208 </div>
209</div>
210```
211212**Key elements**:
213- Clear labels with proper contrast and spacing
214- Adequate input padding: `px-3 py-2` minimum
215- Focus states with ring for accessibility
216- Clear error states with proper color and spacing
217- Disabled states styled appropriately
218- Good spacing between fields (`space-y-4`)
219220**Bad practice**: No labels, cramped inputs, unclear error states, inconsistent spacing, missing focus indicators
221222### Navigation
223```jsx
224// Desktop navigation
225<nav className="flex items-center gap-6">
226 <a href="/" className="
227 text-zinc-600 hover:text-zinc-900
228 transition-colors
229 ">
230 Home
231 </a>
232 <a href="/about" className="
233 text-zinc-900 font-medium
234 ">
235 About
236 </a>
237</nav>
238239// Mobile navigation (hamburger menu)
240<nav className="flex flex-col gap-4 p-4">
241 <a href="/" className="
242 text-zinc-900 py-2
243 hover:text-zinc-600
244 ">
245 Home
246 </a>
247</nav>
248```
249250**Key elements**:
251- Clean, minimal design
252- Clear active state indication
253- Adequate spacing: `gap-4` or `gap-6`
254- Mobile: Hamburger menu for space efficiency
255- Smooth transitions on hover
256257## shadcn UI Integration
258259When using shadcn UI components:
260- Components already follow most of these principles
261- Customize the color scheme in `tailwind.config.js` to match your neutral palette
262- Adjust spacing if needed to align with 8px grid
263- Ensure your accent color is used consistently
264- Modify default shadows if they appear too heavy
265- Check that all interactive states are properly defined
266267## Quick Pre-Flight Checklist
268269Before considering any UI complete, verify:
270- [ ] Generous white space used throughout, not cluttered
271- [ ] Neutral grays with ONE accent color only
272- [ ] Spacing follows 8px grid (8, 16, 24, 32, 48, 64px)
273- [ ] Typography has clear hierarchy, minimum 16px body text
274- [ ] Maximum 2 fonts used
275- [ ] Shadows are subtle, not heavy
276- [ ] Rounded corners used thoughtfully, not on everything
277- [ ] All interactive elements have hover, active, disabled, and focus states
278- [ ] Mobile-responsive with mobile-first approach
279- [ ] No generic purple/blue gradients
280- [ ] No rainbow gradients
281- [ ] Text is readable (not too small, good contrast)
282- [ ] Spacing is consistent throughout
283- [ ] Cards use borders OR shadows, not both
284285## Common Mistakes to Avoid
286287### Color Mistakes
288- ❌ Pure white backgrounds (`bg-white` everywhere)
289- ✅ Use off-white (`bg-zinc-50`, `bg-gray-50`)
290- ❌ Too many colors, rainbow gradients
291- ✅ Grays + one accent color
292- ❌ Generic purple/blue gradients
293- ✅ Solid colors or very subtle gradients
294295### Spacing Mistakes
296- ❌ Inconsistent spacing (3px, 17px, 23px random values)
297- ✅ 8px grid system (8, 16, 24, 32, 48, 64px)
298- ❌ Cramped, cluttered layouts
299- ✅ Generous white space
300301### Typography Mistakes
302- ❌ Text smaller than 16px for body content
303- ✅ Minimum 16px (`text-base`) for body
304- ❌ Using 5+ different fonts
305- ✅ Maximum 2 fonts
306307### Shadow Mistakes
308- ❌ Heavy, dark drop shadows
309- ✅ Subtle shadows (`shadow-sm`, `shadow`)
310- ❌ Cards with both heavy borders AND heavy shadows
311- ✅ Borders OR shadows, not both
312313### Interactive State Mistakes
314- ❌ No hover effects on buttons
315- ✅ Clear hover, active, disabled, focus states
316- ❌ Missing focus indicators (accessibility issue)
317- ✅ Visible focus rings
318319### Mobile Mistakes
320- ❌ Desktop-only design that breaks on mobile
321- ✅ Mobile-first, responsive design
322- ❌ Tiny touch targets (<44px)
323- ✅ Minimum 44x44px touch targets
324325## Examples in Context
326327### Dashboard Card
328```jsx
329// Good example
330<div className="bg-white border border-zinc-200 rounded-lg p-6">
331 <h3 className="text-xl font-semibold text-zinc-900 mb-2">
332 Revenue
333 </h3>
334 <p className="text-3xl font-bold text-zinc-900">
335 $12,450
336 </p>
337 <p className="text-sm text-zinc-600 mt-2">
338 +12% from last month
339 </p>
340</div>
341```
342343### Feature Section
344```jsx
345// Good example with proper spacing
346<section className="py-16 px-4">
347 <div className="max-w-6xl mx-auto">
348 <h2 className="text-3xl font-bold text-zinc-900 mb-4">
349 Features
350 </h2>
351 <p className="text-base text-zinc-600 mb-12 max-w-2xl">
352 Everything you need to build modern applications
353 </p>
354355 <div className="grid md:grid-cols-3 gap-8">
356 {/* Feature cards with 8px grid spacing */}
357 </div>
358 </div>
359</section>
360```
361362## When to Apply This Skill
363364Apply these principles for:
365- Building new UI components in Next.js/React or Nuxt/Vue
366- Creating pages and layouts
367- Designing forms and inputs
368- Building navigation menus
369- Creating cards, buttons, and interactive elements
370- Setting up color schemes and typography
371- Implementing responsive designs
372- Working with Tailwind CSS and shadcn UI
373374Always reference these guidelines before starting any UI work and verify against the checklist before considering the work complete.
Run npx skillmds add majiayu000/design-guide-5 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Ensures modern, professional UI design by providing principles for spacing, typography, colors, shadows, and interactive states. Use when building any UI component or interface with Next.js/React, Nuxt/Vue, shadcn UI, or Tailwind CSS to ensure consistent, clean, minimal design. It is listed under Design & Media on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
majiayu000 (@majiayu000) published this skill. Their other Agent Skills are listed on their SkillMD profile.