@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.
- package/dist/index.js +109 -216
- package/package.json +8 -2
- package/templates/hono/CLAUDE.md +59 -328
- package/templates/hono/docs/architecture/architecture.md +93 -747
- package/templates/hono/docs/deployment/cloudflare.md +59 -513
- package/templates/hono/docs/deployment/docker.md +41 -356
- package/templates/hono/docs/deployment/index.md +54 -190
- package/templates/hono/docs/deployment/railway.md +36 -306
- package/templates/hono/docs/deployment/vercel.md +49 -434
- package/templates/hono/docs/library/ai-sdk/index.md +53 -290
- package/templates/hono/docs/library/ai-sdk/openrouter.md +19 -387
- package/templates/hono/docs/library/ai-sdk/providers.md +28 -394
- package/templates/hono/docs/library/ai-sdk/streaming.md +52 -353
- package/templates/hono/docs/library/ai-sdk/structured-output.md +63 -395
- package/templates/hono/docs/library/ai-sdk/tools.md +62 -431
- package/templates/hono/docs/library/hono/env-setup.md +24 -313
- package/templates/hono/docs/library/hono/error-handling.md +34 -295
- package/templates/hono/docs/library/hono/index.md +29 -121
- package/templates/hono/docs/library/hono/middleware.md +21 -188
- package/templates/hono/docs/library/hono/rpc.md +40 -341
- package/templates/hono/docs/library/hono/validation.md +35 -195
- package/templates/hono/docs/library/pino/index.md +42 -333
- package/templates/hono/docs/library/prisma/cloudflare-d1.md +64 -367
- package/templates/hono/docs/library/prisma/config.md +19 -260
- package/templates/hono/docs/library/prisma/index.md +67 -320
- package/templates/hono/docs/library/zod/index.md +53 -257
- package/templates/npx/CLAUDE.md +62 -274
- package/templates/npx/docs/references/patterns.md +160 -0
- package/templates/tanstack-start/CLAUDE.md +100 -256
- package/templates/tanstack-start/docs/architecture/architecture.md +44 -589
- package/templates/tanstack-start/docs/deployment/cloudflare.md +37 -424
- package/templates/tanstack-start/docs/deployment/index.md +57 -286
- package/templates/tanstack-start/docs/deployment/nitro.md +36 -318
- package/templates/tanstack-start/docs/deployment/railway.md +40 -409
- package/templates/tanstack-start/docs/deployment/vercel.md +43 -465
- package/templates/tanstack-start/docs/design/components.md +77 -311
- package/templates/tanstack-start/docs/design/index.md +113 -69
- package/templates/tanstack-start/docs/design/safe-area.md +51 -250
- package/templates/tanstack-start/docs/design/tailwind-setup.md +45 -359
- package/templates/tanstack-start/docs/guides/conventions.md +103 -0
- package/templates/tanstack-start/docs/guides/env-setup.md +34 -340
- package/templates/tanstack-start/docs/guides/getting-started.md +22 -209
- package/templates/tanstack-start/docs/guides/hooks.md +166 -0
- package/templates/tanstack-start/docs/guides/routes.md +166 -0
- package/templates/tanstack-start/docs/guides/services.md +143 -0
- package/templates/tanstack-start/docs/library/better-auth/2fa.md +27 -115
- package/templates/tanstack-start/docs/library/better-auth/advanced.md +22 -105
- package/templates/tanstack-start/docs/library/better-auth/index.md +17 -66
- package/templates/tanstack-start/docs/library/better-auth/plugins.md +11 -88
- package/templates/tanstack-start/docs/library/better-auth/session.md +12 -92
- package/templates/tanstack-start/docs/library/better-auth/setup.md +9 -91
- package/templates/tanstack-start/docs/library/prisma/cloudflare-d1.md +30 -358
- package/templates/tanstack-start/docs/library/prisma/config.md +27 -327
- package/templates/tanstack-start/docs/library/prisma/crud.md +46 -174
- package/templates/tanstack-start/docs/library/prisma/index.md +23 -113
- package/templates/tanstack-start/docs/library/prisma/relations.md +31 -153
- package/templates/tanstack-start/docs/library/prisma/schema.md +40 -217
- package/templates/tanstack-start/docs/library/prisma/setup.md +12 -112
- package/templates/tanstack-start/docs/library/prisma/transactions.md +20 -110
- package/templates/tanstack-start/docs/library/tanstack-query/index.md +26 -97
- package/templates/tanstack-start/docs/library/tanstack-query/invalidation.md +28 -107
- package/templates/tanstack-start/docs/library/tanstack-query/optimistic-updates.md +44 -146
- package/templates/tanstack-start/docs/library/tanstack-query/use-mutation.md +33 -127
- package/templates/tanstack-start/docs/library/tanstack-query/use-query.md +49 -149
- package/templates/tanstack-start/docs/library/tanstack-start/auth-patterns.md +19 -112
- package/templates/tanstack-start/docs/library/tanstack-start/index.md +33 -80
- package/templates/tanstack-start/docs/library/tanstack-start/middleware.md +28 -106
- package/templates/tanstack-start/docs/library/tanstack-start/routing.md +21 -118
- package/templates/tanstack-start/docs/library/tanstack-start/server-functions.md +34 -246
- package/templates/tanstack-start/docs/library/tanstack-start/setup.md +6 -39
- package/templates/tanstack-start/docs/library/zod/complex-types.md +32 -156
- package/templates/tanstack-start/docs/library/zod/index.md +31 -144
- package/templates/tanstack-start/docs/library/zod/transforms.md +20 -129
- package/templates/tanstack-start/docs/library/zod/validation.md +39 -155
- package/templates/hono/docs/commands/git.md +0 -145
- package/templates/hono/docs/mcp/context7.md +0 -106
- package/templates/hono/docs/mcp/index.md +0 -176
- package/templates/hono/docs/mcp/sequential-thinking.md +0 -101
- package/templates/hono/docs/mcp/serena.md +0 -269
- package/templates/hono/docs/mcp/sgrep.md +0 -105
- package/templates/hono/docs/skills/gemini-review/SKILL.md +0 -220
- package/templates/hono/docs/skills/gemini-review/references/checklists.md +0 -136
- package/templates/hono/docs/skills/gemini-review/references/prompt-templates.md +0 -303
- package/templates/npx/docs/commands/git.md +0 -145
- package/templates/npx/docs/mcp/index.md +0 -60
- package/templates/npx/docs/skills/gemini-review/SKILL.md +0 -220
- package/templates/npx/docs/skills/gemini-review/references/checklists.md +0 -134
- package/templates/npx/docs/skills/gemini-review/references/prompt-templates.md +0 -301
- package/templates/tanstack-start/docs/commands/git.md +0 -145
- package/templates/tanstack-start/docs/design/accessibility.md +0 -433
- package/templates/tanstack-start/docs/design/color.md +0 -235
- package/templates/tanstack-start/docs/design/spacing.md +0 -341
- package/templates/tanstack-start/docs/design/typography.md +0 -324
- package/templates/tanstack-start/docs/guides/best-practices.md +0 -950
- package/templates/tanstack-start/docs/guides/husky-lint-staged.md +0 -303
- package/templates/tanstack-start/docs/guides/prettier.md +0 -189
- package/templates/tanstack-start/docs/guides/project-templates.md +0 -710
- package/templates/tanstack-start/docs/library/tanstack-query/setup.md +0 -107
- package/templates/tanstack-start/docs/library/zod/basic-types.md +0 -186
- package/templates/tanstack-start/docs/mcp/context7.md +0 -204
- package/templates/tanstack-start/docs/mcp/index.md +0 -177
- package/templates/tanstack-start/docs/mcp/sequential-thinking.md +0 -180
- package/templates/tanstack-start/docs/mcp/serena.md +0 -269
- package/templates/tanstack-start/docs/mcp/sgrep.md +0 -174
- package/templates/tanstack-start/docs/skills/gemini-review/SKILL.md +0 -220
- package/templates/tanstack-start/docs/skills/gemini-review/references/checklists.md +0 -144
- package/templates/tanstack-start/docs/skills/gemini-review/references/prompt-templates.md +0 -292
|
@@ -1,98 +1,47 @@
|
|
|
1
1
|
# 컴포넌트 가이드라인
|
|
2
2
|
|
|
3
|
-
> **상위 문서**: [UI/UX 디자인 가이드](./index.md)
|
|
4
|
-
|
|
5
|
-
일관된 UI 컴포넌트 사용은 사용자 경험을 향상시키고 개발 효율성을 높입니다.
|
|
6
|
-
|
|
7
3
|
## 버튼 (Button)
|
|
8
4
|
|
|
9
|
-
###
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
Primary (주요) 사용자가 해야 할 주된 행동
|
|
13
|
-
Secondary (보조) 대안적 행동
|
|
14
|
-
Tertiary (3차) 덜 중요한 행동
|
|
15
|
-
Destructive (삭제) 위험한/되돌릴 수 없는 행동
|
|
16
|
-
```
|
|
5
|
+
### 계층
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
| 유형 | 용도 | 스타일 |
|
|
8
|
+
|------|------|--------|
|
|
9
|
+
| Primary | 주된 행동 | `bg-blue-600 text-white` |
|
|
10
|
+
| Secondary | 대안적 행동 | `border border-gray-300` |
|
|
11
|
+
| Tertiary | 덜 중요한 행동 | `text-blue-600` |
|
|
12
|
+
| Destructive | 위험한 행동 | `bg-red-600 text-white` |
|
|
19
13
|
|
|
20
14
|
```tsx
|
|
21
|
-
// Primary
|
|
15
|
+
// Primary
|
|
22
16
|
<button className="px-4 py-2 bg-blue-600 text-white rounded-lg
|
|
23
|
-
hover:bg-blue-700
|
|
24
|
-
disabled:bg-gray-300 disabled:cursor-not-allowed">
|
|
17
|
+
hover:bg-blue-700 disabled:bg-gray-300 disabled:cursor-not-allowed">
|
|
25
18
|
저장하기
|
|
26
19
|
</button>
|
|
27
20
|
|
|
28
|
-
// Secondary
|
|
29
|
-
<button className="px-4 py-2 border border-gray-300 rounded-lg
|
|
30
|
-
hover:bg-gray-50 active:bg-gray-100
|
|
31
|
-
dark:border-gray-600 dark:hover:bg-gray-800">
|
|
21
|
+
// Secondary
|
|
22
|
+
<button className="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50">
|
|
32
23
|
취소
|
|
33
24
|
</button>
|
|
34
25
|
|
|
35
|
-
//
|
|
36
|
-
<button className="
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</button>
|
|
40
|
-
|
|
41
|
-
// Destructive - 빨간색
|
|
42
|
-
<button className="px-4 py-2 bg-red-600 text-white rounded-lg
|
|
43
|
-
hover:bg-red-700">
|
|
44
|
-
삭제
|
|
26
|
+
// 로딩 상태
|
|
27
|
+
<button disabled={isLoading} className="flex items-center gap-2">
|
|
28
|
+
{isLoading && <Spinner className="w-4 h-4 animate-spin" />}
|
|
29
|
+
{isLoading ? '저장 중...' : '저장하기'}
|
|
45
30
|
</button>
|
|
46
31
|
```
|
|
47
32
|
|
|
48
|
-
###
|
|
49
|
-
|
|
33
|
+
### 크기
|
|
50
34
|
```tsx
|
|
51
|
-
|
|
52
|
-
<button className="px-
|
|
53
|
-
|
|
54
|
-
// Medium (기본)
|
|
55
|
-
<button className="px-4 py-2 text-base">기본 버튼</button>
|
|
56
|
-
|
|
57
|
-
// Large
|
|
58
|
-
<button className="px-6 py-3 text-lg">큰 버튼</button>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### 버튼 상태
|
|
62
|
-
|
|
63
|
-
| 상태 | 설명 | 시각적 처리 |
|
|
64
|
-
|------|------|------------|
|
|
65
|
-
| Default | 기본 상태 | 기본 색상 |
|
|
66
|
-
| Hover | 마우스 오버 | 약간 어둡게 |
|
|
67
|
-
| Active | 클릭 중 | 더 어둡게 |
|
|
68
|
-
| Focus | 키보드 포커스 | 아웃라인 표시 |
|
|
69
|
-
| Disabled | 비활성화 | 회색, 클릭 불가 |
|
|
70
|
-
| Loading | 로딩 중 | 스피너, 클릭 불가 |
|
|
71
|
-
|
|
72
|
-
```tsx
|
|
73
|
-
// 로딩 상태 버튼
|
|
74
|
-
<button
|
|
75
|
-
disabled={isLoading}
|
|
76
|
-
className="px-4 py-2 bg-blue-600 text-white rounded-lg
|
|
77
|
-
disabled:opacity-50 flex items-center gap-2"
|
|
78
|
-
>
|
|
79
|
-
{isLoading && <Spinner className="w-4 h-4 animate-spin" />}
|
|
80
|
-
{isLoading ? '저장 중...' : '저장하기'}
|
|
81
|
-
</button>
|
|
35
|
+
<button className="px-3 py-1.5 text-sm">Small</button>
|
|
36
|
+
<button className="px-4 py-2 text-base">Medium</button>
|
|
37
|
+
<button className="px-6 py-3 text-lg">Large</button>
|
|
82
38
|
```
|
|
83
39
|
|
|
84
40
|
## 입력 필드 (Input)
|
|
85
41
|
|
|
86
|
-
### 기본 구조
|
|
87
|
-
|
|
88
42
|
```tsx
|
|
89
43
|
<div>
|
|
90
|
-
|
|
91
|
-
<label className="block text-sm font-medium text-gray-700 mb-1">
|
|
92
|
-
이메일
|
|
93
|
-
</label>
|
|
94
|
-
|
|
95
|
-
{/* 입력 필드 */}
|
|
44
|
+
<label className="block text-sm font-medium text-gray-700 mb-1">이메일</label>
|
|
96
45
|
<input
|
|
97
46
|
type="email"
|
|
98
47
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg
|
|
@@ -100,310 +49,127 @@ Destructive (삭제) 위험한/되돌릴 수 없는 행동
|
|
|
100
49
|
placeholder:text-gray-400"
|
|
101
50
|
placeholder="example@email.com"
|
|
102
51
|
/>
|
|
103
|
-
|
|
104
|
-
{/* 도움말/에러 메시지 */}
|
|
105
|
-
<p className="mt-1 text-sm text-gray-500">
|
|
106
|
-
업무용 이메일을 입력하세요.
|
|
107
|
-
</p>
|
|
52
|
+
<p className="mt-1 text-sm text-gray-500">도움말</p>
|
|
108
53
|
</div>
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### 입력 상태
|
|
112
|
-
|
|
113
|
-
```tsx
|
|
114
|
-
// 기본 상태
|
|
115
|
-
<input className="border border-gray-300 focus:ring-2 focus:ring-blue-500" />
|
|
116
54
|
|
|
117
55
|
// 에러 상태
|
|
118
|
-
<input className="border border-red-500 focus:ring-
|
|
119
|
-
<p className="mt-1 text-sm text-red-600"
|
|
120
|
-
|
|
121
|
-
// 성공 상태
|
|
122
|
-
<input className="border border-green-500 focus:ring-2 focus:ring-green-500" />
|
|
123
|
-
|
|
124
|
-
// 비활성화 상태
|
|
125
|
-
<input disabled className="border border-gray-200 bg-gray-50 cursor-not-allowed" />
|
|
56
|
+
<input className="border border-red-500 focus:ring-red-500" />
|
|
57
|
+
<p className="mt-1 text-sm text-red-600">오류 메시지</p>
|
|
126
58
|
```
|
|
127
59
|
|
|
128
|
-
###
|
|
129
|
-
|
|
60
|
+
### 아이콘 포함
|
|
130
61
|
```tsx
|
|
131
|
-
// 아이콘 포함 (왼쪽)
|
|
132
62
|
<div className="relative">
|
|
133
63
|
<SearchIcon className="absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-gray-400" />
|
|
134
64
|
<input className="pl-10 pr-3 py-2 ..." />
|
|
135
65
|
</div>
|
|
136
|
-
|
|
137
|
-
// 아이콘 포함 (오른쪽)
|
|
138
|
-
<div className="relative">
|
|
139
|
-
<input className="pl-3 pr-10 py-2 ..." type="password" />
|
|
140
|
-
<button className="absolute right-3 top-1/2 -translate-y-1/2">
|
|
141
|
-
<EyeIcon className="w-5 h-5 text-gray-400" />
|
|
142
|
-
</button>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
// 접두사/접미사
|
|
146
|
-
<div className="flex">
|
|
147
|
-
<span className="px-3 py-2 bg-gray-100 border border-r-0 rounded-l-lg">
|
|
148
|
-
https://
|
|
149
|
-
</span>
|
|
150
|
-
<input className="flex-1 px-3 py-2 border rounded-r-lg" />
|
|
151
|
-
</div>
|
|
152
66
|
```
|
|
153
67
|
|
|
154
68
|
## 카드 (Card)
|
|
155
69
|
|
|
156
|
-
### 기본 카드
|
|
157
|
-
|
|
158
70
|
```tsx
|
|
159
|
-
<div className="bg-white dark:bg-gray-800 rounded-lg border
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<div className="px-6 py-4 border-b border-gray-200 dark:border-gray-700">
|
|
163
|
-
<h3 className="text-lg font-semibold">카드 제목</h3>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
{/* 카드 본문 */}
|
|
167
|
-
<div className="px-6 py-4">
|
|
168
|
-
<p>카드 내용이 여기에 들어갑니다.</p>
|
|
169
|
-
</div>
|
|
170
|
-
|
|
171
|
-
{/* 카드 푸터 (선택) */}
|
|
172
|
-
<div className="px-6 py-4 bg-gray-50 dark:bg-gray-900">
|
|
173
|
-
<button>액션</button>
|
|
71
|
+
<div className="bg-white dark:bg-gray-800 rounded-lg border shadow-sm overflow-hidden">
|
|
72
|
+
<div className="px-6 py-4 border-b">
|
|
73
|
+
<h3 className="text-lg font-semibold">제목</h3>
|
|
174
74
|
</div>
|
|
75
|
+
<div className="px-6 py-4">본문</div>
|
|
76
|
+
<div className="px-6 py-4 bg-gray-50">푸터</div>
|
|
175
77
|
</div>
|
|
176
78
|
```
|
|
177
79
|
|
|
178
|
-
|
|
80
|
+
## 모달 (Modal)
|
|
179
81
|
|
|
180
82
|
```tsx
|
|
181
|
-
// 클릭 가능한 카드
|
|
182
|
-
<div className="... cursor-pointer hover:shadow-md transition-shadow">
|
|
183
|
-
|
|
184
|
-
// 선택된 카드
|
|
185
|
-
<div className="... ring-2 ring-blue-500">
|
|
186
|
-
|
|
187
|
-
// 이미지 카드
|
|
188
|
-
<div className="... overflow-hidden">
|
|
189
|
-
<img src="..." className="w-full h-48 object-cover" />
|
|
190
|
-
<div className="p-4">...</div>
|
|
191
|
-
</div>
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
## 모달/다이얼로그 (Modal)
|
|
195
|
-
|
|
196
|
-
### 기본 구조
|
|
197
|
-
|
|
198
|
-
```tsx
|
|
199
|
-
// 오버레이
|
|
200
83
|
<div className="fixed inset-0 bg-black/50 z-50 flex items-center justify-center">
|
|
201
|
-
|
|
202
|
-
{/* 모달 컨테이너 */}
|
|
203
|
-
<div className="bg-white dark:bg-gray-800 rounded-lg shadow-xl
|
|
204
|
-
w-full max-w-md mx-4 overflow-hidden">
|
|
205
|
-
|
|
206
|
-
{/* 헤더 */}
|
|
84
|
+
<div className="bg-white rounded-lg shadow-xl w-full max-w-md mx-4">
|
|
207
85
|
<div className="px-6 py-4 border-b flex items-center justify-between">
|
|
208
|
-
<h2 className="text-lg font-semibold"
|
|
209
|
-
<button
|
|
210
|
-
<XIcon className="w-5 h-5" />
|
|
211
|
-
</button>
|
|
212
|
-
</div>
|
|
213
|
-
|
|
214
|
-
{/* 본문 */}
|
|
215
|
-
<div className="px-6 py-4">
|
|
216
|
-
<p>모달 내용</p>
|
|
86
|
+
<h2 className="text-lg font-semibold">제목</h2>
|
|
87
|
+
<button><XIcon /></button>
|
|
217
88
|
</div>
|
|
218
|
-
|
|
219
|
-
{/* 푸터 */}
|
|
89
|
+
<div className="px-6 py-4">본문</div>
|
|
220
90
|
<div className="px-6 py-4 bg-gray-50 flex justify-end gap-3">
|
|
221
|
-
<button
|
|
222
|
-
<button className="
|
|
223
|
-
확인
|
|
224
|
-
</button>
|
|
91
|
+
<button>취소</button>
|
|
92
|
+
<button className="bg-blue-600 text-white">확인</button>
|
|
225
93
|
</div>
|
|
226
94
|
</div>
|
|
227
95
|
</div>
|
|
228
96
|
```
|
|
229
97
|
|
|
230
|
-
###
|
|
231
|
-
|
|
98
|
+
### 크기
|
|
232
99
|
```tsx
|
|
233
|
-
//
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
//
|
|
237
|
-
<div className="max-w-md">
|
|
238
|
-
|
|
239
|
-
// Large - 복잡한 내용
|
|
240
|
-
<div className="max-w-lg">
|
|
241
|
-
|
|
242
|
-
// Extra Large - 테이블, 대시보드
|
|
243
|
-
<div className="max-w-2xl">
|
|
100
|
+
max-w-sm // 간단한 확인
|
|
101
|
+
max-w-md // 기본 (폼)
|
|
102
|
+
max-w-lg // 복잡한 내용
|
|
103
|
+
max-w-2xl // 테이블, 대시보드
|
|
244
104
|
```
|
|
245
105
|
|
|
246
|
-
## 알림/토스트 (Alert
|
|
247
|
-
|
|
248
|
-
### 알림 유형
|
|
106
|
+
## 알림/토스트 (Alert)
|
|
249
107
|
|
|
250
108
|
```tsx
|
|
251
|
-
// 정보
|
|
109
|
+
// 정보
|
|
252
110
|
<div className="p-4 bg-blue-50 border border-blue-200 rounded-lg flex gap-3">
|
|
253
|
-
<InfoIcon className="w-5 h-5 text-blue-600
|
|
254
|
-
<p className="text-blue-800">안내
|
|
111
|
+
<InfoIcon className="w-5 h-5 text-blue-600" />
|
|
112
|
+
<p className="text-blue-800">안내 메시지</p>
|
|
255
113
|
</div>
|
|
256
114
|
|
|
257
|
-
//
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
<p className="text-green-800">성공적으로 저장되었습니다.</p>
|
|
261
|
-
</div>
|
|
262
|
-
|
|
263
|
-
// 경고 (노란색)
|
|
264
|
-
<div className="p-4 bg-yellow-50 border border-yellow-200 rounded-lg flex gap-3">
|
|
265
|
-
<WarningIcon className="w-5 h-5 text-yellow-600 shrink-0" />
|
|
266
|
-
<p className="text-yellow-800">주의가 필요합니다.</p>
|
|
267
|
-
</div>
|
|
268
|
-
|
|
269
|
-
// 오류 (빨간색)
|
|
270
|
-
<div className="p-4 bg-red-50 border border-red-200 rounded-lg flex gap-3">
|
|
271
|
-
<ErrorIcon className="w-5 h-5 text-red-600 shrink-0" />
|
|
272
|
-
<p className="text-red-800">오류가 발생했습니다.</p>
|
|
273
|
-
</div>
|
|
115
|
+
// 성공: bg-green-50, border-green-200, text-green-800
|
|
116
|
+
// 경고: bg-yellow-50, border-yellow-200, text-yellow-800
|
|
117
|
+
// 오류: bg-red-50, border-red-200, text-red-800
|
|
274
118
|
```
|
|
275
119
|
|
|
276
|
-
|
|
120
|
+
## 배지 (Badge)
|
|
277
121
|
|
|
278
122
|
```tsx
|
|
279
|
-
|
|
280
|
-
<div className="fixed bottom-4 right-4 z-50">
|
|
281
|
-
<div className="bg-gray-900 text-white px-4 py-3 rounded-lg shadow-lg">
|
|
282
|
-
저장되었습니다
|
|
283
|
-
</div>
|
|
284
|
-
</div>
|
|
285
|
-
|
|
286
|
-
// 상단 중앙
|
|
287
|
-
<div className="fixed top-4 left-1/2 -translate-x-1/2 z-50">
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
## 배지/태그 (Badge)
|
|
291
|
-
|
|
292
|
-
```tsx
|
|
293
|
-
// 상태 배지
|
|
294
|
-
<span className="px-2 py-0.5 text-xs font-medium rounded-full
|
|
295
|
-
bg-green-100 text-green-800">
|
|
123
|
+
<span className="px-2 py-0.5 text-xs font-medium rounded-full bg-green-100 text-green-800">
|
|
296
124
|
활성
|
|
297
125
|
</span>
|
|
298
126
|
|
|
299
|
-
|
|
300
|
-
bg-yellow-100 text-yellow-800">
|
|
301
|
-
대기중
|
|
302
|
-
</span>
|
|
303
|
-
|
|
304
|
-
<span className="px-2 py-0.5 text-xs font-medium rounded-full
|
|
305
|
-
bg-red-100 text-red-800">
|
|
306
|
-
오류
|
|
307
|
-
</span>
|
|
308
|
-
|
|
309
|
-
// 숫자 배지 (알림)
|
|
127
|
+
// 숫자 배지
|
|
310
128
|
<div className="relative">
|
|
311
|
-
<BellIcon
|
|
312
|
-
<span className="absolute -top-1 -right-1 w-5 h-5 bg-red-500
|
|
313
|
-
|
|
314
|
-
3
|
|
315
|
-
</span>
|
|
129
|
+
<BellIcon />
|
|
130
|
+
<span className="absolute -top-1 -right-1 w-5 h-5 bg-red-500 text-white text-xs
|
|
131
|
+
rounded-full flex items-center justify-center">3</span>
|
|
316
132
|
</div>
|
|
317
133
|
```
|
|
318
134
|
|
|
319
135
|
## 테이블 (Table)
|
|
320
136
|
|
|
321
137
|
```tsx
|
|
322
|
-
<
|
|
323
|
-
<
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
</tr>
|
|
340
|
-
</thead>
|
|
341
|
-
|
|
342
|
-
{/* 본문 */}
|
|
343
|
-
<tbody className="divide-y divide-gray-200 dark:divide-gray-700">
|
|
344
|
-
<tr className="hover:bg-gray-50 dark:hover:bg-gray-800">
|
|
345
|
-
<td className="px-6 py-4 whitespace-nowrap">홍길동</td>
|
|
346
|
-
<td className="px-6 py-4 whitespace-nowrap">hong@email.com</td>
|
|
347
|
-
<td className="px-6 py-4 whitespace-nowrap">
|
|
348
|
-
<span className="px-2 py-0.5 text-xs bg-green-100 text-green-800 rounded-full">
|
|
349
|
-
활성
|
|
350
|
-
</span>
|
|
351
|
-
</td>
|
|
352
|
-
</tr>
|
|
353
|
-
</tbody>
|
|
354
|
-
</table>
|
|
355
|
-
</div>
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
## 컴포넌트 조합 원칙
|
|
359
|
-
|
|
360
|
-
### 1. 일관된 크기 체계
|
|
361
|
-
|
|
362
|
-
```
|
|
363
|
-
컴포넌트 크기는 서로 어울려야 합니다:
|
|
364
|
-
|
|
365
|
-
Small 버튼 + Small 입력 + text-sm
|
|
366
|
-
Medium 버튼 + Medium 입력 + text-base
|
|
367
|
-
Large 버튼 + Large 입력 + text-lg
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### 2. 시각적 무게 균형
|
|
138
|
+
<table className="w-full">
|
|
139
|
+
<thead className="bg-gray-50">
|
|
140
|
+
<tr>
|
|
141
|
+
<th className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase">
|
|
142
|
+
이름
|
|
143
|
+
</th>
|
|
144
|
+
</tr>
|
|
145
|
+
</thead>
|
|
146
|
+
<tbody className="divide-y divide-gray-200">
|
|
147
|
+
<tr className="hover:bg-gray-50">
|
|
148
|
+
<td className="px-6 py-4 whitespace-nowrap">홍길동</td>
|
|
149
|
+
</tr>
|
|
150
|
+
</tbody>
|
|
151
|
+
</table>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 조합 원칙
|
|
371
155
|
|
|
372
156
|
```tsx
|
|
373
|
-
// ✅
|
|
157
|
+
// ✅ Primary 하나만
|
|
374
158
|
<div className="flex gap-2">
|
|
375
159
|
<button className="border">취소</button>
|
|
376
160
|
<button className="bg-blue-600 text-white">저장</button>
|
|
377
161
|
</div>
|
|
378
162
|
|
|
379
|
-
// ❌
|
|
163
|
+
// ❌ Primary 여러 개
|
|
380
164
|
<div className="flex gap-2">
|
|
381
|
-
<button className="bg-blue-600
|
|
382
|
-
<button className="bg-green-600
|
|
165
|
+
<button className="bg-blue-600">취소</button>
|
|
166
|
+
<button className="bg-green-600">저장</button>
|
|
383
167
|
</div>
|
|
384
168
|
```
|
|
385
169
|
|
|
386
|
-
### 3. 예측 가능한 위치
|
|
387
|
-
|
|
388
|
-
```
|
|
389
|
-
확인/저장 버튼: 오른쪽
|
|
390
|
-
취소/닫기 버튼: 왼쪽
|
|
391
|
-
주요 액션: 눈에 잘 띄는 위치
|
|
392
|
-
파괴적 액션: 분리 또는 경고 표시
|
|
393
|
-
```
|
|
394
|
-
|
|
395
170
|
## 체크리스트
|
|
396
171
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
- [ ] 버튼 계층 구분 (Primary는 화면당 1개)
|
|
172
|
+
- [ ] 버튼 계층 구분 (Primary 화면당 1개)
|
|
400
173
|
- [ ] 입력 필드에 레이블 필수
|
|
401
|
-
- [ ]
|
|
402
|
-
- [ ] 로딩 상태 표시
|
|
403
|
-
|
|
404
|
-
### 권장 사항
|
|
405
|
-
|
|
406
|
-
- [ ] 일관된 컴포넌트 크기 사용
|
|
174
|
+
- [ ] 에러/로딩 상태 시각적 표시
|
|
407
175
|
- [ ] 포커스 스타일 명확히
|
|
408
|
-
- [ ] 비활성화 상태 구분
|
|
409
|
-
- [ ] 반응형 대응
|