oxycode-skills 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +143 -0
- package/index.js +17 -0
- package/package.json +49 -0
- package/skills/anti-slop/README.md +106 -0
- package/skills/anti-slop/SKILL.md +311 -0
- package/skills/anti-slop/examples/before-after.md +380 -0
- package/skills/anti-slop/references/quality-rubric.md +313 -0
- package/skills/anti-slop/references/slop-patterns.md +433 -0
- package/skills/component-architect/README.md +186 -0
- package/skills/component-architect/SKILL.md +644 -0
- package/skills/component-architect/examples/component-patterns.md +569 -0
- package/skills/component-architect/references/atomic-design.md +516 -0
- package/skills/design-audit/README.md +114 -0
- package/skills/design-audit/SKILL.md +305 -0
- package/skills/design-audit/examples/audit-report.md +424 -0
- package/skills/design-audit/references/scoring-rubric.md +498 -0
- package/skills/design-md/README.md +106 -0
- package/skills/design-md/SKILL.md +262 -0
- package/skills/design-md/examples/bad-design.md +195 -0
- package/skills/design-md/examples/good-design.md +250 -0
- package/skills/design-md/references/design-md-spec.md +267 -0
- package/skills/design-md/scripts/validate.sh +134 -0
- package/skills/ui-builder/README.md +169 -0
- package/skills/ui-builder/SKILL.md +357 -0
- package/skills/ui-builder/examples/dashboard.md +323 -0
- package/skills/ui-builder/examples/landing-page.md +396 -0
- package/skills/ui-builder/references/component-patterns.md +396 -0
- package/skills/ui-builder/references/layout-system.md +423 -0
- package/skills/ui-builder/references/polish-checklist.md +221 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# DESIGN.md Specification
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
DESIGN.md is an open-source format created by Google Labs Code for defining design systems in a human-readable, machine-parseable format.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
- Single source of truth for design decisions
|
|
10
|
+
- Enables AI tools to understand design systems
|
|
11
|
+
- Ensures consistency across projects
|
|
12
|
+
- Facilitates design-to-code workflows
|
|
13
|
+
|
|
14
|
+
## File Structure
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
# [Project Name] Design System
|
|
18
|
+
|
|
19
|
+
## Overview
|
|
20
|
+
Brief description of the design system purpose and scope.
|
|
21
|
+
|
|
22
|
+
## Colors
|
|
23
|
+
Color definitions organized by category.
|
|
24
|
+
|
|
25
|
+
## Typography
|
|
26
|
+
Font families, sizes, weights, and line heights.
|
|
27
|
+
|
|
28
|
+
## Spacing
|
|
29
|
+
Consistent spacing units.
|
|
30
|
+
|
|
31
|
+
## Borders
|
|
32
|
+
Border radius and width definitions.
|
|
33
|
+
|
|
34
|
+
## Shadows
|
|
35
|
+
Box shadow definitions.
|
|
36
|
+
|
|
37
|
+
## Breakpoints
|
|
38
|
+
Responsive breakpoint values.
|
|
39
|
+
|
|
40
|
+
## Components
|
|
41
|
+
Component-specific design tokens.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Required Sections
|
|
45
|
+
|
|
46
|
+
### 1. Overview
|
|
47
|
+
- Project name
|
|
48
|
+
- Design philosophy
|
|
49
|
+
- Target audience
|
|
50
|
+
- Platform(s)
|
|
51
|
+
|
|
52
|
+
### 2. Colors
|
|
53
|
+
Must include:
|
|
54
|
+
- Primary palette (50-900 shades)
|
|
55
|
+
- Neutral palette (50-900 shades)
|
|
56
|
+
- Semantic colors (success, warning, error, info)
|
|
57
|
+
- Background/foreground colors
|
|
58
|
+
|
|
59
|
+
Format:
|
|
60
|
+
```
|
|
61
|
+
- [name]: [hex value]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Typography
|
|
65
|
+
Must include:
|
|
66
|
+
- Font families (headings, body, mono)
|
|
67
|
+
- Type scale with sizes, line-heights, weights
|
|
68
|
+
- Font weight definitions
|
|
69
|
+
|
|
70
|
+
Format:
|
|
71
|
+
```
|
|
72
|
+
- [level]: [size] / [line-height] / [weight] weight
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 4. Spacing
|
|
76
|
+
Must include:
|
|
77
|
+
- Consistent unit system
|
|
78
|
+
- Named spacing values (xs, sm, md, lg, xl, etc.)
|
|
79
|
+
|
|
80
|
+
Format:
|
|
81
|
+
```
|
|
82
|
+
- [name]: [value]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### 5. Borders
|
|
86
|
+
Must include:
|
|
87
|
+
- Border radius values
|
|
88
|
+
- Border width values (optional)
|
|
89
|
+
|
|
90
|
+
### 6. Shadows
|
|
91
|
+
Must include:
|
|
92
|
+
- Box shadow definitions
|
|
93
|
+
- Organized by elevation level
|
|
94
|
+
|
|
95
|
+
### 7. Breakpoints
|
|
96
|
+
Must include:
|
|
97
|
+
- Mobile-first breakpoint values
|
|
98
|
+
- Standard breakpoints (sm, md, lg, xl, 2xl)
|
|
99
|
+
|
|
100
|
+
### 8. Components (Optional)
|
|
101
|
+
Component-specific tokens for:
|
|
102
|
+
- Buttons
|
|
103
|
+
- Cards
|
|
104
|
+
- Inputs
|
|
105
|
+
- Navigation
|
|
106
|
+
- etc.
|
|
107
|
+
|
|
108
|
+
## Validation Rules
|
|
109
|
+
|
|
110
|
+
### Colors
|
|
111
|
+
- Must be valid hex format (#RRGGBB or #RRGGBBAA)
|
|
112
|
+
- Must include enough shades for light/dark themes
|
|
113
|
+
|
|
114
|
+
### Typography
|
|
115
|
+
- Must specify font-family
|
|
116
|
+
- Must include size, line-height, and weight
|
|
117
|
+
- Should follow type scale ratio (1.25 or 1.333)
|
|
118
|
+
|
|
119
|
+
### Spacing
|
|
120
|
+
- Must use consistent unit (px, rem, or em)
|
|
121
|
+
- Should follow a scale (4, 8, 16, 24, 32, etc.)
|
|
122
|
+
|
|
123
|
+
### Breakpoints
|
|
124
|
+
- Must be in ascending order
|
|
125
|
+
- Must start with mobile-first (< 640px)
|
|
126
|
+
|
|
127
|
+
## Example: Minimal DESIGN.md
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# MyApp Design System
|
|
131
|
+
|
|
132
|
+
## Colors
|
|
133
|
+
- primary: #3b82f6
|
|
134
|
+
- background: #ffffff
|
|
135
|
+
- text: #111827
|
|
136
|
+
|
|
137
|
+
## Typography
|
|
138
|
+
- font-family: Inter, system-ui, sans-serif
|
|
139
|
+
- heading: 24px / 32px / 600 weight
|
|
140
|
+
- body: 16px / 24px / 400 weight
|
|
141
|
+
|
|
142
|
+
## Spacing
|
|
143
|
+
- sm: 8px
|
|
144
|
+
- md: 16px
|
|
145
|
+
- lg: 24px
|
|
146
|
+
|
|
147
|
+
## Breakpoints
|
|
148
|
+
- md: 768px
|
|
149
|
+
- lg: 1024px
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Example: Full DESIGN.md
|
|
153
|
+
|
|
154
|
+
```markdown
|
|
155
|
+
# Enterprise Dashboard Design System
|
|
156
|
+
|
|
157
|
+
## Overview
|
|
158
|
+
A comprehensive design system for enterprise analytics dashboards.
|
|
159
|
+
Designed for data-heavy interfaces with dark theme support.
|
|
160
|
+
|
|
161
|
+
## Colors
|
|
162
|
+
|
|
163
|
+
### Primary Palette
|
|
164
|
+
- primary-50: #eff6ff
|
|
165
|
+
- primary-100: #dbeafe
|
|
166
|
+
- primary-200: #bfdbfe
|
|
167
|
+
- primary-300: #93c5fd
|
|
168
|
+
- primary-400: #60a5fa
|
|
169
|
+
- primary-500: #3b82f6
|
|
170
|
+
- primary-600: #2563eb
|
|
171
|
+
- primary-700: #1d4ed8
|
|
172
|
+
- primary-800: #1e40af
|
|
173
|
+
- primary-900: #1e3a8a
|
|
174
|
+
|
|
175
|
+
### Neutral Palette
|
|
176
|
+
- neutral-50: #fafafa
|
|
177
|
+
- neutral-100: #f4f4f5
|
|
178
|
+
- neutral-200: #e4e4e7
|
|
179
|
+
- neutral-300: #d4d4d8
|
|
180
|
+
- neutral-400: #a1a1aa
|
|
181
|
+
- neutral-500: #71717a
|
|
182
|
+
- neutral-600: #52525b
|
|
183
|
+
- neutral-700: #3f3f46
|
|
184
|
+
- neutral-800: #27272a
|
|
185
|
+
- neutral-900: #18181b
|
|
186
|
+
|
|
187
|
+
### Semantic Colors
|
|
188
|
+
- success: #22c55e
|
|
189
|
+
- warning: #f59e0b
|
|
190
|
+
- error: #ef4444
|
|
191
|
+
- info: #3b82f6
|
|
192
|
+
|
|
193
|
+
## Typography
|
|
194
|
+
|
|
195
|
+
### Font Family
|
|
196
|
+
- Headings: Inter, system-ui, sans-serif
|
|
197
|
+
- Body: Inter, system-ui, sans-serif
|
|
198
|
+
- Mono: JetBrains Mono, monospace
|
|
199
|
+
|
|
200
|
+
### Type Scale
|
|
201
|
+
- display-lg: 36px / 40px / 700 weight
|
|
202
|
+
- display-md: 30px / 36px / 700 weight
|
|
203
|
+
- display-sm: 24px / 32px / 600 weight
|
|
204
|
+
- heading-lg: 20px / 28px / 600 weight
|
|
205
|
+
- heading-md: 16px / 24px / 600 weight
|
|
206
|
+
- heading-sm: 14px / 20px / 600 weight
|
|
207
|
+
- body-lg: 16px / 24px / 400 weight
|
|
208
|
+
- body-md: 14px / 20px / 400 weight
|
|
209
|
+
- body-sm: 12px / 16px / 400 weight
|
|
210
|
+
- code: 14px / 20px / 400 weight
|
|
211
|
+
|
|
212
|
+
## Spacing
|
|
213
|
+
- xs: 4px
|
|
214
|
+
- sm: 8px
|
|
215
|
+
- md: 16px
|
|
216
|
+
- lg: 24px
|
|
217
|
+
- xl: 32px
|
|
218
|
+
- 2xl: 48px
|
|
219
|
+
- 3xl: 64px
|
|
220
|
+
|
|
221
|
+
## Borders
|
|
222
|
+
- radius-sm: 4px
|
|
223
|
+
- radius-md: 8px
|
|
224
|
+
- radius-lg: 12px
|
|
225
|
+
- radius-xl: 16px
|
|
226
|
+
- radius-full: 9999px
|
|
227
|
+
|
|
228
|
+
## Shadows
|
|
229
|
+
- shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05)
|
|
230
|
+
- shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)
|
|
231
|
+
- shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)
|
|
232
|
+
- shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)
|
|
233
|
+
|
|
234
|
+
## Breakpoints
|
|
235
|
+
- sm: 640px
|
|
236
|
+
- md: 768px
|
|
237
|
+
- lg: 1024px
|
|
238
|
+
- xl: 1280px
|
|
239
|
+
- 2xl: 1536px
|
|
240
|
+
|
|
241
|
+
## Components
|
|
242
|
+
|
|
243
|
+
### Button
|
|
244
|
+
- Primary: primary-600 bg, white text, radius-md
|
|
245
|
+
- Secondary: neutral-100 bg, neutral-900 text, radius-md
|
|
246
|
+
- Ghost: transparent bg, neutral-600 text, radius-md
|
|
247
|
+
|
|
248
|
+
### Card
|
|
249
|
+
- Background: white
|
|
250
|
+
- Border: neutral-200
|
|
251
|
+
- Radius: lg
|
|
252
|
+
- Shadow: md
|
|
253
|
+
- Padding: lg
|
|
254
|
+
|
|
255
|
+
### Input
|
|
256
|
+
- Background: white
|
|
257
|
+
- Border: neutral-300
|
|
258
|
+
- Focus border: primary-500
|
|
259
|
+
- Radius: md
|
|
260
|
+
- Padding: sm md
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Resources
|
|
264
|
+
|
|
265
|
+
- [GitHub: google-labs-code/design.md](https://github.com/google-labs-code/design.md)
|
|
266
|
+
- [Stitch by Google](https://stitch.withgoogle.com)
|
|
267
|
+
- [Tailwind CSS](https://tailwindcss.com)
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# DESIGN.md Validator
|
|
4
|
+
# Checks if a DESIGN.md file follows the specification
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
# Colors for output
|
|
9
|
+
RED='\033[0;31m'
|
|
10
|
+
GREEN='\033[0;32m'
|
|
11
|
+
YELLOW='\033[1;33m'
|
|
12
|
+
NC='\033[0m' # No Color
|
|
13
|
+
|
|
14
|
+
# Default file
|
|
15
|
+
FILE="${1:-DESIGN.md}"
|
|
16
|
+
|
|
17
|
+
echo "🔍 Validating $FILE..."
|
|
18
|
+
echo ""
|
|
19
|
+
|
|
20
|
+
# Check if file exists
|
|
21
|
+
if [ ! -f "$FILE" ]; then
|
|
22
|
+
echo -e "${RED}❌ Error: $FILE not found${NC}"
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
# Initialize counters
|
|
27
|
+
ERRORS=0
|
|
28
|
+
WARNINGS=0
|
|
29
|
+
|
|
30
|
+
# Check required sections
|
|
31
|
+
check_section() {
|
|
32
|
+
local section="$1"
|
|
33
|
+
if grep -qi "## $section" "$FILE"; then
|
|
34
|
+
echo -e "${GREEN}✅ Found: $section${NC}"
|
|
35
|
+
else
|
|
36
|
+
echo -e "${RED}❌ Missing: $section${NC}"
|
|
37
|
+
((ERRORS++))
|
|
38
|
+
fi
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
# Check for color format
|
|
42
|
+
check_colors() {
|
|
43
|
+
echo ""
|
|
44
|
+
echo "Checking color formats..."
|
|
45
|
+
|
|
46
|
+
# Check for valid hex colors
|
|
47
|
+
if grep -qE '#[0-9A-Fa-f]{6}' "$FILE"; then
|
|
48
|
+
echo -e "${GREEN}✅ Valid hex colors found${NC}"
|
|
49
|
+
else
|
|
50
|
+
echo -e "${YELLOW}⚠️ No hex colors found (may be using other format)${NC}"
|
|
51
|
+
((WARNINGS++))
|
|
52
|
+
fi
|
|
53
|
+
|
|
54
|
+
# Check for invalid color formats
|
|
55
|
+
if grep -qE 'rgb\(' "$FILE"; then
|
|
56
|
+
echo -e "${YELLOW}⚠️ RGB format detected (hex recommended)${NC}"
|
|
57
|
+
((WARNINGS++))
|
|
58
|
+
fi
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
# Check for typography
|
|
62
|
+
check_typography() {
|
|
63
|
+
echo ""
|
|
64
|
+
echo "Checking typography..."
|
|
65
|
+
|
|
66
|
+
if grep -qi "font-family" "$FILE"; then
|
|
67
|
+
echo -e "${GREEN}✅ Font family defined${NC}"
|
|
68
|
+
else
|
|
69
|
+
echo -e "${YELLOW}⚠️ No font family defined${NC}"
|
|
70
|
+
((WARNINGS++))
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
if grep -qiE "(px|rem|em)" "$FILE"; then
|
|
74
|
+
echo -e "${GREEN}✅ Font sizes with units found${NC}"
|
|
75
|
+
else
|
|
76
|
+
echo -e "${YELLOW}⚠️ No font sizes with units found${NC}"
|
|
77
|
+
((WARNINGS++))
|
|
78
|
+
fi
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Check for spacing
|
|
82
|
+
check_spacing() {
|
|
83
|
+
echo ""
|
|
84
|
+
echo "Checking spacing..."
|
|
85
|
+
|
|
86
|
+
if grep -qiE "(xs|sm|md|lg|xl)" "$FILE"; then
|
|
87
|
+
echo -e "${GREEN}✅ Spacing scale found${NC}"
|
|
88
|
+
else
|
|
89
|
+
echo -e "${YELLOW}⚠️ No spacing scale found${NC}"
|
|
90
|
+
((WARNINGS++))
|
|
91
|
+
fi
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
# Check for breakpoints
|
|
95
|
+
check_breakpoints() {
|
|
96
|
+
echo ""
|
|
97
|
+
echo "Checking breakpoints..."
|
|
98
|
+
|
|
99
|
+
if grep -qiE "(sm|md|lg|xl)" "$FILE"; then
|
|
100
|
+
echo -e "${GREEN}✅ Breakpoints found${NC}"
|
|
101
|
+
else
|
|
102
|
+
echo -e "${YELLOW}⚠️ No breakpoints found${NC}"
|
|
103
|
+
((WARNINGS++))
|
|
104
|
+
fi
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# Run checks
|
|
108
|
+
echo "📋 Checking required sections..."
|
|
109
|
+
check_section "Colors"
|
|
110
|
+
check_section "Typography"
|
|
111
|
+
check_section "Spacing"
|
|
112
|
+
check_section "Breakpoints"
|
|
113
|
+
|
|
114
|
+
check_colors
|
|
115
|
+
check_typography
|
|
116
|
+
check_spacing
|
|
117
|
+
check_breakpoints
|
|
118
|
+
|
|
119
|
+
# Summary
|
|
120
|
+
echo ""
|
|
121
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
122
|
+
echo "📊 Validation Summary"
|
|
123
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
124
|
+
|
|
125
|
+
if [ $ERRORS -eq 0 ] && [ $WARNINGS -eq 0 ]; then
|
|
126
|
+
echo -e "${GREEN}✅ Perfect! No errors or warnings.${NC}"
|
|
127
|
+
exit 0
|
|
128
|
+
elif [ $ERRORS -eq 0 ]; then
|
|
129
|
+
echo -e "${YELLOW}⚠️ $WARNINGS warning(s) found.${NC}"
|
|
130
|
+
exit 0
|
|
131
|
+
else
|
|
132
|
+
echo -e "${RED}❌ $ERRORS error(s) and $WARNINGS warning(s) found.${NC}"
|
|
133
|
+
exit 1
|
|
134
|
+
fi
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# ui-builder Skill
|
|
2
|
+
|
|
3
|
+
> Generate production-ready UI components and pages from text prompts. Creates Vercel-quality React/TypeScript code with Tailwind CSS.
|
|
4
|
+
|
|
5
|
+
## What Does This Skill Do?
|
|
6
|
+
|
|
7
|
+
The `ui-builder` skill teaches AI coding agents to:
|
|
8
|
+
1. **Generate** UI components from text descriptions
|
|
9
|
+
2. **Create** full pages (dashboards, landing pages, etc.)
|
|
10
|
+
3. **Apply** design tokens from DESIGN.md files
|
|
11
|
+
4. **Ensure** Vercel-quality output (no AI slop)
|
|
12
|
+
|
|
13
|
+
## Why Use This Skill?
|
|
14
|
+
|
|
15
|
+
Most AI-generated UI looks bad:
|
|
16
|
+
- Purple/blue gradients everywhere
|
|
17
|
+
- Centered everything
|
|
18
|
+
- Rainbow colors
|
|
19
|
+
- Oversized border radius
|
|
20
|
+
- Generic Inter font
|
|
21
|
+
|
|
22
|
+
This skill teaches AI to generate clean, modern UI like Vercel, Linear, or Stripe.
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### Generate a Component
|
|
27
|
+
```bash
|
|
28
|
+
/ui-builder "Create a stats card with title, value, and percentage change"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Generate a Page
|
|
32
|
+
```bash
|
|
33
|
+
/ui-builder "Build a SaaS landing page with hero, features, pricing, and testimonials"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Generate with Design System
|
|
37
|
+
```bash
|
|
38
|
+
/ui-builder "Create a dashboard using the design tokens from DESIGN.md"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Features
|
|
42
|
+
|
|
43
|
+
- ✅ React/TypeScript output
|
|
44
|
+
- ✅ Tailwind CSS styling
|
|
45
|
+
- ✅ Responsive design
|
|
46
|
+
- ✅ Accessibility attributes
|
|
47
|
+
- ✅ Design token support
|
|
48
|
+
- ✅ No AI slop patterns
|
|
49
|
+
- ✅ Production-ready code
|
|
50
|
+
|
|
51
|
+
## File Structure
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
skills/ui-builder/
|
|
55
|
+
├── SKILL.md # Main skill instructions
|
|
56
|
+
├── README.md # This file
|
|
57
|
+
├── references/
|
|
58
|
+
│ ├── component-patterns.md # Reusable component patterns
|
|
59
|
+
│ ├── layout-system.md # Grid and flexbox patterns
|
|
60
|
+
│ └── polish-checklist.md # Quality checklist
|
|
61
|
+
├── examples/
|
|
62
|
+
│ ├── landing-page.md # Landing page example
|
|
63
|
+
│ └── dashboard.md # Dashboard example
|
|
64
|
+
└── templates/
|
|
65
|
+
└── starter-components/ # Starter templates
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Component Patterns
|
|
69
|
+
|
|
70
|
+
### Card
|
|
71
|
+
```tsx
|
|
72
|
+
<div className="bg-white border border-zinc-200 rounded-lg p-6 shadow-sm">
|
|
73
|
+
{children}
|
|
74
|
+
</div>
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Button
|
|
78
|
+
```tsx
|
|
79
|
+
<button className="px-4 py-2 text-sm font-medium text-white bg-zinc-900 rounded-lg hover:bg-zinc-800 transition-colors">
|
|
80
|
+
Click me
|
|
81
|
+
</button>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Input
|
|
85
|
+
```tsx
|
|
86
|
+
<input
|
|
87
|
+
type="text"
|
|
88
|
+
className="w-full px-3 py-2 text-sm border border-zinc-300 rounded-lg focus:ring-2 focus:ring-zinc-500 focus:border-transparent"
|
|
89
|
+
placeholder="Enter text..."
|
|
90
|
+
/>
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Layout Patterns
|
|
94
|
+
|
|
95
|
+
### Dashboard
|
|
96
|
+
```tsx
|
|
97
|
+
<div className="flex h-screen">
|
|
98
|
+
<aside className="w-64 border-r border-zinc-200">Sidebar</aside>
|
|
99
|
+
<main className="flex-1 p-6">Content</main>
|
|
100
|
+
</div>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Landing Page
|
|
104
|
+
```tsx
|
|
105
|
+
<div className="min-h-screen">
|
|
106
|
+
<nav>Navigation</nav>
|
|
107
|
+
<section>Hero</section>
|
|
108
|
+
<section>Features</section>
|
|
109
|
+
<footer>Footer</footer>
|
|
110
|
+
</div>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Anti-Patterns to Avoid
|
|
114
|
+
|
|
115
|
+
### ❌ Don't Use Gradients
|
|
116
|
+
```tsx
|
|
117
|
+
// BAD
|
|
118
|
+
<div className="bg-gradient-to-br from-purple-500 to-blue-500">
|
|
119
|
+
|
|
120
|
+
// GOOD
|
|
121
|
+
<div className="bg-zinc-900">
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### ❌ Don't Center Everything
|
|
125
|
+
```tsx
|
|
126
|
+
// BAD
|
|
127
|
+
<div className="text-center">
|
|
128
|
+
|
|
129
|
+
// GOOD (when appropriate)
|
|
130
|
+
<div className="text-left">
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### ❌ Don't Use Rainbow Colors
|
|
134
|
+
```tsx
|
|
135
|
+
// BAD
|
|
136
|
+
<div className="text-red-500 text-blue-500 text-green-500">
|
|
137
|
+
|
|
138
|
+
// GOOD
|
|
139
|
+
<div className="text-zinc-100">
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Examples
|
|
143
|
+
|
|
144
|
+
See [examples/landing-page.md](examples/landing-page.md) for a complete landing page example.
|
|
145
|
+
|
|
146
|
+
See [examples/dashboard.md](examples/dashboard.md) for a complete dashboard example.
|
|
147
|
+
|
|
148
|
+
## Validation Checklist
|
|
149
|
+
|
|
150
|
+
Before delivering UI code, verify:
|
|
151
|
+
- [ ] Uses design tokens (no hardcoded values)
|
|
152
|
+
- [ ] Semantic HTML elements
|
|
153
|
+
- [ ] Accessibility attributes
|
|
154
|
+
- [ ] Responsive design
|
|
155
|
+
- [ ] TypeScript types
|
|
156
|
+
- [ ] No anti-patterns
|
|
157
|
+
- [ ] Consistent spacing
|
|
158
|
+
- [ ] Proper color hierarchy
|
|
159
|
+
|
|
160
|
+
## Resources
|
|
161
|
+
|
|
162
|
+
- [Vercel Design System](https://vercel.com/design)
|
|
163
|
+
- [shadcn/ui](https://ui.shadcn.com/)
|
|
164
|
+
- [Tailwind CSS](https://tailwindcss.com)
|
|
165
|
+
- [DESIGN.md Spec](https://github.com/google-labs-code/design.md)
|
|
166
|
+
|
|
167
|
+
## Contributing
|
|
168
|
+
|
|
169
|
+
See [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines.
|