@ceed/cds 1.22.3 → 1.22.5
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/components/data-display/InfoSign.md +74 -91
- package/dist/components/data-display/Typography.md +363 -63
- package/dist/components/feedback/CircularProgress.md +257 -0
- package/dist/components/feedback/Skeleton.md +280 -0
- package/dist/components/feedback/llms.txt +2 -0
- package/dist/components/inputs/ButtonGroup.md +115 -104
- package/dist/components/inputs/CurrencyInput.md +181 -8
- package/dist/components/inputs/DatePicker.md +108 -436
- package/dist/components/inputs/DateRangePicker.md +130 -496
- package/dist/components/inputs/FilterableCheckboxGroup.md +141 -20
- package/dist/components/inputs/FormControl.md +361 -0
- package/dist/components/inputs/IconButton.md +137 -88
- package/dist/components/inputs/Input.md +203 -77
- package/dist/components/inputs/MonthPicker.md +95 -427
- package/dist/components/inputs/MonthRangePicker.md +89 -471
- package/dist/components/inputs/PercentageInput.md +183 -19
- package/dist/components/inputs/RadioButton.md +163 -35
- package/dist/components/inputs/RadioList.md +241 -0
- package/dist/components/inputs/RadioTileGroup.md +146 -62
- package/dist/components/inputs/Select.md +219 -328
- package/dist/components/inputs/Slider.md +334 -0
- package/dist/components/inputs/Switch.md +143 -376
- package/dist/components/inputs/Textarea.md +209 -11
- package/dist/components/inputs/Uploader/Uploader.md +145 -66
- package/dist/components/inputs/llms.txt +3 -0
- package/dist/components/navigation/Breadcrumbs.md +57 -308
- package/dist/components/navigation/Drawer.md +180 -0
- package/dist/components/navigation/Dropdown.md +98 -215
- package/dist/components/navigation/IconMenuButton.md +40 -502
- package/dist/components/navigation/InsetDrawer.md +281 -650
- package/dist/components/navigation/Link.md +31 -348
- package/dist/components/navigation/Menu.md +92 -285
- package/dist/components/navigation/MenuButton.md +55 -448
- package/dist/components/navigation/Pagination.md +47 -338
- package/dist/components/navigation/Stepper.md +160 -28
- package/dist/components/navigation/Tabs.md +57 -316
- package/dist/components/surfaces/Accordions.md +49 -804
- package/dist/components/surfaces/Card.md +97 -157
- package/dist/components/surfaces/Divider.md +83 -234
- package/dist/components/surfaces/Sheet.md +152 -327
- package/dist/guides/ThemeProvider.md +89 -0
- package/dist/guides/llms.txt +9 -0
- package/dist/llms.txt +8 -0
- package/package.json +1 -1
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Card
|
|
5
|
+
Card is a versatile container component that groups related content and actions into a single, cohesive unit. It provides a structured surface for displaying information such as product listings, user profiles, news articles, and dashboard widgets. Cards help users scan and compare content quickly by presenting it in a consistent, visually bounded format.
|
|
6
|
+
|
|
7
|
+
The Card component is composed of several sub-components -- `CardContent`, `CardActions`, `CardCover`, and `CardOverflow` -- that work together to create rich, flexible layouts. It supports multiple variants, colors, and sizes for full visual customization.
|
|
6
8
|
|
|
7
9
|
```tsx
|
|
8
10
|
<Card {...args} sx={{
|
|
@@ -24,25 +26,26 @@ Card 컴포넌트는 관련된 내용과 액션을 하나의 컨테이너로 묶
|
|
|
24
26
|
## Usage
|
|
25
27
|
|
|
26
28
|
```tsx
|
|
27
|
-
import { Card, CardContent, CardActions,
|
|
29
|
+
import { Card, CardContent, CardActions, Typography, Button } from '@ceed/cds';
|
|
28
30
|
|
|
29
31
|
function MyComponent() {
|
|
30
32
|
return (
|
|
31
33
|
<Card sx={{ maxWidth: 320 }}>
|
|
32
34
|
<CardContent>
|
|
33
|
-
<Typography level="title-lg"
|
|
34
|
-
<Typography level="body-md"
|
|
35
|
+
<Typography level="title-lg">Card Title</Typography>
|
|
36
|
+
<Typography level="body-md">Card description goes here.</Typography>
|
|
35
37
|
</CardContent>
|
|
38
|
+
<CardActions>
|
|
39
|
+
<Button size="sm">Action</Button>
|
|
40
|
+
</CardActions>
|
|
36
41
|
</Card>
|
|
37
42
|
);
|
|
38
43
|
}
|
|
39
44
|
```
|
|
40
45
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
### Basic Usage
|
|
46
|
+
## Basic
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
The simplest form of a Card with a title and description inside CardContent.
|
|
46
49
|
|
|
47
50
|
```tsx
|
|
48
51
|
<div style={{
|
|
@@ -63,9 +66,9 @@ function MyComponent() {
|
|
|
63
66
|
</div>
|
|
64
67
|
```
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
## Variants
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
Four style variants -- `solid`, `soft`, `outlined`, and `plain` -- allow you to control the visual weight of the card.
|
|
69
72
|
|
|
70
73
|
```tsx
|
|
71
74
|
<div style={{
|
|
@@ -111,9 +114,9 @@ function MyComponent() {
|
|
|
111
114
|
</div>
|
|
112
115
|
```
|
|
113
116
|
|
|
114
|
-
|
|
117
|
+
## Colors
|
|
115
118
|
|
|
116
|
-
|
|
119
|
+
Apply semantic colors to convey meaning: `primary`, `neutral`, `danger`, `success`, or `warning`.
|
|
117
120
|
|
|
118
121
|
```tsx
|
|
119
122
|
<div style={{
|
|
@@ -168,9 +171,9 @@ function MyComponent() {
|
|
|
168
171
|
</div>
|
|
169
172
|
```
|
|
170
173
|
|
|
171
|
-
|
|
174
|
+
## Sizes
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
Three sizes are available: `sm`, `md`, and `lg`. The size affects internal padding and typography scaling.
|
|
174
177
|
|
|
175
178
|
```tsx
|
|
176
179
|
<div style={{
|
|
@@ -208,9 +211,9 @@ function MyComponent() {
|
|
|
208
211
|
</div>
|
|
209
212
|
```
|
|
210
213
|
|
|
211
|
-
|
|
214
|
+
## With Cover
|
|
212
215
|
|
|
213
|
-
|
|
216
|
+
Use `CardCover` to place a full-bleed background image behind the card content, creating visually striking hero-style cards.
|
|
214
217
|
|
|
215
218
|
```tsx
|
|
216
219
|
<div style={{
|
|
@@ -254,9 +257,9 @@ function MyComponent() {
|
|
|
254
257
|
</div>
|
|
255
258
|
```
|
|
256
259
|
|
|
257
|
-
|
|
260
|
+
## With Actions
|
|
258
261
|
|
|
259
|
-
|
|
262
|
+
`CardActions` provides a dedicated area at the bottom of the card for buttons and interactive elements. Use the `buttonFlex` prop for equal-width buttons.
|
|
260
263
|
|
|
261
264
|
```tsx
|
|
262
265
|
<div style={{
|
|
@@ -305,9 +308,9 @@ function MyComponent() {
|
|
|
305
308
|
</div>
|
|
306
309
|
```
|
|
307
310
|
|
|
308
|
-
|
|
311
|
+
## With Overflow
|
|
309
312
|
|
|
310
|
-
CardOverflow
|
|
313
|
+
`CardOverflow` allows content to extend beyond the card's default padding, enabling full-bleed images, colored footers, and edge-to-edge elements.
|
|
311
314
|
|
|
312
315
|
```tsx
|
|
313
316
|
<div style={{
|
|
@@ -442,9 +445,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
442
445
|
</div>
|
|
443
446
|
```
|
|
444
447
|
|
|
445
|
-
|
|
448
|
+
## Interactive Cards
|
|
446
449
|
|
|
447
|
-
|
|
450
|
+
Add hover effects and click handlers to create cards that respond to user interaction.
|
|
448
451
|
|
|
449
452
|
```tsx
|
|
450
453
|
<div style={{
|
|
@@ -482,9 +485,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
482
485
|
</div>
|
|
483
486
|
```
|
|
484
487
|
|
|
485
|
-
|
|
488
|
+
## Media Cards
|
|
486
489
|
|
|
487
|
-
|
|
490
|
+
Combine `CardOverflow` with `AspectRatio` to create product or media cards with consistent image proportions.
|
|
488
491
|
|
|
489
492
|
```tsx
|
|
490
493
|
<div style={{
|
|
@@ -559,9 +562,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
559
562
|
</div>
|
|
560
563
|
```
|
|
561
564
|
|
|
562
|
-
|
|
565
|
+
## Complex Layout
|
|
563
566
|
|
|
564
|
-
|
|
567
|
+
Compose multiple sub-components together to build rich, social-media-style card layouts with avatars, images, and action bars.
|
|
565
568
|
|
|
566
569
|
```tsx
|
|
567
570
|
<div style={{
|
|
@@ -629,158 +632,95 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
629
632
|
</div>
|
|
630
633
|
```
|
|
631
634
|
|
|
632
|
-
##
|
|
633
|
-
|
|
634
|
-
Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
635
|
-
|
|
636
|
-
### Card
|
|
637
|
-
|
|
638
|
-
메인 카드 컨테이너입니다.
|
|
639
|
-
|
|
640
|
-
```tsx
|
|
641
|
-
<Card variant="outlined" color="neutral" size="md">
|
|
642
|
-
{/* 카드 내용 */}
|
|
643
|
-
</Card>
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
### CardContent
|
|
647
|
-
|
|
648
|
-
카드의 주요 내용을 담는 영역입니다.
|
|
649
|
-
|
|
650
|
-
```tsx
|
|
651
|
-
<CardContent>
|
|
652
|
-
<Typography level="title-lg">제목</Typography>
|
|
653
|
-
<Typography level="body-md">내용</Typography>
|
|
654
|
-
</CardContent>
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
### CardCover
|
|
658
|
-
|
|
659
|
-
카드 전체를 덮는 배경 이미지나 미디어를 표시합니다.
|
|
660
|
-
|
|
661
|
-
```tsx
|
|
662
|
-
<CardCover>
|
|
663
|
-
<img src="image.jpg" alt="Cover" />
|
|
664
|
-
</CardCover>
|
|
665
|
-
```
|
|
666
|
-
|
|
667
|
-
### CardActions
|
|
635
|
+
## Common Use Cases
|
|
668
636
|
|
|
669
|
-
|
|
637
|
+
### Product Card
|
|
670
638
|
|
|
671
639
|
```tsx
|
|
672
|
-
|
|
673
|
-
<Button>확인</Button>
|
|
674
|
-
<Button>취소</Button>
|
|
675
|
-
</CardActions>
|
|
676
|
-
```
|
|
677
|
-
|
|
678
|
-
### CardOverflow
|
|
640
|
+
import { Card, CardContent, CardActions, CardOverflow, AspectRatio, Typography, Button } from '@ceed/cds';
|
|
679
641
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
<CardOverflow>
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
</CardOverflow>
|
|
642
|
+
function ProductCard({ name, description, price, imageUrl }) {
|
|
643
|
+
return (
|
|
644
|
+
<Card sx={{ maxWidth: 320 }}>
|
|
645
|
+
<CardOverflow>
|
|
646
|
+
<AspectRatio ratio="1">
|
|
647
|
+
<img src={imageUrl} alt={name} loading="lazy" />
|
|
648
|
+
</AspectRatio>
|
|
649
|
+
</CardOverflow>
|
|
650
|
+
<CardContent>
|
|
651
|
+
<Typography level="title-lg">{name}</Typography>
|
|
652
|
+
<Typography level="body-md">{description}</Typography>
|
|
653
|
+
<Typography level="title-lg" color="primary">
|
|
654
|
+
{price}
|
|
655
|
+
</Typography>
|
|
656
|
+
</CardContent>
|
|
657
|
+
<CardActions>
|
|
658
|
+
<Button variant="solid" fullWidth>
|
|
659
|
+
Add to Cart
|
|
660
|
+
</Button>
|
|
661
|
+
</CardActions>
|
|
662
|
+
</Card>
|
|
663
|
+
);
|
|
664
|
+
}
|
|
688
665
|
```
|
|
689
666
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
### Product Cards
|
|
667
|
+
### Profile Card
|
|
693
668
|
|
|
694
669
|
```tsx
|
|
695
|
-
|
|
696
|
-
<CardOverflow>
|
|
697
|
-
<AspectRatio ratio="1">
|
|
698
|
-
<img src="product.jpg" alt="Product" />
|
|
699
|
-
</AspectRatio>
|
|
700
|
-
</CardOverflow>
|
|
701
|
-
<CardContent>
|
|
702
|
-
<Typography level="title-lg">제품명</Typography>
|
|
703
|
-
<Typography level="body-md">제품 설명</Typography>
|
|
704
|
-
<Typography level="title-lg" color="primary">
|
|
705
|
-
₩199,000
|
|
706
|
-
</Typography>
|
|
707
|
-
</CardContent>
|
|
708
|
-
<CardActions>
|
|
709
|
-
<Button variant="solid" fullWidth>
|
|
710
|
-
구매하기
|
|
711
|
-
</Button>
|
|
712
|
-
</CardActions>
|
|
713
|
-
</Card>
|
|
714
|
-
```
|
|
715
|
-
|
|
716
|
-
### User Profile Cards
|
|
670
|
+
import { Card, CardContent, CardActions, Typography, Avatar, Button } from '@ceed/cds';
|
|
717
671
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
</Card>
|
|
672
|
+
function ProfileCard({ name, role, avatarUrl }) {
|
|
673
|
+
return (
|
|
674
|
+
<Card sx={{ maxWidth: 320 }}>
|
|
675
|
+
<CardContent sx={{ alignItems: 'center', textAlign: 'center' }}>
|
|
676
|
+
<Avatar size="lg" src={avatarUrl} />
|
|
677
|
+
<Typography level="title-lg">{name}</Typography>
|
|
678
|
+
<Typography level="body-sm">{role}</Typography>
|
|
679
|
+
</CardContent>
|
|
680
|
+
<CardActions>
|
|
681
|
+
<Button size="sm" variant="soft">Follow</Button>
|
|
682
|
+
<Button size="sm" variant="solid">Message</Button>
|
|
683
|
+
</CardActions>
|
|
684
|
+
</Card>
|
|
685
|
+
);
|
|
686
|
+
}
|
|
734
687
|
```
|
|
735
688
|
|
|
736
|
-
###
|
|
689
|
+
### Dashboard Widget
|
|
737
690
|
|
|
738
691
|
```tsx
|
|
739
|
-
|
|
740
|
-
<CardOverflow>
|
|
741
|
-
<AspectRatio ratio="3/2">
|
|
742
|
-
<img src="news.jpg" alt="News" />
|
|
743
|
-
</AspectRatio>
|
|
744
|
-
</CardOverflow>
|
|
745
|
-
<CardContent>
|
|
746
|
-
<Typography level="body-xs" color="neutral">
|
|
747
|
-
뉴스 · 2시간 전
|
|
748
|
-
</Typography>
|
|
749
|
-
<Typography level="title-md">뉴스 제목</Typography>
|
|
750
|
-
<Typography level="body-sm">뉴스 요약...</Typography>
|
|
751
|
-
</CardContent>
|
|
752
|
-
</Card>
|
|
753
|
-
```
|
|
692
|
+
import { Card, CardContent, Typography } from '@ceed/cds';
|
|
754
693
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
<
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
694
|
+
function DashboardWidget({ label, value, trend }) {
|
|
695
|
+
return (
|
|
696
|
+
<Card variant="soft" color="primary">
|
|
697
|
+
<CardContent>
|
|
698
|
+
<Typography level="body-sm">{label}</Typography>
|
|
699
|
+
<Typography level="h2">{value}</Typography>
|
|
700
|
+
<Typography level="body-xs">{trend}</Typography>
|
|
701
|
+
</CardContent>
|
|
702
|
+
</Card>
|
|
703
|
+
);
|
|
704
|
+
}
|
|
765
705
|
```
|
|
766
706
|
|
|
767
707
|
## Best Practices
|
|
768
708
|
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
2. **일관된 스타일**: 같은 맥락에서 사용되는 카드들은 일관된 variant, color, size를 사용하세요.
|
|
709
|
+
- **Use consistent card sizing.** When displaying cards in a grid or list, ensure they share the same `maxWidth`, variant, and size to create a uniform appearance.
|
|
772
710
|
|
|
773
|
-
3
|
|
711
|
+
- **Limit actions per card.** Place only the most relevant actions (1-3 buttons) in `CardActions`. Too many options overwhelm users and dilute the card's purpose.
|
|
774
712
|
|
|
775
|
-
|
|
713
|
+
- **Provide image alt text.** Always include descriptive `alt` attributes on images inside `CardCover` and `CardOverflow` for screen readers.
|
|
714
|
+
- ✔ `alt="Red running shoes, side view"`
|
|
715
|
+
- ✘ `alt="image"` or missing alt
|
|
776
716
|
|
|
777
|
-
|
|
778
|
-
- 카드가 클릭 가능한 경우 키보드 탐색을 지원하세요
|
|
779
|
-
- 이미지에는 적절한 alt 텍스트를 제공하세요
|
|
780
|
-
- 색상만으로 정보를 전달하지 마세요
|
|
717
|
+
- **Use CardOverflow for full-bleed content.** Instead of negative margins or workarounds, use `CardOverflow` to extend images and colored sections to the card edges.
|
|
781
718
|
|
|
782
|
-
|
|
719
|
+
- **Choose the right variant for the context.** Use `outlined` for general content cards, `soft` for dashboard widgets, and `plain` for minimal or embedded layouts.
|
|
783
720
|
|
|
784
|
-
|
|
721
|
+
## Accessibility
|
|
785
722
|
|
|
786
|
-
|
|
723
|
+
- When a card is clickable, wrap the primary action in a link or button element rather than making the entire card a click target. This ensures keyboard and screen reader users can identify the interactive element.
|
|
724
|
+
- Provide meaningful `alt` text for all images. Decorative images should use `alt=""` to be skipped by screen readers.
|
|
725
|
+
- Use proper heading levels inside cards (`level="title-lg"`, `level="title-md"`) to maintain the document's heading hierarchy.
|
|
726
|
+
- Ensure sufficient color contrast between card backgrounds and text, especially when using `variant="solid"` with colored themes.
|