@ceed/ads 1.13.4 → 1.15.0-next.1

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 (70) hide show
  1. package/dist/Overview.md +11 -0
  2. package/dist/components/Menu/Menu.d.ts +2 -5
  3. package/dist/components/Stepper/Stepper.d.ts +6 -0
  4. package/dist/components/data-display/Avatar.md +428 -0
  5. package/dist/components/data-display/Badge.md +315 -0
  6. package/dist/components/data-display/Chip.md +301 -0
  7. package/dist/components/data-display/DataTable.md +452 -0
  8. package/dist/components/data-display/InfoSign.md +160 -0
  9. package/dist/components/data-display/Markdown.md +17 -0
  10. package/dist/components/data-display/Table.md +1330 -0
  11. package/dist/components/data-display/Tooltip.md +444 -0
  12. package/dist/components/data-display/Typography.md +271 -0
  13. package/dist/components/data-display/llms.txt +17 -0
  14. package/dist/components/feedback/Alert.md +663 -0
  15. package/dist/components/feedback/Dialog.md +33 -0
  16. package/dist/components/feedback/Modal.md +39 -0
  17. package/dist/components/feedback/llms.txt +11 -0
  18. package/dist/components/inputs/Autocomplete.md +103 -0
  19. package/dist/components/inputs/Button.md +334 -0
  20. package/dist/components/inputs/ButtonGroup.md +382 -0
  21. package/dist/components/inputs/Calendar.md +19 -0
  22. package/dist/components/inputs/Checkbox.md +649 -0
  23. package/dist/components/inputs/CurrencyInput.md +91 -0
  24. package/dist/components/inputs/DatePicker.md +67 -0
  25. package/dist/components/inputs/DateRangePicker.md +55 -0
  26. package/dist/components/inputs/FilterMenu.md +210 -0
  27. package/dist/components/inputs/IconButton.md +361 -0
  28. package/dist/components/inputs/Input.md +283 -0
  29. package/dist/components/inputs/MonthPicker.md +72 -0
  30. package/dist/components/inputs/MonthRangePicker.md +70 -0
  31. package/dist/components/inputs/PercentageInput.md +116 -0
  32. package/dist/components/inputs/RadioButton.md +350 -0
  33. package/dist/components/inputs/RadioTileGroup.md +418 -0
  34. package/dist/components/inputs/Select.md +56 -0
  35. package/dist/components/inputs/Switch.md +577 -0
  36. package/dist/components/inputs/Textarea.md +64 -0
  37. package/dist/components/inputs/Uploader/Uploader.md +238 -0
  38. package/dist/components/inputs/Uploader/llms.txt +9 -0
  39. package/dist/components/inputs/llms.txt +31 -0
  40. package/dist/components/layout/Box.md +997 -0
  41. package/dist/components/layout/Container.md +23 -0
  42. package/dist/components/layout/Grid.md +728 -0
  43. package/dist/components/layout/Stack.md +937 -0
  44. package/dist/components/layout/llms.txt +12 -0
  45. package/dist/components/llms.txt +14 -0
  46. package/dist/components/navigation/Breadcrumbs.md +51 -0
  47. package/dist/components/navigation/Dropdown.md +768 -0
  48. package/dist/components/navigation/IconMenuButton.md +35 -0
  49. package/dist/components/navigation/InsetDrawer.md +133 -0
  50. package/dist/components/navigation/Link.md +24 -0
  51. package/dist/components/navigation/Menu.md +957 -0
  52. package/dist/components/navigation/MenuButton.md +39 -0
  53. package/dist/components/navigation/NavigationGroup.md +17 -0
  54. package/dist/components/navigation/NavigationItem.md +17 -0
  55. package/dist/components/navigation/Navigator.md +17 -0
  56. package/dist/components/navigation/Pagination.md +17 -0
  57. package/dist/components/navigation/ProfileMenu.md +34 -0
  58. package/dist/components/navigation/Stepper.md +108 -0
  59. package/dist/components/navigation/Tabs.md +34 -0
  60. package/dist/components/navigation/llms.txt +22 -0
  61. package/dist/components/surfaces/Accordions.md +96 -0
  62. package/dist/components/surfaces/Card.md +786 -0
  63. package/dist/components/surfaces/Divider.md +762 -0
  64. package/dist/components/surfaces/Sheet.md +900 -0
  65. package/dist/components/surfaces/llms.txt +12 -0
  66. package/dist/index.cjs +22 -10
  67. package/dist/index.js +22 -10
  68. package/dist/llms.txt +75 -0
  69. package/framer/index.js +36 -36
  70. package/package.json +8 -4
@@ -0,0 +1,937 @@
1
+ # Stack
2
+
3
+ ## Introduction
4
+
5
+ Stack 컴포넌트는 자식 요소들을 하나의 차원(수직 또는 수평)에서 일정한 간격으로 배치하는 레이아웃 컴포넌트입니다. Flexbox를 기반으로 하여 간단하고 직관적인 API로 복잡한 레이아웃을 쉽게 구현할 수 있습니다. 내비게이션 바, 폼 레이아웃, 카드 내부 구조 등 다양한 UI 패턴에서 활용됩니다.
6
+
7
+ ```tsx
8
+ <Stack {...args}>
9
+ <StackItem>첫 번째 아이템</StackItem>
10
+ <StackItem>두 번째 아이템</StackItem>
11
+ <StackItem>세 번째 아이템</StackItem>
12
+ </Stack>
13
+ ```
14
+
15
+ | Field | Description | Default |
16
+ | -------------- | ----------- | -------- |
17
+ | direction | 배치 방향 | "column" |
18
+ | spacing | 요소 간 간격 | 2 |
19
+ | alignItems | 교차축 정렬 | — |
20
+ | justifyContent | 주축 정렬 | — |
21
+
22
+ ## Usage
23
+
24
+ ```tsx
25
+ import { Stack } from '@ceed/ads';
26
+
27
+ function MyComponent() {
28
+ return (
29
+ <Stack spacing={2}>
30
+ <div>첫 번째 아이템</div>
31
+ <div>두 번째 아이템</div>
32
+ <div>세 번째 아이템</div>
33
+ </Stack>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Examples
39
+
40
+ ### Basic Usage
41
+
42
+ 세로(column)와 가로(row) 배치의 기본 사용법입니다.
43
+
44
+ ```tsx
45
+ <div style={{
46
+ display: 'flex',
47
+ gap: '3rem',
48
+ flexWrap: 'wrap'
49
+ }}>
50
+ <div>
51
+ <Typography level="title-md" sx={{
52
+ mb: 2
53
+ }}>
54
+ 세로 스택 (Column)
55
+ </Typography>
56
+ <Stack spacing={2}>
57
+ <StackItem>Item 1</StackItem>
58
+ <StackItem>Item 2</StackItem>
59
+ <StackItem>Item 3</StackItem>
60
+ </Stack>
61
+ </div>
62
+
63
+ <div>
64
+ <Typography level="title-md" sx={{
65
+ mb: 2
66
+ }}>
67
+ 가로 스택 (Row)
68
+ </Typography>
69
+ <Stack direction="row" spacing={2}>
70
+ <StackItem>Item 1</StackItem>
71
+ <StackItem>Item 2</StackItem>
72
+ <StackItem>Item 3</StackItem>
73
+ </Stack>
74
+ </div>
75
+ </div>
76
+ ```
77
+
78
+ ### Directions
79
+
80
+ 다양한 배치 방향을 사용할 수 있습니다.
81
+
82
+ ```tsx
83
+ <div style={{
84
+ display: 'flex',
85
+ flexDirection: 'column',
86
+ gap: '3rem'
87
+ }}>
88
+ <div>
89
+ <Typography level="title-sm" sx={{
90
+ mb: 1
91
+ }}>
92
+ Row (가로)
93
+ </Typography>
94
+ <Stack direction="row" spacing={2}>
95
+ <StackItem>1</StackItem>
96
+ <StackItem>2</StackItem>
97
+ <StackItem>3</StackItem>
98
+ </Stack>
99
+ </div>
100
+
101
+ <div>
102
+ <Typography level="title-sm" sx={{
103
+ mb: 1
104
+ }}>
105
+ Row Reverse (가로 역순)
106
+ </Typography>
107
+ <Stack direction="row-reverse" spacing={2}>
108
+ <StackItem>1</StackItem>
109
+ <StackItem>2</StackItem>
110
+ <StackItem>3</StackItem>
111
+ </Stack>
112
+ </div>
113
+
114
+ <div style={{
115
+ display: 'flex',
116
+ gap: '3rem'
117
+ }}>
118
+ <div>
119
+ <Typography level="title-sm" sx={{
120
+ mb: 1
121
+ }}>
122
+ Column (세로)
123
+ </Typography>
124
+ <Stack direction="column" spacing={2}>
125
+ <StackItem>1</StackItem>
126
+ <StackItem>2</StackItem>
127
+ <StackItem>3</StackItem>
128
+ </Stack>
129
+ </div>
130
+
131
+ <div>
132
+ <Typography level="title-sm" sx={{
133
+ mb: 1
134
+ }}>
135
+ Column Reverse (세로 역순)
136
+ </Typography>
137
+ <Stack direction="column-reverse" spacing={2}>
138
+ <StackItem>1</StackItem>
139
+ <StackItem>2</StackItem>
140
+ <StackItem>3</StackItem>
141
+ </Stack>
142
+ </div>
143
+ </div>
144
+ </div>
145
+ ```
146
+
147
+ ### Different Spacing
148
+
149
+ 다양한 간격을 적용할 수 있습니다.
150
+
151
+ ```tsx
152
+ <div style={{
153
+ display: 'flex',
154
+ flexDirection: 'column',
155
+ gap: '3rem'
156
+ }}>
157
+ <div>
158
+ <Typography level="title-sm" sx={{
159
+ mb: 1
160
+ }}>
161
+ 간격 없음 (spacing=0)
162
+ </Typography>
163
+ <Stack direction="row" spacing={0}>
164
+ <StackItem>Item 1</StackItem>
165
+ <StackItem>Item 2</StackItem>
166
+ <StackItem>Item 3</StackItem>
167
+ </Stack>
168
+ </div>
169
+
170
+ <div>
171
+ <Typography level="title-sm" sx={{
172
+ mb: 1
173
+ }}>
174
+ 작은 간격 (spacing=1)
175
+ </Typography>
176
+ <Stack direction="row" spacing={1}>
177
+ <StackItem>Item 1</StackItem>
178
+ <StackItem>Item 2</StackItem>
179
+ <StackItem>Item 3</StackItem>
180
+ </Stack>
181
+ </div>
182
+
183
+ <div>
184
+ <Typography level="title-sm" sx={{
185
+ mb: 1
186
+ }}>
187
+ 중간 간격 (spacing=2)
188
+ </Typography>
189
+ <Stack direction="row" spacing={2}>
190
+ <StackItem>Item 1</StackItem>
191
+ <StackItem>Item 2</StackItem>
192
+ <StackItem>Item 3</StackItem>
193
+ </Stack>
194
+ </div>
195
+
196
+ <div>
197
+ <Typography level="title-sm" sx={{
198
+ mb: 1
199
+ }}>
200
+ 큰 간격 (spacing=4)
201
+ </Typography>
202
+ <Stack direction="row" spacing={4}>
203
+ <StackItem>Item 1</StackItem>
204
+ <StackItem>Item 2</StackItem>
205
+ <StackItem>Item 3</StackItem>
206
+ </Stack>
207
+ </div>
208
+ </div>
209
+ ```
210
+
211
+ ### Alignment
212
+
213
+ 요소들의 정렬을 다양하게 조절할 수 있습니다.
214
+
215
+ ```tsx
216
+ <div style={{
217
+ display: 'flex',
218
+ flexDirection: 'column',
219
+ gap: '3rem'
220
+ }}>
221
+ <div>
222
+ <Typography level="title-sm" sx={{
223
+ mb: 1
224
+ }}>
225
+ Center Alignment
226
+ </Typography>
227
+ <Stack direction="row" spacing={2} alignItems="center" justifyContent="center" sx={{
228
+ minHeight: 120,
229
+ bgcolor: 'neutral.50',
230
+ borderRadius: 'md',
231
+ p: 2
232
+ }}>
233
+ <StackItem sx={{
234
+ height: 40
235
+ }}>짧은 아이템</StackItem>
236
+ <StackItem sx={{
237
+ height: 80
238
+ }}>중간 아이템</StackItem>
239
+ <StackItem sx={{
240
+ height: 60
241
+ }}>다른 아이템</StackItem>
242
+ </Stack>
243
+ </div>
244
+
245
+ <div>
246
+ <Typography level="title-sm" sx={{
247
+ mb: 1
248
+ }}>
249
+ Space Between
250
+ </Typography>
251
+ <Stack direction="row" spacing={0} justifyContent="space-between" sx={{
252
+ bgcolor: 'neutral.50',
253
+ borderRadius: 'md',
254
+ p: 2
255
+ }}>
256
+ <StackItem>왼쪽</StackItem>
257
+ <StackItem>가운데</StackItem>
258
+ <StackItem>오른쪽</StackItem>
259
+ </Stack>
260
+ </div>
261
+
262
+ <div>
263
+ <Typography level="title-sm" sx={{
264
+ mb: 1
265
+ }}>
266
+ Flex End
267
+ </Typography>
268
+ <Stack direction="row" spacing={2} justifyContent="flex-end" sx={{
269
+ bgcolor: 'neutral.50',
270
+ borderRadius: 'md',
271
+ p: 2
272
+ }}>
273
+ <StackItem>Item 1</StackItem>
274
+ <StackItem>Item 2</StackItem>
275
+ </Stack>
276
+ </div>
277
+ </div>
278
+ ```
279
+
280
+ ### Responsive Direction
281
+
282
+ 화면 크기에 따라 배치 방향을 변경할 수 있습니다.
283
+
284
+ ```tsx
285
+ <div>
286
+ <Typography level="title-md" sx={{
287
+ mb: 2
288
+ }}>
289
+ 반응형 방향 (화면 크기에 따라 세로↔가로 전환)
290
+ </Typography>
291
+ <Stack direction={{
292
+ xs: 'column',
293
+ sm: 'row'
294
+ }} spacing={2} sx={{
295
+ p: 2,
296
+ bgcolor: 'background.level1',
297
+ borderRadius: 'md'
298
+ }}>
299
+ <Box sx={{
300
+ flex: 1,
301
+ p: 2,
302
+ bgcolor: 'primary.100',
303
+ borderRadius: 'sm'
304
+ }}>
305
+ <Typography level="body-sm">
306
+ 작은 화면: 세로 배치
307
+ <br />큰 화면: 가로 배치
308
+ </Typography>
309
+ </Box>
310
+ <Box sx={{
311
+ flex: 1,
312
+ p: 2,
313
+ bgcolor: 'success.100',
314
+ borderRadius: 'sm'
315
+ }}>
316
+ <Typography level="body-sm">
317
+ 반응형 레이아웃으로
318
+ <br />
319
+ 자동 조정됩니다
320
+ </Typography>
321
+ </Box>
322
+ <Box sx={{
323
+ flex: 1,
324
+ p: 2,
325
+ bgcolor: 'warning.100',
326
+ borderRadius: 'sm'
327
+ }}>
328
+ <Typography level="body-sm">
329
+ 브라우저 크기를
330
+ <br />
331
+ 조절해보세요
332
+ </Typography>
333
+ </Box>
334
+ </Stack>
335
+ </div>
336
+ ```
337
+
338
+ ### Nested Stacks
339
+
340
+ Stack을 중첩하여 더 복잡한 레이아웃을 만들 수 있습니다.
341
+
342
+ ```tsx
343
+ <div>
344
+ <Typography level="title-md" sx={{
345
+ mb: 2
346
+ }}>
347
+ 중첩된 스택
348
+ </Typography>
349
+ <Stack spacing={3}>
350
+ <Box sx={{
351
+ p: 2,
352
+ bgcolor: 'primary.50',
353
+ borderRadius: 'md'
354
+ }}>
355
+ <Typography level="title-sm" sx={{
356
+ mb: 2
357
+ }}>
358
+ 세로 스택 안의 가로 스택
359
+ </Typography>
360
+ <Stack direction="row" spacing={2}>
361
+ <StackItem sx={{
362
+ bgcolor: 'primary.200'
363
+ }}>Item 1</StackItem>
364
+ <StackItem sx={{
365
+ bgcolor: 'primary.200'
366
+ }}>Item 2</StackItem>
367
+ <StackItem sx={{
368
+ bgcolor: 'primary.200'
369
+ }}>Item 3</StackItem>
370
+ </Stack>
371
+ </Box>
372
+
373
+ <Box sx={{
374
+ p: 2,
375
+ bgcolor: 'success.50',
376
+ borderRadius: 'md'
377
+ }}>
378
+ <Typography level="title-sm" sx={{
379
+ mb: 2
380
+ }}>
381
+ 또 다른 가로 스택
382
+ </Typography>
383
+ <Stack direction="row" spacing={2} justifyContent="center">
384
+ <StackItem sx={{
385
+ bgcolor: 'success.200'
386
+ }}>중앙</StackItem>
387
+ <StackItem sx={{
388
+ bgcolor: 'success.200'
389
+ }}>정렬</StackItem>
390
+ </Stack>
391
+ </Box>
392
+ </Stack>
393
+ </div>
394
+ ```
395
+
396
+ ### Real World Examples
397
+
398
+ 실제 사용 사례를 보여주는 예제들입니다.
399
+
400
+ ```tsx
401
+ <div style={{
402
+ display: 'flex',
403
+ flexDirection: 'column',
404
+ gap: '3rem',
405
+ maxWidth: 600
406
+ }}>
407
+ {/* Navigation Bar */}
408
+ <div>
409
+ <Typography level="title-sm" sx={{
410
+ mb: 2
411
+ }}>
412
+ 내비게이션 바
413
+ </Typography>
414
+ <Stack direction="row" spacing={0} justifyContent="space-between" alignItems="center" sx={{
415
+ p: 2,
416
+ bgcolor: 'background.body',
417
+ border: '1px solid',
418
+ borderColor: 'divider',
419
+ borderRadius: 'md'
420
+ }}>
421
+ <Typography level="title-md">로고</Typography>
422
+ <Stack direction="row" spacing={2}>
423
+ <Button variant="plain" size="sm">
424
+
425
+ </Button>
426
+ <Button variant="plain" size="sm">
427
+ 소개
428
+ </Button>
429
+ <Button variant="plain" size="sm">
430
+ 연락처
431
+ </Button>
432
+ </Stack>
433
+ <Button size="sm">로그인</Button>
434
+ </Stack>
435
+ </div>
436
+
437
+ {/* Profile Card */}
438
+ <div>
439
+ <Typography level="title-sm" sx={{
440
+ mb: 2
441
+ }}>
442
+ 프로필 카드
443
+ </Typography>
444
+ <Box sx={{
445
+ p: 3,
446
+ bgcolor: 'background.body',
447
+ border: '1px solid',
448
+ borderColor: 'divider',
449
+ borderRadius: 'lg'
450
+ }}>
451
+ <Stack spacing={2}>
452
+ <Stack direction="row" spacing={2} alignItems="center">
453
+ <Avatar size="lg" />
454
+ <Stack spacing={0.5}>
455
+ <Typography level="title-md">홍길동</Typography>
456
+ <Typography level="body-sm" sx={{
457
+ color: 'text.secondary'
458
+ }}>
459
+ 프론트엔드 개발자
460
+ </Typography>
461
+ </Stack>
462
+ </Stack>
463
+
464
+ <Typography level="body-md">
465
+ 사용자 경험을 중시하는 프론트엔드 개발자입니다. React와 TypeScript를 주로 사용합니다.
466
+ </Typography>
467
+
468
+ <Stack direction="row" spacing={1}>
469
+ <Chip size="sm" variant="soft">
470
+ React
471
+ </Chip>
472
+ <Chip size="sm" variant="soft">
473
+ TypeScript
474
+ </Chip>
475
+ <Chip size="sm" variant="soft">
476
+ Next.js
477
+ </Chip>
478
+ </Stack>
479
+
480
+ <Stack direction="row" spacing={1} justifyContent="flex-end">
481
+ <Button size="sm" variant="outlined" startDecorator={<BookmarkIcon />}>
482
+ 저장
483
+ </Button>
484
+ <Button size="sm" variant="outlined" startDecorator={<ShareIcon />}>
485
+ 공유
486
+ </Button>
487
+ </Stack>
488
+ </Stack>
489
+ </Box>
490
+ </div>
491
+
492
+ {/* Article Card */}
493
+ <div>
494
+ <Typography level="title-sm" sx={{
495
+ mb: 2
496
+ }}>
497
+ 아티클 카드
498
+ </Typography>
499
+ <Box sx={{
500
+ p: 3,
501
+ bgcolor: 'background.body',
502
+ border: '1px solid',
503
+ borderColor: 'divider',
504
+ borderRadius: 'lg'
505
+ }}>
506
+ <Stack spacing={2}>
507
+ <Stack direction="row" justifyContent="space-between" alignItems="flex-start">
508
+ <Stack spacing={1}>
509
+ <Typography level="title-lg">React 18의 새로운 기능들</Typography>
510
+ <Typography level="body-sm" sx={{
511
+ color: 'text.secondary'
512
+ }}>
513
+ 2024년 1월 15일 • 5분 읽기
514
+ </Typography>
515
+ </Stack>
516
+ <Button variant="plain" size="sm" sx={{
517
+ color: 'warning.500'
518
+ }}>
519
+ <StarIcon />
520
+ </Button>
521
+ </Stack>
522
+
523
+ <Typography level="body-md">
524
+ React 18에서 도입된 Concurrent Features와 새로운 Hooks에 대해 자세히 알아보겠습니다. Suspense,
525
+ useTransition, useDeferredValue 등...
526
+ </Typography>
527
+
528
+ <Stack direction="row" spacing={1}>
529
+ <Chip size="sm" variant="outlined">
530
+ React
531
+ </Chip>
532
+ <Chip size="sm" variant="outlined">
533
+ JavaScript
534
+ </Chip>
535
+ <Chip size="sm" variant="outlined">
536
+ 개발
537
+ </Chip>
538
+ </Stack>
539
+
540
+ <Stack direction="row" justifyContent="space-between" alignItems="center">
541
+ <Stack direction="row" spacing={1} alignItems="center">
542
+ <Avatar size="sm" />
543
+ <Typography level="body-sm">김개발</Typography>
544
+ </Stack>
545
+ <Stack direction="row" spacing={1}>
546
+ <Button size="sm" variant="plain">
547
+ 좋아요 24
548
+ </Button>
549
+ <Button size="sm" variant="plain">
550
+ 댓글 5
551
+ </Button>
552
+ </Stack>
553
+ </Stack>
554
+ </Stack>
555
+ </Box>
556
+ </div>
557
+
558
+ {/* Form Layout */}
559
+ <div>
560
+ <Typography level="title-sm" sx={{
561
+ mb: 2
562
+ }}>
563
+ 폼 레이아웃
564
+ </Typography>
565
+ <Box sx={{
566
+ p: 3,
567
+ bgcolor: 'background.body',
568
+ border: '1px solid',
569
+ borderColor: 'divider',
570
+ borderRadius: 'lg'
571
+ }}>
572
+ <Stack spacing={3}>
573
+ <Typography level="title-md">문의하기</Typography>
574
+
575
+ <Stack spacing={2}>
576
+ <Stack spacing={1}>
577
+ <Typography level="body-sm" fontWeight="500">
578
+ 이름
579
+ </Typography>
580
+ <Box sx={{
581
+ p: 1.5,
582
+ bgcolor: 'background.level1',
583
+ borderRadius: 'sm'
584
+ }}>
585
+ <Typography level="body-sm" sx={{
586
+ color: 'text.secondary'
587
+ }}>
588
+ 이름을 입력하세요
589
+ </Typography>
590
+ </Box>
591
+ </Stack>
592
+
593
+ <Stack spacing={1}>
594
+ <Typography level="body-sm" fontWeight="500">
595
+ 이메일
596
+ </Typography>
597
+ <Box sx={{
598
+ p: 1.5,
599
+ bgcolor: 'background.level1',
600
+ borderRadius: 'sm'
601
+ }}>
602
+ <Typography level="body-sm" sx={{
603
+ color: 'text.secondary'
604
+ }}>
605
+ 이메일을 입력하세요
606
+ </Typography>
607
+ </Box>
608
+ </Stack>
609
+
610
+ <Stack spacing={1}>
611
+ <Typography level="body-sm" fontWeight="500">
612
+ 메시지
613
+ </Typography>
614
+ <Box sx={{
615
+ p: 1.5,
616
+ minHeight: 80,
617
+ bgcolor: 'background.level1',
618
+ borderRadius: 'sm'
619
+ }}>
620
+ <Typography level="body-sm" sx={{
621
+ color: 'text.secondary'
622
+ }}>
623
+ 메시지를 입력하세요
624
+ </Typography>
625
+ </Box>
626
+ </Stack>
627
+ </Stack>
628
+
629
+ <Stack direction="row" spacing={2} justifyContent="flex-end">
630
+ <Button variant="outlined">취소</Button>
631
+ <Button>전송</Button>
632
+ </Stack>
633
+ </Stack>
634
+ </Box>
635
+ </div>
636
+ </div>
637
+ ```
638
+
639
+ ## Key Props
640
+
641
+ ### direction
642
+
643
+ 요소들의 배치 방향을 설정합니다.
644
+
645
+ ```tsx
646
+ <Stack direction="row">가로 배치</Stack>
647
+ <Stack direction="column">세로 배치</Stack>
648
+ <Stack direction="row-reverse">가로 역순</Stack>
649
+ <Stack direction="column-reverse">세로 역순</Stack>
650
+
651
+ // 반응형 방향
652
+ <Stack direction={{ xs: 'column', sm: 'row' }}>
653
+ 반응형 배치
654
+ </Stack>
655
+ ```
656
+
657
+ ### spacing
658
+
659
+ 요소들 간의 간격을 설정합니다.
660
+
661
+ | 값 | 크기 | 설명 |
662
+ | ----- | ---- | ----------- |
663
+ | `0` | 0px | 간격 없음 |
664
+ | `0.5` | 4px | 아주 작은 간격 |
665
+ | `1` | 8px | 작은 간격 |
666
+ | `1.5` | 12px | 작은-중간 간격 |
667
+ | `2` | 16px | 중간 간격 (기본값) |
668
+ | `3` | 24px | 큰 간격 |
669
+ | `4` | 32px | 아주 큰 간격 |
670
+ | `5` | 40px | 매우 큰 간격 |
671
+ | `6` | 48px | 최대 간격 |
672
+
673
+ ```tsx
674
+ <Stack spacing={2}>기본 간격</Stack>
675
+ <Stack spacing={0}>간격 없음</Stack>
676
+ <Stack spacing={4}>큰 간격</Stack>
677
+
678
+ // 반응형 간격
679
+ <Stack spacing={{ xs: 1, sm: 2, md: 3 }}>
680
+ 반응형 간격
681
+ </Stack>
682
+ ```
683
+
684
+ ### alignItems
685
+
686
+ 교차축(cross axis) 정렬을 설정합니다.
687
+
688
+ ```tsx
689
+ <Stack alignItems="center">중앙 정렬</Stack>
690
+ <Stack alignItems="flex-start">시작점 정렬</Stack>
691
+ <Stack alignItems="flex-end">끝점 정렬</Stack>
692
+ <Stack alignItems="stretch">늘이기</Stack>
693
+ <Stack alignItems="baseline">베이스라인 정렬</Stack>
694
+ ```
695
+
696
+ ### justifyContent
697
+
698
+ 주축(main axis) 정렬을 설정합니다.
699
+
700
+ ```tsx
701
+ <Stack justifyContent="center">중앙 정렬</Stack>
702
+ <Stack justifyContent="space-between">양끝 정렬</Stack>
703
+ <Stack justifyContent="space-around">균등 분할</Stack>
704
+ <Stack justifyContent="space-evenly">균등 간격</Stack>
705
+ <Stack justifyContent="flex-end">끝점 정렬</Stack>
706
+ ```
707
+
708
+ ## Responsive Behavior
709
+
710
+ Stack은 모든 props에서 반응형 값을 지원합니다:
711
+
712
+ ```tsx
713
+ <Stack
714
+ direction={{ xs: 'column', md: 'row' }}
715
+ spacing={{ xs: 1, sm: 2, md: 3 }}
716
+ alignItems={{ xs: 'stretch', md: 'center' }}
717
+ >
718
+ {/* 화면 크기별로 다른 레이아웃 */}
719
+ </Stack>
720
+ ```
721
+
722
+ ## Common Use Cases
723
+
724
+ ### Navigation Bar
725
+
726
+ ```tsx
727
+ <Stack
728
+ direction="row"
729
+ justifyContent="space-between"
730
+ alignItems="center"
731
+ sx={{ p: 2 }}
732
+ >
733
+ <Typography level="title-lg">Logo</Typography>
734
+ <Stack direction="row" spacing={2}>
735
+ <Button variant="plain">Home</Button>
736
+ <Button variant="plain">About</Button>
737
+ <Button variant="plain">Contact</Button>
738
+ </Stack>
739
+ <Button>Login</Button>
740
+ </Stack>
741
+ ```
742
+
743
+ ### Form Layout
744
+
745
+ ```tsx
746
+ <Stack spacing={3}>
747
+ <Typography level="title-lg">Contact Form</Typography>
748
+
749
+ <Stack spacing={2}>
750
+ <FormControl>
751
+ <FormLabel>Name</FormLabel>
752
+ <Input placeholder="Enter your name" />
753
+ </FormControl>
754
+
755
+ <FormControl>
756
+ <FormLabel>Email</FormLabel>
757
+ <Input type="email" placeholder="Enter your email" />
758
+ </FormControl>
759
+
760
+ <FormControl>
761
+ <FormLabel>Message</FormLabel>
762
+ <Textarea placeholder="Enter your message" minRows={3} />
763
+ </FormControl>
764
+ </Stack>
765
+
766
+ <Stack direction="row" spacing={2} justifyContent="flex-end">
767
+ <Button variant="outlined">Cancel</Button>
768
+ <Button>Send</Button>
769
+ </Stack>
770
+ </Stack>
771
+ ```
772
+
773
+ ### Card Content
774
+
775
+ ```tsx
776
+ <Card sx={{ maxWidth: 400 }}>
777
+ <CardContent>
778
+ <Stack spacing={2}>
779
+ <Stack direction="row" justifyContent="space-between" alignItems="center">
780
+ <Typography level="title-lg">Product Name</Typography>
781
+ <Chip variant="soft">New</Chip>
782
+ </Stack>
783
+
784
+ <Typography level="body-md">
785
+ Product description goes here...
786
+ </Typography>
787
+
788
+ <Stack direction="row" spacing={1}>
789
+ <Chip size="sm" variant="outlined">Tag 1</Chip>
790
+ <Chip size="sm" variant="outlined">Tag 2</Chip>
791
+ </Stack>
792
+
793
+ <Stack direction="row" justifyContent="space-between" alignItems="center">
794
+ <Typography level="title-lg" color="primary">$99.99</Typography>
795
+ <Button>Add to Cart</Button>
796
+ </Stack>
797
+ </Stack>
798
+ </CardContent>
799
+ </Card>
800
+ ```
801
+
802
+ ### User Profile
803
+
804
+ ```tsx
805
+ <Stack spacing={3}>
806
+ <Stack direction="row" spacing={2} alignItems="center">
807
+ <Avatar size="lg" src="/avatar.jpg" />
808
+ <Stack>
809
+ <Typography level="title-lg">John Doe</Typography>
810
+ <Typography level="body-sm" color="neutral">
811
+ Frontend Developer
812
+ </Typography>
813
+ </Stack>
814
+ </Stack>
815
+
816
+ <Typography level="body-md">
817
+ Passionate about creating great user experiences...
818
+ </Typography>
819
+
820
+ <Stack direction="row" spacing={1}>
821
+ <Chip variant="soft">React</Chip>
822
+ <Chip variant="soft">TypeScript</Chip>
823
+ <Chip variant="soft">Next.js</Chip>
824
+ </Stack>
825
+
826
+ <Stack direction="row" spacing={2}>
827
+ <Button variant="outlined" fullWidth>Follow</Button>
828
+ <Button fullWidth>Message</Button>
829
+ </Stack>
830
+ </Stack>
831
+ ```
832
+
833
+ ### List Layout
834
+
835
+ ```tsx
836
+ <Stack spacing={2}>
837
+ {items.map((item) => (
838
+ <Stack
839
+ key={item.id}
840
+ direction="row"
841
+ spacing={2}
842
+ alignItems="center"
843
+ sx={{
844
+ p: 2,
845
+ bgcolor: 'background.level1',
846
+ borderRadius: 'md',
847
+ }}
848
+ >
849
+ <Avatar src={item.avatar} />
850
+ <Stack sx={{ flex: 1 }}>
851
+ <Typography level="title-sm">{item.name}</Typography>
852
+ <Typography level="body-xs" color="neutral">
853
+ {item.description}
854
+ </Typography>
855
+ </Stack>
856
+ <Typography level="body-xs" color="neutral">
857
+ {item.time}
858
+ </Typography>
859
+ </Stack>
860
+ ))}
861
+ </Stack>
862
+ ```
863
+
864
+ ### Button Group
865
+
866
+ ```tsx
867
+ <Stack direction="row" spacing={1}>
868
+ <Button variant="outlined">Cancel</Button>
869
+ <Button variant="outlined">Save Draft</Button>
870
+ <Button>Publish</Button>
871
+ </Stack>
872
+
873
+ <Stack direction="row" spacing={0} sx={{ border: '1px solid', borderColor: 'divider', borderRadius: 'sm' }}>
874
+ <Button variant="plain" sx={{ borderRadius: 0, borderRight: '1px solid', borderColor: 'divider' }}>
875
+ Bold
876
+ </Button>
877
+ <Button variant="plain" sx={{ borderRadius: 0, borderRight: '1px solid', borderColor: 'divider' }}>
878
+ Italic
879
+ </Button>
880
+ <Button variant="plain" sx={{ borderRadius: 0 }}>
881
+ Underline
882
+ </Button>
883
+ </Stack>
884
+ ```
885
+
886
+ ## Best Practices
887
+
888
+ 1. **적절한 간격**: 콘텐츠의 계층구조에 맞는 적절한 spacing을 선택하세요.
889
+
890
+ 2. **반응형 고려**: 다양한 화면 크기에서 잘 작동하도록 반응형 props를 활용하세요.
891
+
892
+ 3. **의미있는 정렬**: alignItems와 justifyContent를 사용해 의미있는 정렬을 적용하세요.
893
+
894
+ 4. **중첩 최소화**: 과도한 중첩은 피하고, 필요한 경우에만 Stack을 중첩하세요.
895
+
896
+ 5. **성능 고려**: 많은 아이템이 있는 경우 가상화를 고려하세요.
897
+
898
+ 6. **접근성**:
899
+ - 논리적인 탭 순서가 되도록 요소를 배치하세요
900
+ - 적절한 시맨틱 태그와 함께 사용하세요
901
+
902
+ 7. **일관성**: 프로젝트 전반에서 일관된 spacing 값을 사용하세요.
903
+
904
+ ## When to Use Stack vs Other Layout Components
905
+
906
+ ### Stack vs Flexbox (Box)
907
+
908
+ - **Stack**: 단순한 1차원 레이아웃, 일정한 간격이 필요한 경우
909
+ - **Box with flex**: 복잡한 flexbox 속성이 필요한 경우
910
+
911
+ ### Stack vs Grid
912
+
913
+ - **Stack**: 1차원 레이아웃 (세로 또는 가로)
914
+ - **Grid**: 2차원 레이아웃 (행과 열)
915
+
916
+ ### Stack vs Space (if available)
917
+
918
+ - **Stack**: 컨테이너와 간격을 함께 제공
919
+ - **Space**: 간격만 제공 (자식들 사이에)
920
+
921
+ ## Troubleshooting
922
+
923
+ ### 흔한 문제들
924
+
925
+ 1. **간격이 적용되지 않음**
926
+ - 자식 요소들이 직접적인 자식인지 확인하세요
927
+ - Fragment나 다른 래퍼가 방해하지 않는지 확인하세요
928
+
929
+ 2. **정렬이 예상과 다름**
930
+ - direction에 따라 주축과 교차축이 바뀐다는 점을 기억하세요
931
+ - alignItems와 justifyContent의 차이를 이해하세요
932
+
933
+ 3. **반응형이 동작하지 않음**
934
+ - 객체 문법 `{ xs: 'column', md: 'row' }`가 올바른지 확인하세요
935
+ - 브레이크포인트 값이 올바른지 확인하세요
936
+
937
+ Stack은 직관적이고 강력한 레이아웃 도구입니다. 간단한 API로 복잡한 레이아웃을 쉽게 구현할 수 있어 많은 UI 패턴에서 활용됩니다.