@ceed/cds 1.29.0 → 1.29.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 (53) hide show
  1. package/dist/Overview.md +5 -5
  2. package/dist/components/data-display/Avatar.md +110 -69
  3. package/dist/components/data-display/Badge.md +91 -39
  4. package/dist/components/data-display/Chip.md +49 -20
  5. package/dist/components/data-display/DataTable.md +93 -0
  6. package/dist/components/data-display/InfoSign.md +12 -0
  7. package/dist/components/data-display/Table.md +72 -55
  8. package/dist/components/data-display/Tooltip.md +40 -40
  9. package/dist/components/data-display/Typography.md +53 -70
  10. package/dist/components/feedback/Alert.md +88 -72
  11. package/dist/components/feedback/CircularProgress.md +17 -0
  12. package/dist/components/feedback/Skeleton.md +17 -0
  13. package/dist/components/inputs/Button.md +94 -68
  14. package/dist/components/inputs/ButtonGroup.md +17 -0
  15. package/dist/components/inputs/Calendar.md +118 -457
  16. package/dist/components/inputs/Checkbox.md +185 -430
  17. package/dist/components/inputs/CurrencyInput.md +22 -0
  18. package/dist/components/inputs/DatePicker.md +36 -0
  19. package/dist/components/inputs/DateRangePicker.md +26 -0
  20. package/dist/components/inputs/FilterableCheckboxGroup.md +20 -3
  21. package/dist/components/inputs/FormControl.md +32 -2
  22. package/dist/components/inputs/IconButton.md +18 -0
  23. package/dist/components/inputs/Input.md +198 -136
  24. package/dist/components/inputs/MonthPicker.md +25 -0
  25. package/dist/components/inputs/MonthRangePicker.md +23 -0
  26. package/dist/components/inputs/PercentageInput.md +25 -0
  27. package/dist/components/inputs/RadioButton.md +23 -0
  28. package/dist/components/inputs/RadioList.md +20 -1
  29. package/dist/components/inputs/RadioTileGroup.md +37 -3
  30. package/dist/components/inputs/Select.md +56 -0
  31. package/dist/components/inputs/Slider.md +23 -0
  32. package/dist/components/inputs/Switch.md +20 -0
  33. package/dist/components/inputs/Textarea.md +32 -8
  34. package/dist/components/inputs/Uploader/Uploader.md +21 -0
  35. package/dist/components/layout/Box.md +52 -41
  36. package/dist/components/layout/Grid.md +87 -81
  37. package/dist/components/layout/Stack.md +88 -68
  38. package/dist/components/navigation/Breadcrumbs.md +57 -46
  39. package/dist/components/navigation/Drawer.md +17 -0
  40. package/dist/components/navigation/Dropdown.md +13 -0
  41. package/dist/components/navigation/IconMenuButton.md +17 -0
  42. package/dist/components/navigation/InsetDrawer.md +130 -292
  43. package/dist/components/navigation/Link.md +78 -0
  44. package/dist/components/navigation/Menu.md +17 -0
  45. package/dist/components/navigation/MenuButton.md +18 -0
  46. package/dist/components/navigation/Pagination.md +13 -0
  47. package/dist/components/navigation/Stepper.md +15 -0
  48. package/dist/components/navigation/Tabs.md +27 -0
  49. package/dist/components/surfaces/Accordions.md +804 -49
  50. package/dist/components/surfaces/Card.md +173 -97
  51. package/dist/components/surfaces/Divider.md +246 -82
  52. package/dist/components/surfaces/Sheet.md +15 -0
  53. package/package.json +1 -1
package/dist/Overview.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # CDS (Customer Design System)
2
2
 
3
- CDS Customer Design System 약자로, 유려한 UI를 중심으로 두는 시스템으로 개발되었습니다. 시스템은 사용자 친화적인 경험을 제공하고, 개발 디자인 프로세스를 효율화하기 위해 제작되었습니다.
3
+ CDS stands for Customer Design System, and it was developed as a system centered around polished UI. It was created to provide a user-friendly experience and streamline development and design processes.
4
4
 
5
- 디자인시스템은 [JoyUI](https://mui.com/joy-ui/getting-started/) 기반으로 하므로 대부분 [JoyUI](https://mui.com/joy-ui/getting-started/) 문서를 참고할 있지만, 일부 컴포넌트는 추상화 레이어가 추가되어 인터페이스가 다를 있습니다.
5
+ This design system is built on [JoyUI](https://mui.com/joy-ui/getting-started/), so you can refer to the [JoyUI](https://mui.com/joy-ui/getting-started/) documentation for most cases, although some components may have different interfaces due to added abstraction layers.
6
6
 
7
- 데이터 중심보다는 시각적이고 직관적인 UI를 목적으로 이름이 지어졌으며 주로 고객이 사용하는 UI에 적용됩니다.
7
+ It is named for UIs that prioritize visual and intuitive experiences over data-centric interfaces, and it is mainly applied to customer-facing UI.
8
8
 
9
- ## 문서 가이드
9
+ ## Documentation and Guides
10
10
 
11
- CDS 대한 자세한 내용은 [Design System 문서](https://ecubelabs.atlassian.net/wiki/spaces/HP/pages/3256123430/Design+System)를 참조하세요.
11
+ For more information about CDS, refer to the [Design System documentation](https://ecubelabs.atlassian.net/wiki/spaces/HP/pages/3256123430/Design+System).
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Avatar 컴포넌트는 사용자의 프로필 이미지, 이니셜 또는 아이콘을 표시하는 컴포넌트입니다. Joy UI Avatar 기반으로 하며, 다양한 크기, 색상, 변형을 지원합니다. 사용자 인터페이스에서 개인을 시각적으로 나타내거나 그룹, 브랜드를 표현하는 사용됩니다.
5
+ The Avatar component displays a user's profile image, initials, or icon. It is based on Joy UI Avatar and supports various sizes, colors, and variants. It is used to visually represent individuals, groups, or brands in a user interface.
6
6
 
7
7
  ```tsx
8
8
  <Avatar alt="User avatar" />
@@ -25,13 +25,13 @@ import { Avatar } from '@ceed/cds';
25
25
  function MyComponent() {
26
26
  return (
27
27
  <div>
28
- {/* 이미지가 있는 아바타 */}
28
+ {/* Avatar with an image */}
29
29
  <Avatar src="/path/to/image.jpg" alt="사용자 이름" />
30
30
 
31
- {/* 이니셜 아바타 */}
31
+ {/* Initials avatar */}
32
32
  <Avatar>김철수</Avatar>
33
33
 
34
- {/* 단일 문자 아바타 */}
34
+ {/* Single-character avatar */}
35
35
  <Avatar>김</Avatar>
36
36
  </div>
37
37
  );
@@ -42,7 +42,7 @@ function MyComponent() {
42
42
 
43
43
  ### Basic Usage
44
44
 
45
- 가장 기본적인 Avatar 사용법입니다.
45
+ The most basic Avatar usage.
46
46
 
47
47
  ```tsx
48
48
  <Avatar alt="User avatar" />
@@ -50,7 +50,7 @@ function MyComponent() {
50
50
 
51
51
  ### With Image
52
52
 
53
- 이미지를 사용한 아바타입니다.
53
+ An avatar that uses an image.
54
54
 
55
55
  ```tsx
56
56
  <Stack direction="row" spacing={2} alignItems="center">
@@ -60,7 +60,7 @@ function MyComponent() {
60
60
 
61
61
  ### With Text
62
62
 
63
- 텍스트나 이니셜을 사용한 아바타입니다.
63
+ An avatar that uses text or initials.
64
64
 
65
65
  ```tsx
66
66
  <Stack direction="row" spacing={2} alignItems="center">
@@ -72,7 +72,7 @@ function MyComponent() {
72
72
 
73
73
  ### Variants
74
74
 
75
- 다양한 시각적 스타일을 적용할 있습니다.
75
+ You can apply various visual styles.
76
76
 
77
77
  ```tsx
78
78
  <Stack direction="row" spacing={2} alignItems="center">
@@ -80,14 +80,14 @@ function MyComponent() {
80
80
  </Stack>
81
81
  ```
82
82
 
83
- - **solid**: 배경색이 채워진 스타일
84
- - **soft**: 부드러운 배경색 스타일
85
- - **outlined**: 테두리만 있는 스타일
86
- - **plain**: 최소한의 스타일
83
+ - **solid**: A style with a filled background color
84
+ - **soft**: A style with a soft background color
85
+ - **outlined**: A style with only a border
86
+ - **plain**: A minimal style
87
87
 
88
88
  ### Sizes
89
89
 
90
- 다양한 크기의 아바타를 사용할 있습니다.
90
+ You can use avatars in various sizes.
91
91
 
92
92
  ```tsx
93
93
  <Stack direction="row" spacing={2} alignItems="center">
@@ -97,14 +97,14 @@ function MyComponent() {
97
97
  </Stack>
98
98
  ```
99
99
 
100
- - **xs**: 매우 작은 크기 (16px)
101
- - **sm**: 작은 크기 (24px)
102
- - **md**: 중간 크기 (32px, 기본값)
103
- - **lg**: 크기 (40px)
100
+ - **xs**: Extra small size (16px)
101
+ - **sm**: Small size (24px)
102
+ - **md**: Medium size (32px, default)
103
+ - **lg**: Large size (40px)
104
104
 
105
105
  ### Colors
106
106
 
107
- 다양한 색상 테마를 적용할 있습니다.
107
+ You can apply various color themes.
108
108
 
109
109
  ```tsx
110
110
  <Stack direction="row" spacing={2} alignItems="center">
@@ -112,15 +112,15 @@ function MyComponent() {
112
112
  </Stack>
113
113
  ```
114
114
 
115
- - **primary**: 주요 브랜드 색상
116
- - **neutral**: 중립적인 회색톤
117
- - **danger**: 경고나 오류를 나타내는 빨간색
118
- - **success**: 성공을 나타내는 녹색
119
- - **warning**: 주의를 나타내는 주황색
115
+ - **primary**: Primary brand color
116
+ - **neutral**: Neutral gray tone
117
+ - **danger**: Red for warnings or errors
118
+ - **success**: Green for success
119
+ - **warning**: Orange for caution
120
120
 
121
121
  ### All Combinations
122
122
 
123
- 모든 변형, 크기, 색상 조합을 확인할 있습니다.
123
+ You can review all variant, size, and color combinations.
124
124
 
125
125
  ```tsx
126
126
  <Stack gap={8}>
@@ -150,11 +150,15 @@ function MyComponent() {
150
150
 
151
151
  ### User Profile
152
152
 
153
- 사용자 프로필에서 아바타를 사용하는 경우입니다.
153
+ An example of using an avatar in a user profile.
154
154
 
155
155
  ```tsx
156
156
  <Stack direction="row" spacing={2} alignItems="center">
157
- <Avatar src="/user-profile.jpg" alt="김철수" size="lg" />
157
+ <Avatar
158
+ src="/user-profile.jpg"
159
+ alt="김철수"
160
+ size="lg"
161
+ />
158
162
  <Stack>
159
163
  <Typography level="title-md">김철수</Typography>
160
164
  <Typography level="body-sm" color="neutral">
@@ -166,7 +170,7 @@ function MyComponent() {
166
170
 
167
171
  ### Navigation Bar
168
172
 
169
- 네비게이션 바에서 현재 사용자를 표시할 사용합니다.
173
+ Used to display the current user in a navigation bar.
170
174
 
171
175
  ```tsx
172
176
  <Stack direction="row" spacing={2} alignItems="center" sx={{ ml: 'auto' }}>
@@ -182,7 +186,7 @@ function MyComponent() {
182
186
 
183
187
  ### Comment System
184
188
 
185
- 댓글이나 피드에서 사용자를 나타낼 사용합니다.
189
+ Used to represent a user in comments or feeds.
186
190
 
187
191
  ```tsx
188
192
  <Stack direction="row" spacing={2}>
@@ -196,14 +200,16 @@ function MyComponent() {
196
200
  2시간 전
197
201
  </Typography>
198
202
  </Stack>
199
- <Typography level="body-md">이것은 사용자의 댓글 내용입니다.</Typography>
203
+ <Typography level="body-md">
204
+ 이것은 사용자의 댓글 내용입니다.
205
+ </Typography>
200
206
  </Stack>
201
207
  </Stack>
202
208
  ```
203
209
 
204
210
  ### Team Members
205
211
 
206
- 구성원 목록을 표시할 사용합니다.
212
+ Used to display a list of team members.
207
213
 
208
214
  ```tsx
209
215
  <Stack spacing={3}>
@@ -211,7 +217,13 @@ function MyComponent() {
211
217
 
212
218
  {teamMembers.map((member) => (
213
219
  <Stack key={member.id} direction="row" spacing={2} alignItems="center">
214
- <Avatar src={member.avatar} alt={member.name} size="md" variant="soft" color="primary">
220
+ <Avatar
221
+ src={member.avatar}
222
+ alt={member.name}
223
+ size="md"
224
+ variant="soft"
225
+ color="primary"
226
+ >
215
227
  {member.name.charAt(0)}
216
228
  </Avatar>
217
229
  <Stack flex={1}>
@@ -230,19 +242,13 @@ function MyComponent() {
230
242
 
231
243
  ### Avatar Groups
232
244
 
233
- 여러 사용자를 그룹으로 표시할 사용합니다.
245
+ Used to display multiple users as a group.
234
246
 
235
247
  ```tsx
236
248
  <Stack direction="row" spacing={-1}>
237
- <Avatar size="sm" variant="solid" color="primary">
238
-
239
- </Avatar>
240
- <Avatar size="sm" variant="solid" color="success">
241
-
242
- </Avatar>
243
- <Avatar size="sm" variant="solid" color="warning">
244
-
245
- </Avatar>
249
+ <Avatar size="sm" variant="solid" color="primary">김</Avatar>
250
+ <Avatar size="sm" variant="solid" color="success">이</Avatar>
251
+ <Avatar size="sm" variant="solid" color="warning">박</Avatar>
246
252
  <Avatar size="sm" variant="outlined" color="neutral">
247
253
  <Typography level="body-xs">+3</Typography>
248
254
  </Avatar>
@@ -251,7 +257,7 @@ function MyComponent() {
251
257
 
252
258
  ### Status Indicators
253
259
 
254
- 사용자 상태를 함께 표시할 사용합니다.
260
+ Used to display user status alongside the avatar.
255
261
 
256
262
  ```tsx
257
263
  <Box sx={{ position: 'relative', display: 'inline-block' }}>
@@ -274,7 +280,7 @@ function MyComponent() {
274
280
 
275
281
  ### Empty State
276
282
 
277
- 데이터가 없을 플레이스홀더로 사용합니다.
283
+ Used as a placeholder when no data is available.
278
284
 
279
285
  ```tsx
280
286
  <Stack alignItems="center" spacing={2}>
@@ -292,7 +298,7 @@ function MyComponent() {
292
298
 
293
299
  ### List Items
294
300
 
295
- 리스트 아이템에서 사용자나 항목을 표현할 사용합니다.
301
+ Used to represent users or items in list items.
296
302
 
297
303
  ```tsx
298
304
  <List>
@@ -318,72 +324,107 @@ function MyComponent() {
318
324
 
319
325
  ### Fallback Behavior
320
326
 
321
- 이미지 로드가 실패했을 자동으로 이니셜이나 아이콘으로 대체됩니다.
327
+ If image loading fails, it automatically falls back to initials or an icon.
322
328
 
323
329
  ```tsx
324
- <Avatar src="/broken-image-url.jpg" alt="김철수" color="primary" variant="soft">
330
+ <Avatar
331
+ src="/broken-image-url.jpg"
332
+ alt="김철수"
333
+ color="primary"
334
+ variant="soft"
335
+ >
325
336
 
326
337
  </Avatar>
327
338
  ```
328
339
 
329
340
  ### Loading States
330
341
 
331
- 이미지 로딩 중에는 children 표시되다가 이미지 로드 완료 이미지로 전환됩니다.
342
+ While the image is loading, `children` are shown first, then the image is displayed once loading completes.
332
343
 
333
344
  ```tsx
334
- <Avatar src="/slow-loading-image.jpg" alt="사용자" color="neutral" variant="soft">
345
+ <Avatar
346
+ src="/slow-loading-image.jpg"
347
+ alt="사용자"
348
+ color="neutral"
349
+ variant="soft"
350
+ >
335
351
  <PersonIcon />
336
352
  </Avatar>
337
353
  ```
338
354
 
355
+ ## Props and Customization
356
+
357
+ ### Key Props
358
+
359
+ | Prop | Type | Default | Description |
360
+ | ------------ | -------------------------------------------------------------- | --------------- | ----------------------------------------------- |
361
+ | `src` | `string` | - | Image URL for the avatar |
362
+ | `alt` | `string` | - | Alt text for the avatar image |
363
+ | `children` | `ReactNode` | - | Fallback content (text, icon) when no image |
364
+ | `getInitial` | `(name: string) => string` | First character | Custom function to extract initials from a name |
365
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Avatar size |
366
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'soft'` | Visual style |
367
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
368
+ | `sx` | `SxProps` | - | Custom styles using the MUI system |
369
+
370
+ > **Note**: Avatar also accepts all Joy UI Avatar props and Framer Motion props.
371
+
339
372
  ## Accessibility
340
373
 
341
- Avatar 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
374
+ Avatar provides the following accessibility features:
342
375
 
343
376
  ### Image Alt Text
344
377
 
345
- 이미지 아바타의 경우 적절한 alt 텍스트를 제공해야 합니다.
378
+ For image avatars, provide appropriate alt text.
346
379
 
347
380
  ```tsx
348
- <Avatar src="/user-profile.jpg" alt="김철수의 프로필 사진" />
381
+ <Avatar
382
+ src="/user-profile.jpg"
383
+ alt="김철수의 프로필 사진"
384
+ />
349
385
  ```
350
386
 
351
387
  ### Semantic Meaning
352
388
 
353
- 아바타가 단순히 장식적 목적이 아닌 의미를 가질 때는 적절한 역할을 제공하세요.
389
+ If the avatar carries meaning rather than serving a purely decorative purpose, provide an appropriate role.
354
390
 
355
391
  ```tsx
356
- <Avatar src="/user-avatar.jpg" alt="현재 사용자" role="img" aria-label="현재 로그인한 사용자의 프로필 이미지" />
392
+ <Avatar
393
+ src="/user-avatar.jpg"
394
+ alt="현재 사용자"
395
+ role="img"
396
+ aria-label="현재 로그인한 사용자의 프로필 이미지"
397
+ />
357
398
  ```
358
399
 
359
400
  ### Color Contrast
360
401
 
361
- 텍스트 아바타의 경우 충분한 색상 대비를 유지하세요.
402
+ For text avatars, maintain sufficient color contrast.
362
403
 
363
404
  ```tsx
364
- // 좋은 대비를 제공하는 색상 조합
405
+ // Color combinations that provide good contrast
365
406
  <Avatar variant="solid" color="primary">김</Avatar>
366
407
  <Avatar variant="soft" color="neutral">이</Avatar>
367
408
  ```
368
409
 
369
410
  ## Best Practices
370
411
 
371
- 1. **적절한 크기 선택**: 사용 맥락에 맞는 적절한 크기를 선택하세요.
412
+ 1. **Choose an appropriate size**: Select a size that fits the usage context.
372
413
 
373
414
  ```tsx
374
- // ✅ 적절한 크기 사용
375
- <Avatar size="sm">김</Avatar> // 리스트 아이템에서
376
- <Avatar size="lg">김</Avatar> // 프로필 페이지에서
415
+ // ✅ Appropriate size usage
416
+ <Avatar size="sm">김</Avatar> // In a list item
417
+ <Avatar size="lg">김</Avatar> // On a profile page
377
418
 
378
- // ❌ 부적절한 크기 사용
379
- <Avatar size="lg">김</Avatar> // 네비게이션 바에서 (너무 )
419
+ // ❌ Inappropriate size usage
420
+ <Avatar size="lg">김</Avatar> // In a navigation bar (too large)
380
421
  ```
381
422
 
382
- 2. **일관된 스타일**: 같은 컨텍스트에서는 일관된 변형과 색상을 사용하세요.
423
+ 2. **Consistent styling**: Use consistent variants and colors within the same context.
383
424
 
384
- 3. **이미지 최적화**: 아바타 이미지는 적절한 크기로 최적화하여 사용하세요.
425
+ 3. **Optimize images**: Use avatar images optimized to an appropriate size.
385
426
 
386
- 4. **폴백 제공**: 이미지가 없거나 로드 실패 시를 대비해 적절한 폴백을 제공하세요.
427
+ 4. **Provide a fallback**: Prepare an appropriate fallback for missing or failed image loads.
387
428
 
388
429
  ```tsx
389
430
  <Avatar src={user.avatar} alt={user.name} color="primary" variant="soft">
@@ -391,14 +432,14 @@ Avatar 컴포넌트는 다음과 같은 접근성 기능을 제공합니다:
391
432
  </Avatar>
392
433
  ```
393
434
 
394
- 5. **의미적 사용**: 아바타가 누구를 나타내는지 명확하게 식별할 있어야 합니다.
435
+ 5. **Meaningful usage**: It should be clear whom the avatar represents.
395
436
 
396
437
  ## Performance Considerations
397
438
 
398
- 1. **이미지 최적화**: 아바타 이미지는 작은 크기로 최적화하여 로딩 속도를 향상시키세요.
439
+ 1. **Image optimization**: Optimize avatar images to a small size to improve loading speed.
399
440
 
400
- 2. **Lazy Loading**: 많은 아바타가 있는 페이지에서는 지연 로딩을 고려하세요.
441
+ 2. **Lazy Loading**: Consider lazy loading on pages with many avatars.
401
442
 
402
- 3. **캐싱**: 자주 사용되는 아바타 이미지는 적절히 캐싱하세요.
443
+ 3. **Caching**: Cache frequently used avatar images appropriately.
403
444
 
404
- Avatar 사용자 인터페이스에서 개인을 시각적으로 나타내는 중요한 컴포넌트입니다. 적절한 크기, 색상, 변형을 선택하여 일관되고 접근 가능한 사용자 경험을 제공할 있습니다.
445
+ Avatar is an important component for visually representing people in a user interface. By choosing the right size, color, and variant, you can provide a consistent and accessible user experience.
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## Introduction
4
4
 
5
- Badge 컴포넌트는 다른 UI 요소 위에 작은 카운트, 상태, 또는 레이블을 표시하는 사용됩니다. 주로 알림 수, 상태 표시기, 또는 새로운 콘텐츠를 나타내는 활용됩니다.
5
+ Badge is a small visual indicator that overlays another UI element to display a count, status, or label. It is commonly used to show unread notification counts, online/offline status indicators, and "NEW" labels on menu items or navigation elements. The Badge wraps a child component (such as an icon button or avatar) and positions itself in the top-right corner by default.
6
+
7
+ Badge supports multiple colors, variants, and sizes for flexible visual customization. It also provides utility features like a `max` prop for truncating large numbers (e.g., "99+"), a `showZero` prop for controlling zero-count visibility, and a dot-only mode when no `badgeContent` is provided.
6
8
 
7
9
  ```tsx
8
10
  <Badge {...args}>
@@ -26,7 +28,7 @@ Badge 컴포넌트는 다른 UI 요소 위에 작은 카운트, 상태, 또는
26
28
 
27
29
  ```tsx
28
30
  import { Badge, IconButton } from '@ceed/cds';
29
- import { NotificationsIcon } from '@mui/icons-material';
31
+ import NotificationsIcon from '@mui/icons-material/Notifications';
30
32
 
31
33
  function MyComponent() {
32
34
  return (
@@ -39,11 +41,9 @@ function MyComponent() {
39
41
  }
40
42
  ```
41
43
 
42
- ## Examples
43
-
44
- ### Basic Usage
44
+ ## Basic
45
45
 
46
- 기본적인 Badge 사용법입니다.
46
+ Basic Badge usage showing numeric counts, max overflow, and text content.
47
47
 
48
48
  ```tsx
49
49
  <div style={{
@@ -70,9 +70,9 @@ function MyComponent() {
70
70
  </div>
71
71
  ```
72
72
 
73
- ### Colors
73
+ ## Colors
74
74
 
75
- 다양한 색상을 적용할 있습니다.
75
+ Apply semantic colors to convey the badge's meaning: `primary` for general counts, `danger` for urgent notifications, `success` for online status, and `warning` for attention items.
76
76
 
77
77
  ```tsx
78
78
  <div style={{
@@ -111,9 +111,9 @@ function MyComponent() {
111
111
  </div>
112
112
  ```
113
113
 
114
- ### Variants
114
+ ## Variants
115
115
 
116
- 다양한 스타일 변형을 제공합니다.
116
+ Four style variants are available: `solid` (filled), `soft` (subtle background), `outlined` (border only), and `plain` (minimal).
117
117
 
118
118
  ```tsx
119
119
  <div style={{
@@ -146,9 +146,9 @@ function MyComponent() {
146
146
  </div>
147
147
  ```
148
148
 
149
- ### Sizes
149
+ ## Sizes
150
150
 
151
- 크기를 조절할 있습니다.
151
+ Three sizes -- `sm`, `md`, and `lg` -- allow the badge to scale proportionally with its wrapped element.
152
152
 
153
153
  ```tsx
154
154
  <div style={{
@@ -176,9 +176,9 @@ function MyComponent() {
176
176
  </div>
177
177
  ```
178
178
 
179
- ### With Avatar
179
+ ## With Avatar
180
180
 
181
- 아바타와 함께 사용할 있습니다.
181
+ Badge pairs naturally with Avatar to indicate user status (e.g., notification count or online indicator).
182
182
 
183
183
  ```tsx
184
184
  <div style={{
@@ -195,9 +195,9 @@ function MyComponent() {
195
195
  </div>
196
196
  ```
197
197
 
198
- ### Dot Badge
198
+ ## Dot Badge
199
199
 
200
- 내용 없이 점으로만 표시할 있습니다.
200
+ When no `badgeContent` is provided, Badge renders as a small dot. This is useful for simple presence or status indicators without a specific count.
201
201
 
202
202
  ```tsx
203
203
  <div style={{
@@ -216,9 +216,9 @@ function MyComponent() {
216
216
  </div>
217
217
  ```
218
218
 
219
- ### Max Count
219
+ ## Max Count
220
220
 
221
- 최대 카운트를 설정하여 숫자가 넘을 '+' 표시를 있습니다.
221
+ Use the `max` prop to cap the displayed number. When `badgeContent` exceeds `max`, it renders as "max+" (e.g., "99+").
222
222
 
223
223
  ```tsx
224
224
  <div style={{
@@ -245,9 +245,9 @@ function MyComponent() {
245
245
  </div>
246
246
  ```
247
247
 
248
- ### Show Zero
248
+ ## Show Zero
249
249
 
250
- 기본적으로 0 때는 숨겨지지만, showZero 옵션으로 표시할 있습니다.
250
+ By default, Badge hides when `badgeContent` is `0`. Use the `showZero` prop to force it to remain visible.
251
251
 
252
252
  ```tsx
253
253
  <div style={{
@@ -276,40 +276,92 @@ function MyComponent() {
276
276
 
277
277
  ## Common Use Cases
278
278
 
279
- ### Notification Count
279
+ ### Notification Bell
280
280
 
281
281
  ```tsx
282
- <Badge badgeContent={unreadCount} color="danger">
283
- <IconButton>
284
- <NotificationsIcon />
285
- </IconButton>
286
- </Badge>
282
+ import { Badge, IconButton } from '@ceed/cds';
283
+ import NotificationsIcon from '@mui/icons-material/Notifications';
284
+
285
+ function NotificationBell({ unreadCount }) {
286
+ return (
287
+ <Badge badgeContent={unreadCount} max={99} color="danger">
288
+ <IconButton aria-label={`${unreadCount} unread notifications`}>
289
+ <NotificationsIcon />
290
+ </IconButton>
291
+ </Badge>
292
+ );
293
+ }
287
294
  ```
288
295
 
289
- ### Status Indicator
296
+ ### Online Status on Avatar
290
297
 
291
298
  ```tsx
292
- <Badge color="success" variant="solid">
293
- <Avatar src="/user-avatar.jpg" />
294
- </Badge>
299
+ import { Badge, Avatar } from '@ceed/cds';
300
+
301
+ function UserAvatar({ name, avatarUrl, isOnline }) {
302
+ return (
303
+ <Badge
304
+ color={isOnline ? 'success' : 'neutral'}
305
+ variant="solid"
306
+ anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
307
+ >
308
+ <Avatar src={avatarUrl} alt={name} />
309
+ </Badge>
310
+ );
311
+ }
295
312
  ```
296
313
 
297
- ### New Items
314
+ ### New Feature Label
298
315
 
299
316
  ```tsx
300
- <Badge badgeContent="NEW" color="warning">
301
- <Button>메뉴</Button>
302
- </Badge>
317
+ import { Badge, Button } from '@ceed/cds';
318
+
319
+ function FeatureButton() {
320
+ return (
321
+ <Badge badgeContent="NEW" color="warning" size="sm">
322
+ <Button variant="outlined">Analytics</Button>
323
+ </Badge>
324
+ );
325
+ }
303
326
  ```
304
327
 
305
328
  ## Best Practices
306
329
 
307
- 1. **의미 있는 색상**: 색상은 의미를 가지도록 사용하세요 (빨간색은 중요한 알림, 초록색은 성공 상태 등).
330
+ - **Use semantic colors consistently.** Reserve `danger` for urgent notifications, `success` for positive status (e.g., online), `warning` for attention-needed items, and `primary` for neutral counts.
331
+ - ✔ `color="danger"` for unread message count
332
+ - ✘ `color="primary"` for critical alert count
333
+
334
+ - **Set a `max` value for numeric badges.** Avoid displaying very large numbers like "1,247" in a tiny badge. Use `max={99}` or `max={999}` to keep the badge compact and readable.
335
+
336
+ - **Keep badge content short.** Badges work best with numbers (1-3 digits) or very short text ("NEW", "HOT"). Long text will overflow and look broken.
337
+
338
+ - **Use dot badges for binary states.** When the specific count does not matter (e.g., "has unread items" vs. "12 unread items"), use a dot badge by omitting `badgeContent`.
339
+
340
+ - **Do not badge everything.** Only add badges to elements where the count or status information is genuinely useful. Overuse diminishes their attention-grabbing effect.
341
+
342
+ ## Props and Customization
343
+
344
+ ### Key Props
308
345
 
309
- 2. **적절한 콘텐츠**: 너무 긴 텍스트는 피하고, 숫자나 짧은 텍스트를 사용하세요.
346
+ | Prop | Type | Default | Description |
347
+ | -------------- | ---------------------------------------------------------------- | ------------------------------------------ | --------------------------------------------------------------------- |
348
+ | `badgeContent` | `ReactNode` | - | Content displayed inside the badge (number, text). Omit for dot badge |
349
+ | `children` | `ReactNode` | - | The element the badge is attached to |
350
+ | `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'danger'` | Badge color |
351
+ | `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Badge size |
352
+ | `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'solid'` | Visual style |
353
+ | `max` | `number` | `99` | Maximum value before showing "N+" |
354
+ | `invisible` | `boolean` | `false` | Hides the badge |
355
+ | `showZero` | `boolean` | `false` | Shows badge when value is 0 |
356
+ | `anchorOrigin` | `{ vertical: 'top' \| 'bottom'; horizontal: 'left' \| 'right' }` | `{ vertical: 'top', horizontal: 'right' }` | Badge position |
357
+ | `badgeInset` | `string` | - | Custom inset for badge positioning |
358
+ | `sx` | `SxProps` | - | Custom styles using the MUI system |
310
359
 
311
- 3. **대비**: Badge 색상이 배경과 충분한 대비를 가지도록 하세요.
360
+ > **Note**: Badge also accepts all Joy UI Badge props.
312
361
 
313
- 4. **접근성**: 시각적 정보만으로 의존하지 않고, 스크린 리더를 위한 적절한 레이블을 제공하세요.
362
+ ## Accessibility
314
363
 
315
- 5. **일관성**: 애플리케이션 전체에서 Badge 사용 패턴을 일관되게 유지하세요.
364
+ - Badge automatically applies `aria-label` or equivalent attributes so screen readers can announce the badge content alongside the wrapped element.
365
+ - When using Badge on an IconButton, always provide an `aria-label` on the IconButton that includes the badge context (e.g., `aria-label="5 unread notifications"`).
366
+ - Avoid relying solely on color to convey badge meaning. Pair colored badges with icons, text, or positional context so color-blind users can also interpret the status.
367
+ - Dot badges (without `badgeContent`) should have an accessible label on the parent element that describes the status (e.g., "User is online").