@kood/claude-code 0.1.6 → 0.1.9

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.
Files changed (107) hide show
  1. package/dist/index.js +109 -216
  2. package/package.json +8 -2
  3. package/templates/hono/CLAUDE.md +59 -328
  4. package/templates/hono/docs/architecture/architecture.md +93 -747
  5. package/templates/hono/docs/deployment/cloudflare.md +59 -513
  6. package/templates/hono/docs/deployment/docker.md +41 -356
  7. package/templates/hono/docs/deployment/index.md +54 -190
  8. package/templates/hono/docs/deployment/railway.md +36 -306
  9. package/templates/hono/docs/deployment/vercel.md +49 -434
  10. package/templates/hono/docs/library/ai-sdk/index.md +53 -290
  11. package/templates/hono/docs/library/ai-sdk/openrouter.md +19 -387
  12. package/templates/hono/docs/library/ai-sdk/providers.md +28 -394
  13. package/templates/hono/docs/library/ai-sdk/streaming.md +52 -353
  14. package/templates/hono/docs/library/ai-sdk/structured-output.md +63 -395
  15. package/templates/hono/docs/library/ai-sdk/tools.md +62 -431
  16. package/templates/hono/docs/library/hono/env-setup.md +24 -313
  17. package/templates/hono/docs/library/hono/error-handling.md +34 -295
  18. package/templates/hono/docs/library/hono/index.md +29 -121
  19. package/templates/hono/docs/library/hono/middleware.md +21 -188
  20. package/templates/hono/docs/library/hono/rpc.md +40 -341
  21. package/templates/hono/docs/library/hono/validation.md +35 -195
  22. package/templates/hono/docs/library/pino/index.md +42 -333
  23. package/templates/hono/docs/library/prisma/cloudflare-d1.md +64 -367
  24. package/templates/hono/docs/library/prisma/config.md +19 -260
  25. package/templates/hono/docs/library/prisma/index.md +67 -320
  26. package/templates/hono/docs/library/zod/index.md +53 -257
  27. package/templates/npx/CLAUDE.md +62 -274
  28. package/templates/npx/docs/references/patterns.md +160 -0
  29. package/templates/tanstack-start/CLAUDE.md +100 -256
  30. package/templates/tanstack-start/docs/architecture/architecture.md +44 -589
  31. package/templates/tanstack-start/docs/deployment/cloudflare.md +37 -424
  32. package/templates/tanstack-start/docs/deployment/index.md +57 -286
  33. package/templates/tanstack-start/docs/deployment/nitro.md +36 -318
  34. package/templates/tanstack-start/docs/deployment/railway.md +40 -409
  35. package/templates/tanstack-start/docs/deployment/vercel.md +43 -465
  36. package/templates/tanstack-start/docs/design/components.md +77 -311
  37. package/templates/tanstack-start/docs/design/index.md +113 -69
  38. package/templates/tanstack-start/docs/design/safe-area.md +51 -250
  39. package/templates/tanstack-start/docs/design/tailwind-setup.md +45 -359
  40. package/templates/tanstack-start/docs/guides/conventions.md +103 -0
  41. package/templates/tanstack-start/docs/guides/env-setup.md +34 -340
  42. package/templates/tanstack-start/docs/guides/getting-started.md +22 -209
  43. package/templates/tanstack-start/docs/guides/hooks.md +166 -0
  44. package/templates/tanstack-start/docs/guides/routes.md +166 -0
  45. package/templates/tanstack-start/docs/guides/services.md +143 -0
  46. package/templates/tanstack-start/docs/library/better-auth/2fa.md +27 -115
  47. package/templates/tanstack-start/docs/library/better-auth/advanced.md +22 -105
  48. package/templates/tanstack-start/docs/library/better-auth/index.md +17 -66
  49. package/templates/tanstack-start/docs/library/better-auth/plugins.md +11 -88
  50. package/templates/tanstack-start/docs/library/better-auth/session.md +12 -92
  51. package/templates/tanstack-start/docs/library/better-auth/setup.md +9 -91
  52. package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +30 -358
  53. package/templates/tanstack-start/docs/library/prisma/config.md +27 -327
  54. package/templates/tanstack-start/docs/library/prisma/crud.md +46 -174
  55. package/templates/tanstack-start/docs/library/prisma/index.md +23 -113
  56. package/templates/tanstack-start/docs/library/prisma/relations.md +31 -153
  57. package/templates/tanstack-start/docs/library/prisma/schema.md +40 -217
  58. package/templates/tanstack-start/docs/library/prisma/setup.md +12 -112
  59. package/templates/tanstack-start/docs/library/prisma/transactions.md +20 -110
  60. package/templates/tanstack-start/docs/library/tanstack-query/index.md +26 -97
  61. package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +28 -107
  62. package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +44 -146
  63. package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +33 -127
  64. package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +49 -149
  65. package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +19 -112
  66. package/templates/tanstack-start/docs/library/tanstack-start/index.md +33 -80
  67. package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +28 -106
  68. package/templates/tanstack-start/docs/library/tanstack-start/routing.md +21 -118
  69. package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +34 -246
  70. package/templates/tanstack-start/docs/library/tanstack-start/setup.md +6 -39
  71. package/templates/tanstack-start/docs/library/zod/complex-types.md +32 -156
  72. package/templates/tanstack-start/docs/library/zod/index.md +31 -144
  73. package/templates/tanstack-start/docs/library/zod/transforms.md +20 -129
  74. package/templates/tanstack-start/docs/library/zod/validation.md +39 -155
  75. package/templates/hono/docs/commands/git.md +0 -145
  76. package/templates/hono/docs/mcp/context7.md +0 -106
  77. package/templates/hono/docs/mcp/index.md +0 -176
  78. package/templates/hono/docs/mcp/sequential-thinking.md +0 -101
  79. package/templates/hono/docs/mcp/serena.md +0 -269
  80. package/templates/hono/docs/mcp/sgrep.md +0 -105
  81. package/templates/hono/docs/skills/gemini-review/SKILL.md +0 -220
  82. package/templates/hono/docs/skills/gemini-review/references/checklists.md +0 -136
  83. package/templates/hono/docs/skills/gemini-review/references/prompt-templates.md +0 -303
  84. package/templates/npx/docs/commands/git.md +0 -145
  85. package/templates/npx/docs/mcp/index.md +0 -60
  86. package/templates/npx/docs/skills/gemini-review/SKILL.md +0 -220
  87. package/templates/npx/docs/skills/gemini-review/references/checklists.md +0 -134
  88. package/templates/npx/docs/skills/gemini-review/references/prompt-templates.md +0 -301
  89. package/templates/tanstack-start/docs/commands/git.md +0 -145
  90. package/templates/tanstack-start/docs/design/accessibility.md +0 -433
  91. package/templates/tanstack-start/docs/design/color.md +0 -235
  92. package/templates/tanstack-start/docs/design/spacing.md +0 -341
  93. package/templates/tanstack-start/docs/design/typography.md +0 -324
  94. package/templates/tanstack-start/docs/guides/best-practices.md +0 -950
  95. package/templates/tanstack-start/docs/guides/husky-lint-staged.md +0 -303
  96. package/templates/tanstack-start/docs/guides/prettier.md +0 -189
  97. package/templates/tanstack-start/docs/guides/project-templates.md +0 -710
  98. package/templates/tanstack-start/docs/library/tanstack-query/setup.md +0 -107
  99. package/templates/tanstack-start/docs/library/zod/basic-types.md +0 -186
  100. package/templates/tanstack-start/docs/mcp/context7.md +0 -204
  101. package/templates/tanstack-start/docs/mcp/index.md +0 -177
  102. package/templates/tanstack-start/docs/mcp/sequential-thinking.md +0 -180
  103. package/templates/tanstack-start/docs/mcp/serena.md +0 -269
  104. package/templates/tanstack-start/docs/mcp/sgrep.md +0 -174
  105. package/templates/tanstack-start/docs/skills/gemini-review/SKILL.md +0 -220
  106. package/templates/tanstack-start/docs/skills/gemini-review/references/checklists.md +0 -144
  107. package/templates/tanstack-start/docs/skills/gemini-review/references/prompt-templates.md +0 -292
@@ -1,235 +0,0 @@
1
- # 색상 시스템
2
-
3
- > **상위 문서**: [UI/UX 디자인 가이드](./index.md)
4
-
5
- 색상은 UI에서 가장 강력한 시각적 요소입니다. 일관된 색상 사용은 브랜드 인지도를 높이고 사용자 경험을 개선합니다.
6
-
7
- ## 60-30-10 규칙
8
-
9
- 디자이너들이 가장 많이 사용하는 색상 배분 규칙입니다.
10
-
11
- ```
12
- ┌─────────────────────────────────────────────────┐
13
- │ │
14
- │ 60% 기본색 (Primary) │
15
- │ 배경, 여백, 기본 영역 │
16
- │ │
17
- ├───────────────────────────────────┬─────────────┤
18
- │ │ │
19
- │ 30% 보조색 (Secondary) │ 10% │
20
- │ 카드, 섹션, 구분 영역 │ 강조색 │
21
- │ │ (Accent) │
22
- │ │ 버튼, │
23
- │ │ 링크, │
24
- │ │ CTA │
25
- └───────────────────────────────────┴─────────────┘
26
- ```
27
-
28
- ### 실제 적용 예시
29
-
30
- ```tsx
31
- // 60% - 배경
32
- <div className="bg-white"> {/* 흰색 배경 */}
33
-
34
- // 30% - 보조 영역
35
- <section className="bg-gray-50"> {/* 밝은 회색 섹션 */}
36
- <div className="bg-white"> {/* 카드 배경 */}
37
-
38
- // 10% - 강조
39
- <button className="bg-blue-600"> {/* 주요 버튼 */}
40
- 시작하기
41
- </button>
42
- </div>
43
- </section>
44
- </div>
45
- ```
46
-
47
- ## 색상 팔레트 구성
48
-
49
- ### 1. 기본 색상 (Neutral Colors)
50
-
51
- 배경, 텍스트, 테두리에 사용하는 중립적인 색상입니다.
52
-
53
- ```
54
- White #FFFFFF bg-white 가장 밝은 배경
55
- Gray 50 #F9FAFB bg-gray-50 섹션 배경
56
- Gray 100 #F3F4F6 bg-gray-100 카드 배경, hover
57
- Gray 200 #E5E7EB bg-gray-200 테두리, 구분선
58
- Gray 300 #D1D5DB bg-gray-300 비활성 테두리
59
- Gray 400 #9CA3AF text-gray-400 비활성 텍스트
60
- Gray 500 #6B7280 text-gray-500 보조 텍스트
61
- Gray 600 #4B5563 text-gray-600 부제목
62
- Gray 700 #374151 text-gray-700 본문
63
- Gray 800 #1F2937 text-gray-800 제목
64
- Gray 900 #111827 text-gray-900 강조 텍스트
65
- ```
66
-
67
- ### 2. 브랜드 색상 (Brand Colors)
68
-
69
- 서비스를 대표하는 주요 색상입니다. **1-2가지**만 선택하세요.
70
-
71
- ```tsx
72
- // 예시: 파란색 브랜드
73
- const brandColors = {
74
- primary: {
75
- 50: '#EFF6FF', // 매우 밝은 배경
76
- 100: '#DBEAFE', // 밝은 배경
77
- 200: '#BFDBFE', // hover 배경
78
- 300: '#93C5FD', // 테두리
79
- 400: '#60A5FA', // 비활성 버튼
80
- 500: '#3B82F6', // 기본 버튼
81
- 600: '#2563EB', // hover 버튼
82
- 700: '#1D4ED8', // active 버튼
83
- 800: '#1E40AF', // 어두운 버튼
84
- 900: '#1E3A8A', // 매우 어두운
85
- }
86
- }
87
- ```
88
-
89
- ### 3. 의미론적 색상 (Semantic Colors)
90
-
91
- 특정 의미를 가진 색상입니다. **절대 다른 용도로 사용하지 마세요.**
92
-
93
- | 색상 | 의미 | 사용처 | Tailwind |
94
- |------|------|--------|----------|
95
- | 🟢 Green | 성공, 완료 | 성공 메시지, 체크 | `text-green-600` |
96
- | 🔴 Red | 오류, 위험 | 에러 메시지, 삭제 | `text-red-600` |
97
- | 🟡 Yellow | 경고, 주의 | 경고 메시지 | `text-yellow-600` |
98
- | 🔵 Blue | 정보, 안내 | 안내 메시지, 링크 | `text-blue-600` |
99
-
100
- ```tsx
101
- // ✅ 올바른 사용
102
- <span className="text-green-600">저장되었습니다</span>
103
- <span className="text-red-600">필수 항목입니다</span>
104
-
105
- // ❌ 잘못된 사용 - 빨간색을 장식용으로
106
- <span className="text-red-600">새로운 기능!</span>
107
- ```
108
-
109
- ## 색상 대비 (Contrast)
110
-
111
- ### WCAG 접근성 기준
112
-
113
- 텍스트가 잘 읽히려면 배경과 충분한 대비가 필요합니다.
114
-
115
- | 기준 | 최소 대비 | 적용 대상 |
116
- |------|----------|----------|
117
- | AA (일반) | 4.5:1 | 일반 텍스트 (16px 미만) |
118
- | AA (큰 텍스트) | 3:1 | 큰 텍스트 (18px 이상) |
119
- | AAA (강화) | 7:1 | 최고 수준 접근성 |
120
-
121
- ### 안전한 조합
122
-
123
- ```tsx
124
- // ✅ 좋은 대비 (흰 배경)
125
- <p className="text-gray-900">진한 텍스트 - 대비 15.8:1</p>
126
- <p className="text-gray-700">본문 텍스트 - 대비 8.6:1</p>
127
- <p className="text-gray-600">보조 텍스트 - 대비 5.7:1</p>
128
-
129
- // ⚠️ 주의 필요
130
- <p className="text-gray-500">밝은 텍스트 - 대비 4.6:1 (경계)</p>
131
-
132
- // ❌ 피해야 함
133
- <p className="text-gray-400">너무 밝음 - 대비 3.0:1</p>
134
- ```
135
-
136
- ### 버튼 색상 대비
137
-
138
- ```tsx
139
- // ✅ 좋은 버튼 대비
140
- <button className="bg-blue-600 text-white"> {/* 흰색 on 파란색 */}
141
- <button className="bg-gray-900 text-white"> {/* 흰색 on 검정색 */}
142
- <button className="bg-white text-gray-900 border"> {/* 검정색 on 흰색 */}
143
-
144
- // ❌ 나쁜 버튼 대비
145
- <button className="bg-yellow-300 text-white"> {/* 대비 부족 */}
146
- <button className="bg-gray-200 text-gray-400"> {/* 대비 부족 */}
147
- ```
148
-
149
- ## 다크 모드
150
-
151
- 다크 모드는 선택이 아닌 필수가 되어가고 있습니다.
152
-
153
- ### 색상 반전 원칙
154
-
155
- ```
156
- 라이트 모드 다크 모드
157
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
158
- bg-white ←→ bg-gray-900
159
- bg-gray-50 ←→ bg-gray-800
160
- bg-gray-100 ←→ bg-gray-700
161
- text-gray-900 ←→ text-white
162
- text-gray-700 ←→ text-gray-200
163
- text-gray-500 ←→ text-gray-400
164
- ```
165
-
166
- ### Tailwind 다크 모드 적용
167
-
168
- ```tsx
169
- // 기본 패턴
170
- <div className="bg-white dark:bg-gray-900">
171
- <h1 className="text-gray-900 dark:text-white">제목</h1>
172
- <p className="text-gray-600 dark:text-gray-300">본문</p>
173
- </div>
174
-
175
- // 카드 컴포넌트
176
- <div className="bg-white dark:bg-gray-800
177
- border border-gray-200 dark:border-gray-700
178
- shadow-sm">
179
- <h3 className="text-gray-900 dark:text-white">카드 제목</h3>
180
- </div>
181
- ```
182
-
183
- ## 색상 사용 체크리스트
184
-
185
- ### 반드시 지켜야 할 것
186
-
187
- - [ ] 브랜드 색상은 1-2가지만 사용
188
- - [ ] 의미론적 색상(빨강, 초록 등)은 해당 의미로만 사용
189
- - [ ] 텍스트-배경 대비 4.5:1 이상 유지
190
- - [ ] 색상만으로 정보 전달하지 않기 (아이콘/텍스트 병행)
191
-
192
- ### 권장 사항
193
-
194
- - [ ] 60-30-10 규칙 따르기
195
- - [ ] 다크 모드 지원
196
- - [ ] 색상 변수(토큰) 사용
197
- - [ ] 일관된 색상 네이밍
198
-
199
- ## Tailwind 설정
200
-
201
- ```css
202
- /* src/styles/app.css */
203
- @import "tailwindcss";
204
-
205
- @theme {
206
- /* 브랜드 색상 */
207
- --color-primary-50: oklch(0.97 0.01 250);
208
- --color-primary-100: oklch(0.93 0.03 250);
209
- --color-primary-500: oklch(0.55 0.2 250);
210
- --color-primary-600: oklch(0.48 0.22 250);
211
- --color-primary-700: oklch(0.42 0.2 250);
212
-
213
- /* 의미론적 색상 */
214
- --color-success: oklch(0.55 0.15 145);
215
- --color-error: oklch(0.55 0.2 25);
216
- --color-warning: oklch(0.75 0.15 85);
217
- --color-info: oklch(0.55 0.2 250);
218
- }
219
- ```
220
-
221
- ```tsx
222
- // 사용 예시
223
- <button className="bg-primary-600 hover:bg-primary-700">
224
- 주요 버튼
225
- </button>
226
-
227
- <span className="text-success">성공!</span>
228
- <span className="text-error">오류 발생</span>
229
- ```
230
-
231
- ## 참고 자료
232
-
233
- - [Tailwind CSS Colors](https://tailwindcss.com/docs/colors)
234
- - [WCAG Color Contrast](https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html)
235
- - [Coolors - 색상 팔레트 생성](https://coolors.co/)
@@ -1,341 +0,0 @@
1
- # 간격과 레이아웃
2
-
3
- > **상위 문서**: [UI/UX 디자인 가이드](./index.md)
4
-
5
- 간격(Spacing)은 요소들 사이의 여백을 말합니다. 적절한 간격은 콘텐츠를 읽기 쉽게 만들고 시각적 계층을 형성합니다.
6
-
7
- ## 왜 간격이 중요한가?
8
-
9
- ### 간격 없는 디자인 vs 적절한 간격
10
-
11
- ```
12
- ❌ 간격 없음 ✅ 적절한 간격
13
- ┌──────────────────┐ ┌──────────────────┐
14
- │제목본문텍스트버튼│ │ │
15
- │모든것이붙어있음 │ │ 제목 │
16
- │읽기가어려움 │ │ │
17
- └──────────────────┘ │ 본문 텍스트 │
18
- │ │
19
- │ [ 버튼 ] │
20
- │ │
21
- └──────────────────┘
22
- ```
23
-
24
- ## 8px 그리드 시스템
25
-
26
- ### 왜 8px인가?
27
-
28
- - 대부분의 화면 해상도에서 깔끔하게 나눠짐
29
- - 계산이 쉬움 (8, 16, 24, 32...)
30
- - 반응형 디자인에 유리
31
-
32
- ### Tailwind 간격 스케일
33
-
34
- ```css
35
- /* 기본 단위: 1 = 0.25rem = 4px */
36
-
37
- /* 주로 사용하는 간격 */
38
- 1 → 4px (0.25rem) 아주 작은 간격
39
- 2 → 8px (0.5rem) 작은 간격
40
- 3 → 12px (0.75rem)
41
- 4 → 16px (1rem) 기본 간격
42
- 5 → 20px (1.25rem)
43
- 6 → 24px (1.5rem) 중간 간격
44
- 8 → 32px (2rem) 큰 간격
45
- 10 → 40px (2.5rem)
46
- 12 → 48px (3rem) 섹션 간격
47
- 16 → 64px (4rem) 페이지 섹션
48
- 20 → 80px (5rem)
49
- 24 → 96px (6rem) 대형 섹션
50
- ```
51
-
52
- ### 간격 사용 가이드
53
-
54
- | 용도 | 간격 | Tailwind | 실제 크기 |
55
- |------|------|----------|----------|
56
- | 아이콘-텍스트 | xs | `gap-1` | 4px |
57
- | 인라인 요소 | sm | `gap-2` | 8px |
58
- | 폼 필드 내부 | md | `p-3` | 12px |
59
- | 카드 내부 | lg | `p-4` | 16px |
60
- | 카드 간격 | xl | `gap-6` | 24px |
61
- | 섹션 내부 | 2xl | `py-8` | 32px |
62
- | 섹션 간격 | 3xl | `py-12` | 48px |
63
- | 페이지 섹션 | 4xl | `py-16` | 64px |
64
-
65
- ## 간격 유형
66
-
67
- ### 1. Padding (내부 여백)
68
-
69
- 요소 안쪽의 여백입니다.
70
-
71
- ```tsx
72
- // 전체 방향
73
- <div className="p-4">16px 전체</div>
74
-
75
- // 개별 방향
76
- <div className="pt-4">위 16px</div>
77
- <div className="pr-4">오른쪽 16px</div>
78
- <div className="pb-4">아래 16px</div>
79
- <div className="pl-4">왼쪽 16px</div>
80
-
81
- // 축 방향
82
- <div className="px-4">좌우 16px</div>
83
- <div className="py-4">상하 16px</div>
84
- ```
85
-
86
- ### 2. Margin (외부 여백)
87
-
88
- 요소 바깥쪽의 여백입니다.
89
-
90
- ```tsx
91
- // 전체 방향
92
- <div className="m-4">16px 전체</div>
93
-
94
- // 개별 방향
95
- <div className="mt-4">위 16px</div>
96
- <div className="mr-4">오른쪽 16px</div>
97
- <div className="mb-4">아래 16px</div>
98
- <div className="ml-4">왼쪽 16px</div>
99
-
100
- // 자동 마진 (중앙 정렬)
101
- <div className="mx-auto">좌우 중앙</div>
102
- ```
103
-
104
- ### 3. Gap (그리드/플렉스 간격)
105
-
106
- Flexbox나 Grid 아이템 간의 간격입니다.
107
-
108
- ```tsx
109
- // Flexbox에서
110
- <div className="flex gap-4">
111
- <div>아이템 1</div>
112
- <div>아이템 2</div> {/* 16px 간격 */}
113
- <div>아이템 3</div>
114
- </div>
115
-
116
- // Grid에서
117
- <div className="grid grid-cols-3 gap-6">
118
- <div>카드 1</div>
119
- <div>카드 2</div> {/* 24px 간격 */}
120
- <div>카드 3</div>
121
- </div>
122
-
123
- // 축별 gap
124
- <div className="flex gap-x-4 gap-y-2">
125
- {/* 가로 16px, 세로 8px */}
126
- </div>
127
- ```
128
-
129
- ## 실전 레이아웃 패턴
130
-
131
- ### 1. 카드 컴포넌트
132
-
133
- ```tsx
134
- <div className="p-6 rounded-lg border border-gray-200">
135
- {/* 제목 - 아래 간격 */}
136
- <h3 className="text-lg font-semibold mb-2">카드 제목</h3>
137
-
138
- {/* 본문 - 아래 간격 */}
139
- <p className="text-gray-600 mb-4">
140
- 카드 설명 텍스트입니다.
141
- </p>
142
-
143
- {/* 버튼 그룹 */}
144
- <div className="flex gap-2">
145
- <button className="px-4 py-2">취소</button>
146
- <button className="px-4 py-2">확인</button>
147
- </div>
148
- </div>
149
- ```
150
-
151
- ### 2. 폼 레이아웃
152
-
153
- ```tsx
154
- <form className="space-y-6">
155
- {/* 필드 그룹 */}
156
- <div className="space-y-4">
157
- <div>
158
- <label className="block text-sm font-medium mb-1">이름</label>
159
- <input className="w-full px-3 py-2 border rounded" />
160
- </div>
161
-
162
- <div>
163
- <label className="block text-sm font-medium mb-1">이메일</label>
164
- <input className="w-full px-3 py-2 border rounded" />
165
- </div>
166
- </div>
167
-
168
- {/* 버튼 영역 */}
169
- <div className="flex justify-end gap-3">
170
- <button className="px-4 py-2">취소</button>
171
- <button className="px-4 py-2 bg-blue-600 text-white">저장</button>
172
- </div>
173
- </form>
174
- ```
175
-
176
- ### 3. 페이지 섹션
177
-
178
- ```tsx
179
- <main className="py-12">
180
- {/* 히어로 섹션 */}
181
- <section className="py-16 px-4">
182
- <div className="max-w-4xl mx-auto text-center">
183
- <h1 className="text-4xl font-bold mb-4">히어로 제목</h1>
184
- <p className="text-xl text-gray-600 mb-8">서브 타이틀</p>
185
- <button>시작하기</button>
186
- </div>
187
- </section>
188
-
189
- {/* 기능 섹션 */}
190
- <section className="py-16 px-4 bg-gray-50">
191
- <div className="max-w-6xl mx-auto">
192
- <h2 className="text-3xl font-bold text-center mb-12">주요 기능</h2>
193
- <div className="grid grid-cols-3 gap-8">
194
- {/* 카드들 */}
195
- </div>
196
- </div>
197
- </section>
198
- </main>
199
- ```
200
-
201
- ### 4. 네비게이션 바
202
-
203
- ```tsx
204
- <nav className="px-4 py-3 border-b">
205
- <div className="max-w-6xl mx-auto flex items-center justify-between">
206
- {/* 로고 */}
207
- <div className="font-bold text-xl">Logo</div>
208
-
209
- {/* 메뉴 */}
210
- <div className="flex items-center gap-6">
211
- <a href="#">메뉴 1</a>
212
- <a href="#">메뉴 2</a>
213
- <a href="#">메뉴 3</a>
214
- </div>
215
-
216
- {/* 액션 */}
217
- <div className="flex items-center gap-3">
218
- <button className="px-3 py-1.5">로그인</button>
219
- <button className="px-3 py-1.5 bg-blue-600 text-white rounded">
220
- 시작하기
221
- </button>
222
- </div>
223
- </div>
224
- </nav>
225
- ```
226
-
227
- ## 반응형 간격
228
-
229
- ### 화면 크기별 간격 조정
230
-
231
- ```tsx
232
- // 모바일에서 작게, 데스크탑에서 크게
233
- <section className="py-8 md:py-12 lg:py-16">
234
- <div className="px-4 md:px-6 lg:px-8">
235
- {/* 콘텐츠 */}
236
- </div>
237
- </section>
238
-
239
- // 그리드 간격 조정
240
- <div className="grid gap-4 md:gap-6 lg:gap-8">
241
- {/* 아이템들 */}
242
- </div>
243
- ```
244
-
245
- ### 브레이크포인트별 권장 간격
246
-
247
- | 요소 | Mobile | Tablet (md) | Desktop (lg) |
248
- |------|--------|-------------|--------------|
249
- | 컨테이너 패딩 | 16px | 24px | 32px |
250
- | 섹션 간격 | 32px | 48px | 64px |
251
- | 카드 간격 | 16px | 24px | 32px |
252
- | 그리드 gap | 16px | 24px | 32px |
253
-
254
- ## 시각적 그룹핑
255
-
256
- ### 근접성의 법칙
257
-
258
- > 가까이 있는 요소는 관련있어 보입니다.
259
-
260
- ```tsx
261
- // ✅ 좋은 예 - 관련 요소 그룹핑
262
- <div>
263
- <div className="mb-6">
264
- <h3 className="mb-2">제목</h3> {/* 밀접: 8px */}
265
- <p>설명 텍스트</p> {/* 같은 그룹 */}
266
- </div>
267
- {/* 분리: 24px */}
268
- <div className="mb-6">
269
- <h3 className="mb-2">다른 제목</h3> {/* 새 그룹 */}
270
- <p>다른 설명</p>
271
- </div>
272
- </div>
273
-
274
- // ❌ 나쁜 예 - 같은 간격으로 그룹 불명확
275
- <div>
276
- <h3 className="mb-4">제목</h3> {/* 16px */}
277
- <p className="mb-4">설명 텍스트</p> {/* 16px - 구분 안됨 */}
278
- <h3 className="mb-4">다른 제목</h3> {/* 16px - 구분 안됨 */}
279
- <p className="mb-4">다른 설명</p>
280
- </div>
281
- ```
282
-
283
- ### 간격 비율 권장
284
-
285
- ```
286
- 같은 그룹 내 요소: 8-12px (gap-2, gap-3)
287
- 그룹과 그룹 사이: 24-32px (gap-6, gap-8)
288
- 섹션과 섹션 사이: 48-64px (py-12, py-16)
289
- ```
290
-
291
- ## 컨테이너와 최대 너비
292
-
293
- ### 표준 컨테이너
294
-
295
- ```tsx
296
- // 기본 컨테이너
297
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
298
- {/* 콘텐츠 */}
299
- </div>
300
-
301
- // 좁은 콘텐츠 (블로그, 문서)
302
- <div className="max-w-3xl mx-auto px-4">
303
- {/* 텍스트 콘텐츠 */}
304
- </div>
305
-
306
- // 넓은 콘텐츠 (대시보드)
307
- <div className="max-w-full px-4 lg:px-8">
308
- {/* 전체 너비 콘텐츠 */}
309
- </div>
310
- ```
311
-
312
- ### 최대 너비 옵션
313
-
314
- ```css
315
- max-w-sm 384px 좁은 카드
316
- max-w-md 448px 폼
317
- max-w-lg 512px 모달
318
- max-w-xl 576px 넓은 모달
319
- max-w-2xl 672px 중간 콘텐츠
320
- max-w-3xl 768px 블로그 글
321
- max-w-4xl 896px 문서
322
- max-w-5xl 1024px 표준 콘텐츠
323
- max-w-6xl 1152px 넓은 콘텐츠
324
- max-w-7xl 1280px 대시보드
325
- ```
326
-
327
- ## 체크리스트
328
-
329
- ### 반드시 지켜야 할 것
330
-
331
- - [ ] 일관된 간격 단위 사용 (8px 배수)
332
- - [ ] 관련 요소는 가깝게, 다른 그룹은 멀리
333
- - [ ] 반응형 간격 적용
334
- - [ ] 충분한 터치 영역 (최소 44px)
335
-
336
- ### 권장 사항
337
-
338
- - [ ] `space-y-*`, `gap-*` 유틸리티 활용
339
- - [ ] 섹션마다 일관된 패딩 적용
340
- - [ ] 최대 너비로 가독성 확보
341
- - [ ] 여백으로 시각적 계층 표현