@ceed/ads 1.23.3 → 1.23.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/Badge.md +71 -39
- package/dist/components/data-display/InfoSign.md +74 -98
- package/dist/components/data-display/Typography.md +310 -61
- 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 -106
- package/dist/components/inputs/Calendar.md +98 -459
- 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/FilterMenu.md +169 -19
- package/dist/components/inputs/FilterableCheckboxGroup.md +119 -24
- package/dist/components/inputs/FormControl.md +361 -0
- package/dist/components/inputs/IconButton.md +137 -88
- 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 +136 -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 +80 -322
- package/dist/components/navigation/Dropdown.md +92 -221
- package/dist/components/navigation/IconMenuButton.md +40 -502
- package/dist/components/navigation/InsetDrawer.md +68 -738
- package/dist/components/navigation/Link.md +39 -298
- 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/ProfileMenu.md +45 -268
- package/dist/components/navigation/Stepper.md +160 -28
- package/dist/components/navigation/Tabs.md +57 -316
- package/dist/components/surfaces/Sheet.md +150 -333
- package/dist/guides/ThemeProvider.md +116 -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
|
-
Sheet
|
|
5
|
+
Sheet is a foundational surface component that serves as a container for grouping and visually separating content. It acts as the building block for creating cards, panels, dialogs, and other elevated UI elements. By combining different `variant` and `color` props, you can tailor the Sheet's appearance to match its purpose -- whether it is a subtle content container, an attention-grabbing notification banner, or a structured form wrapper.
|
|
6
|
+
|
|
7
|
+
Sheet is built on top of Joy UI's Sheet component and inherits all of its styling capabilities, including support for the `sx` prop for custom styling, responsive design tokens, and Framer Motion animation props.
|
|
6
8
|
|
|
7
9
|
```tsx
|
|
8
10
|
<Sheet {...args} sx={{
|
|
@@ -34,58 +36,18 @@ import { Sheet } from '@ceed/ads';
|
|
|
34
36
|
function MyComponent() {
|
|
35
37
|
return (
|
|
36
38
|
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'md' }}>
|
|
37
|
-
<Typography level="title-md"
|
|
39
|
+
<Typography level="title-md">Sheet Title</Typography>
|
|
38
40
|
<Typography level="body-md">
|
|
39
|
-
|
|
41
|
+
Content goes inside the sheet.
|
|
40
42
|
</Typography>
|
|
41
43
|
</Sheet>
|
|
42
44
|
);
|
|
43
45
|
}
|
|
44
46
|
```
|
|
45
47
|
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
### Basic Usage
|
|
49
|
-
|
|
50
|
-
가장 기본적인 Sheet 사용법입니다.
|
|
51
|
-
|
|
52
|
-
```tsx
|
|
53
|
-
<div style={{
|
|
54
|
-
display: 'flex',
|
|
55
|
-
gap: '2rem',
|
|
56
|
-
flexWrap: 'wrap'
|
|
57
|
-
}}>
|
|
58
|
-
<Sheet sx={{
|
|
59
|
-
p: 3,
|
|
60
|
-
maxWidth: 300,
|
|
61
|
-
borderRadius: 'md'
|
|
62
|
-
}}>
|
|
63
|
-
<Typography level="title-md" sx={{
|
|
64
|
-
mb: 1
|
|
65
|
-
}}>
|
|
66
|
-
기본 Sheet
|
|
67
|
-
</Typography>
|
|
68
|
-
<Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
|
|
69
|
-
</Sheet>
|
|
70
|
-
|
|
71
|
-
<Sheet variant="outlined" sx={{
|
|
72
|
-
p: 3,
|
|
73
|
-
maxWidth: 300,
|
|
74
|
-
borderRadius: 'md'
|
|
75
|
-
}}>
|
|
76
|
-
<Typography level="title-md" sx={{
|
|
77
|
-
mb: 1
|
|
78
|
-
}}>
|
|
79
|
-
Outlined Sheet
|
|
80
|
-
</Typography>
|
|
81
|
-
<Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
|
|
82
|
-
</Sheet>
|
|
83
|
-
</div>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Variants
|
|
48
|
+
## Variants
|
|
87
49
|
|
|
88
|
-
|
|
50
|
+
Sheet supports four visual variants to convey different levels of emphasis.
|
|
89
51
|
|
|
90
52
|
```tsx
|
|
91
53
|
<div style={{
|
|
@@ -152,9 +114,9 @@ Plain
|
|
|
152
114
|
</div>
|
|
153
115
|
```
|
|
154
116
|
|
|
155
|
-
|
|
117
|
+
## Colors
|
|
156
118
|
|
|
157
|
-
|
|
119
|
+
Apply semantic colors to communicate meaning -- use `danger` for errors, `success` for confirmations, `warning` for alerts, and `primary` for highlighted content.
|
|
158
120
|
|
|
159
121
|
```tsx
|
|
160
122
|
<div style={{
|
|
@@ -199,9 +161,47 @@ Plain
|
|
|
199
161
|
</div>
|
|
200
162
|
```
|
|
201
163
|
|
|
202
|
-
|
|
164
|
+
## Basic
|
|
165
|
+
|
|
166
|
+
The simplest form of a Sheet with minimal configuration.
|
|
167
|
+
|
|
168
|
+
```tsx
|
|
169
|
+
<div style={{
|
|
170
|
+
display: 'flex',
|
|
171
|
+
gap: '2rem',
|
|
172
|
+
flexWrap: 'wrap'
|
|
173
|
+
}}>
|
|
174
|
+
<Sheet sx={{
|
|
175
|
+
p: 3,
|
|
176
|
+
maxWidth: 300,
|
|
177
|
+
borderRadius: 'md'
|
|
178
|
+
}}>
|
|
179
|
+
<Typography level="title-md" sx={{
|
|
180
|
+
mb: 1
|
|
181
|
+
}}>
|
|
182
|
+
기본 Sheet
|
|
183
|
+
</Typography>
|
|
184
|
+
<Typography level="body-sm">가장 기본적인 Sheet 컴포넌트입니다.</Typography>
|
|
185
|
+
</Sheet>
|
|
186
|
+
|
|
187
|
+
<Sheet variant="outlined" sx={{
|
|
188
|
+
p: 3,
|
|
189
|
+
maxWidth: 300,
|
|
190
|
+
borderRadius: 'md'
|
|
191
|
+
}}>
|
|
192
|
+
<Typography level="title-md" sx={{
|
|
193
|
+
mb: 1
|
|
194
|
+
}}>
|
|
195
|
+
Outlined Sheet
|
|
196
|
+
</Typography>
|
|
197
|
+
<Typography level="body-sm">테두리가 있는 Sheet 컴포넌트입니다.</Typography>
|
|
198
|
+
</Sheet>
|
|
199
|
+
</div>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## User Profile Card
|
|
203
203
|
|
|
204
|
-
|
|
204
|
+
Sheet can be composed with other components to create rich profile cards.
|
|
205
205
|
|
|
206
206
|
```tsx
|
|
207
207
|
<Sheet variant="outlined" sx={{
|
|
@@ -256,9 +256,9 @@ Plain
|
|
|
256
256
|
</Sheet>
|
|
257
257
|
```
|
|
258
258
|
|
|
259
|
-
|
|
259
|
+
## Article Card
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
Combine Sheet with images, chips, and actions for article-style layouts.
|
|
262
262
|
|
|
263
263
|
```tsx
|
|
264
264
|
<Sheet variant="outlined" sx={{
|
|
@@ -329,9 +329,9 @@ Plain
|
|
|
329
329
|
</Sheet>
|
|
330
330
|
```
|
|
331
331
|
|
|
332
|
-
|
|
332
|
+
## Notification Panel
|
|
333
333
|
|
|
334
|
-
|
|
334
|
+
Use `variant="soft"` with a semantic color to create attention-grabbing notification banners.
|
|
335
335
|
|
|
336
336
|
```tsx
|
|
337
337
|
<Sheet variant="soft" color="primary" sx={{
|
|
@@ -362,9 +362,9 @@ Plain
|
|
|
362
362
|
</Sheet>
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
## Stats Cards
|
|
366
366
|
|
|
367
|
-
|
|
367
|
+
Multiple Sheet instances arranged side by side make effective dashboard stat widgets.
|
|
368
368
|
|
|
369
369
|
```tsx
|
|
370
370
|
<div style={{
|
|
@@ -440,9 +440,9 @@ Plain
|
|
|
440
440
|
</div>
|
|
441
441
|
```
|
|
442
442
|
|
|
443
|
-
|
|
443
|
+
## Form Sheet
|
|
444
444
|
|
|
445
|
-
|
|
445
|
+
Wrap form elements inside a Sheet to create visually contained form sections.
|
|
446
446
|
|
|
447
447
|
```tsx
|
|
448
448
|
<Sheet variant="outlined" sx={{
|
|
@@ -528,9 +528,9 @@ Plain
|
|
|
528
528
|
</Sheet>
|
|
529
529
|
```
|
|
530
530
|
|
|
531
|
-
|
|
531
|
+
## Nested Sheets
|
|
532
532
|
|
|
533
|
-
|
|
533
|
+
Sheets can be nested to create layered dashboard layouts with distinct visual sections.
|
|
534
534
|
|
|
535
535
|
```tsx
|
|
536
536
|
<Sheet variant="outlined" sx={{
|
|
@@ -599,302 +599,119 @@ Plain
|
|
|
599
599
|
</Sheet>
|
|
600
600
|
```
|
|
601
601
|
|
|
602
|
-
## Variants
|
|
603
|
-
|
|
604
|
-
Sheet는 4가지 variant를 지원합니다:
|
|
605
|
-
|
|
606
|
-
### solid
|
|
607
|
-
|
|
608
|
-
배경색이 채워진 스타일입니다. 강조가 필요한 콘텐츠에 사용합니다.
|
|
609
|
-
|
|
610
|
-
```tsx
|
|
611
|
-
<Sheet variant="solid" color="primary">
|
|
612
|
-
강조된 콘텐츠
|
|
613
|
-
</Sheet>
|
|
614
|
-
```
|
|
615
|
-
|
|
616
|
-
### soft
|
|
617
|
-
|
|
618
|
-
부드러운 배경색을 가진 스타일입니다. 눈에 띄지만 과하지 않은 강조에 사용합니다.
|
|
619
|
-
|
|
620
|
-
```tsx
|
|
621
|
-
<Sheet variant="soft" color="success">
|
|
622
|
-
부드러운 강조
|
|
623
|
-
</Sheet>
|
|
624
|
-
```
|
|
625
|
-
|
|
626
|
-
### outlined
|
|
627
|
-
|
|
628
|
-
테두리가 있는 스타일입니다. 가장 일반적으로 사용되는 카드 스타일입니다.
|
|
629
|
-
|
|
630
|
-
```tsx
|
|
631
|
-
<Sheet variant="outlined">
|
|
632
|
-
기본 카드 스타일
|
|
633
|
-
</Sheet>
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
### plain
|
|
637
|
-
|
|
638
|
-
배경이나 테두리가 없는 평면 스타일입니다. 미니멀한 디자인에 사용합니다.
|
|
639
|
-
|
|
640
|
-
```tsx
|
|
641
|
-
<Sheet variant="plain">
|
|
642
|
-
미니멀한 스타일
|
|
643
|
-
</Sheet>
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
## Colors
|
|
647
|
-
|
|
648
|
-
다양한 색상 테마를 적용할 수 있습니다:
|
|
649
|
-
|
|
650
|
-
- **primary**: 주요 작업이나 중요한 정보
|
|
651
|
-
- **neutral**: 일반적인 콘텐츠 (기본값)
|
|
652
|
-
- **danger**: 오류나 경고 상황
|
|
653
|
-
- **success**: 성공이나 긍정적인 결과
|
|
654
|
-
- **warning**: 주의사항이나 중요한 알림
|
|
655
|
-
|
|
656
|
-
```tsx
|
|
657
|
-
<Sheet color="danger" variant="soft">
|
|
658
|
-
오류 메시지
|
|
659
|
-
</Sheet>
|
|
660
|
-
<Sheet color="success" variant="soft">
|
|
661
|
-
성공 메시지
|
|
662
|
-
</Sheet>
|
|
663
|
-
```
|
|
664
|
-
|
|
665
602
|
## Common Use Cases
|
|
666
603
|
|
|
667
|
-
###
|
|
604
|
+
### Dashboard Stat Widget
|
|
668
605
|
|
|
669
606
|
```tsx
|
|
670
|
-
|
|
671
|
-
<Stack direction="row" spacing={2} alignItems="center">
|
|
672
|
-
<Avatar size="lg" src="/profile.jpg" />
|
|
673
|
-
<Stack>
|
|
674
|
-
<Typography level="title-lg">사용자 이름</Typography>
|
|
675
|
-
<Typography level="body-sm" color="neutral">직책</Typography>
|
|
676
|
-
</Stack>
|
|
677
|
-
</Stack>
|
|
678
|
-
|
|
679
|
-
<Typography level="body-md" sx={{ mt: 2 }}>
|
|
680
|
-
사용자 소개 텍스트...
|
|
681
|
-
</Typography>
|
|
682
|
-
|
|
683
|
-
<Stack direction="row" spacing={2} sx={{ mt: 3 }}>
|
|
684
|
-
<Button variant="outlined" fullWidth>팔로우</Button>
|
|
685
|
-
<Button fullWidth>메시지</Button>
|
|
686
|
-
</Stack>
|
|
687
|
-
</Sheet>
|
|
688
|
-
```
|
|
689
|
-
|
|
690
|
-
### Dashboard Cards
|
|
691
|
-
|
|
692
|
-
```tsx
|
|
693
|
-
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'lg' }}>
|
|
694
|
-
<Typography level="body-sm" color="neutral">
|
|
695
|
-
총 매출
|
|
696
|
-
</Typography>
|
|
697
|
-
<Typography level="h2" color="primary">
|
|
698
|
-
₩1,234,567
|
|
699
|
-
</Typography>
|
|
700
|
-
<Typography level="body-xs" color="success">
|
|
701
|
-
+12% 증가
|
|
702
|
-
</Typography>
|
|
703
|
-
</Sheet>
|
|
704
|
-
```
|
|
705
|
-
|
|
706
|
-
### Content Cards
|
|
607
|
+
import { Sheet, Typography, Stack } from '@ceed/ads';
|
|
707
608
|
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
</Sheet>
|
|
609
|
+
function StatWidget({ label, value, change }) {
|
|
610
|
+
return (
|
|
611
|
+
<Sheet variant="outlined" sx={{ p: 3, borderRadius: 'lg', minWidth: 200 }}>
|
|
612
|
+
<Stack spacing={1}>
|
|
613
|
+
<Typography level="body-sm" sx={{ color: 'text.secondary' }}>
|
|
614
|
+
{label}
|
|
615
|
+
</Typography>
|
|
616
|
+
<Typography level="h2" color="primary">
|
|
617
|
+
{value}
|
|
618
|
+
</Typography>
|
|
619
|
+
<Typography
|
|
620
|
+
level="body-xs"
|
|
621
|
+
sx={{ color: change > 0 ? 'success.600' : 'danger.600' }}
|
|
622
|
+
>
|
|
623
|
+
{change > 0 ? '+' : ''}{change}% from last month
|
|
624
|
+
</Typography>
|
|
625
|
+
</Stack>
|
|
626
|
+
</Sheet>
|
|
627
|
+
);
|
|
628
|
+
}
|
|
726
629
|
```
|
|
727
630
|
|
|
728
|
-
###
|
|
631
|
+
### Alert Banner
|
|
729
632
|
|
|
730
633
|
```tsx
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
로그인
|
|
734
|
-
</Typography>
|
|
735
|
-
|
|
736
|
-
<Stack spacing={2}>
|
|
737
|
-
<FormControl>
|
|
738
|
-
<FormLabel>이메일</FormLabel>
|
|
739
|
-
<Input type="email" />
|
|
740
|
-
</FormControl>
|
|
741
|
-
|
|
742
|
-
<FormControl>
|
|
743
|
-
<FormLabel>비밀번호</FormLabel>
|
|
744
|
-
<Input type="password" />
|
|
745
|
-
</FormControl>
|
|
634
|
+
import { Sheet, Typography, Stack, Button } from '@ceed/ads';
|
|
635
|
+
import WarningIcon from '@mui/icons-material/Warning';
|
|
746
636
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
637
|
+
function AlertBanner({ message, onDismiss }) {
|
|
638
|
+
return (
|
|
639
|
+
<Sheet
|
|
640
|
+
variant="soft"
|
|
641
|
+
color="warning"
|
|
642
|
+
sx={{ borderRadius: 'md', p: 2 }}
|
|
643
|
+
>
|
|
644
|
+
<Stack direction="row" alignItems="center" spacing={2}>
|
|
645
|
+
<WarningIcon />
|
|
646
|
+
<Typography level="body-md" sx={{ flex: 1 }}>
|
|
647
|
+
{message}
|
|
648
|
+
</Typography>
|
|
649
|
+
<Button size="sm" variant="plain" onClick={onDismiss}>
|
|
650
|
+
Dismiss
|
|
651
|
+
</Button>
|
|
652
|
+
</Stack>
|
|
653
|
+
</Sheet>
|
|
654
|
+
);
|
|
655
|
+
}
|
|
750
656
|
```
|
|
751
657
|
|
|
752
|
-
###
|
|
658
|
+
### Content Card with Hover Effect
|
|
753
659
|
|
|
754
660
|
```tsx
|
|
755
|
-
|
|
756
|
-
variant="outlined"
|
|
757
|
-
sx={{
|
|
758
|
-
position: 'fixed',
|
|
759
|
-
top: '50%',
|
|
760
|
-
left: '50%',
|
|
761
|
-
transform: 'translate(-50%, -50%)',
|
|
762
|
-
borderRadius: 'lg',
|
|
763
|
-
p: 4,
|
|
764
|
-
maxWidth: 400,
|
|
765
|
-
boxShadow: 'lg',
|
|
766
|
-
}}
|
|
767
|
-
>
|
|
768
|
-
<Typography level="title-lg" sx={{ mb: 2 }}>
|
|
769
|
-
확인 필요
|
|
770
|
-
</Typography>
|
|
771
|
-
<Typography level="body-md" sx={{ mb: 3 }}>
|
|
772
|
-
정말로 이 작업을 수행하시겠습니까?
|
|
773
|
-
</Typography>
|
|
774
|
-
|
|
775
|
-
<Stack direction="row" spacing={2} justifyContent="flex-end">
|
|
776
|
-
<Button variant="outlined">취소</Button>
|
|
777
|
-
<Button color="danger">삭제</Button>
|
|
778
|
-
</Stack>
|
|
779
|
-
</Sheet>
|
|
780
|
-
```
|
|
781
|
-
|
|
782
|
-
### Notification Banners
|
|
661
|
+
import { Sheet, Typography, Stack } from '@ceed/ads';
|
|
783
662
|
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
663
|
+
function ClickableCard({ title, description, onClick }) {
|
|
664
|
+
return (
|
|
665
|
+
<Sheet
|
|
666
|
+
variant="outlined"
|
|
667
|
+
sx={{
|
|
668
|
+
p: 3,
|
|
669
|
+
borderRadius: 'lg',
|
|
670
|
+
cursor: 'pointer',
|
|
671
|
+
transition: 'all 0.2s',
|
|
672
|
+
'&:hover': {
|
|
673
|
+
boxShadow: 'md',
|
|
674
|
+
transform: 'translateY(-2px)',
|
|
675
|
+
},
|
|
676
|
+
}}
|
|
677
|
+
onClick={onClick}
|
|
678
|
+
>
|
|
679
|
+
<Stack spacing={1}>
|
|
680
|
+
<Typography level="title-lg">{title}</Typography>
|
|
681
|
+
<Typography level="body-md">{description}</Typography>
|
|
682
|
+
</Stack>
|
|
683
|
+
</Sheet>
|
|
684
|
+
);
|
|
685
|
+
}
|
|
800
686
|
```
|
|
801
687
|
|
|
802
688
|
## Best Practices
|
|
803
689
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
2. **의미있는 변형 선택**:
|
|
810
|
-
- `outlined`: 일반적인 카드나 패널
|
|
811
|
-
- `soft`: 부드러운 강조나 구분
|
|
812
|
-
- `solid`: 강한 강조나 액션
|
|
813
|
-
- `plain`: 미니멀하거나 중첩된 콘텐츠
|
|
814
|
-
|
|
815
|
-
3. **색상의 의미 활용**:
|
|
816
|
-
- `danger`: 오류, 삭제 등 위험한 작업
|
|
817
|
-
- `success`: 성공 메시지, 완료 상태
|
|
818
|
-
- `warning`: 주의사항, 중요 알림
|
|
819
|
-
- `primary`: 주요 액션, 강조 콘텐츠
|
|
820
|
-
- `neutral`: 일반 콘텐츠
|
|
821
|
-
|
|
822
|
-
4. **반응형 고려**:
|
|
823
|
-
```tsx
|
|
824
|
-
<Sheet sx={{
|
|
825
|
-
maxWidth: { xs: '100%', sm: 400 },
|
|
826
|
-
borderRadius: { xs: 0, sm: 'lg' },
|
|
827
|
-
p: { xs: 2, sm: 3 }
|
|
828
|
-
}}>
|
|
829
|
-
```
|
|
830
|
-
|
|
831
|
-
5. **접근성**:
|
|
832
|
-
- 적절한 시맨틱 태그와 함께 사용하세요
|
|
833
|
-
- 충분한 색상 대비를 유지하세요
|
|
834
|
-
- 키보드 탐색을 고려하세요
|
|
835
|
-
|
|
836
|
-
6. **성능**:
|
|
837
|
-
- 그림자나 복잡한 스타일은 필요할 때만 사용하세요
|
|
838
|
-
- 많은 카드가 있을 때는 가상화를 고려하세요
|
|
839
|
-
|
|
840
|
-
7. **일관성**:
|
|
841
|
-
- 프로젝트 전반에서 일관된 borderRadius와 spacing을 사용하세요
|
|
842
|
-
- 비슷한 콘텐츠에는 동일한 variant를 사용하세요
|
|
843
|
-
|
|
844
|
-
## Advanced Usage
|
|
845
|
-
|
|
846
|
-
### Custom Styling
|
|
690
|
+
- **Choose the right variant for the context.**
|
|
691
|
+
- `outlined` for general-purpose cards and panels
|
|
692
|
+
- `soft` for subtle emphasis or notification banners
|
|
693
|
+
- `solid` for high-emphasis content that demands attention
|
|
694
|
+
- `plain` for minimal or nested containers
|
|
847
695
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
|
|
855
|
-
color: 'white',
|
|
856
|
-
p: 3,
|
|
857
|
-
}}
|
|
858
|
-
>
|
|
859
|
-
커스텀 스타일링
|
|
860
|
-
</Sheet>
|
|
861
|
-
```
|
|
696
|
+
- **Use semantic colors intentionally.**
|
|
697
|
+
- `danger` for error states and destructive actions
|
|
698
|
+
- `success` for confirmation messages and positive outcomes
|
|
699
|
+
- `warning` for caution alerts and important notices
|
|
700
|
+
- `primary` for highlighted or brand-related content
|
|
701
|
+
- `neutral` for general, non-semantic content
|
|
862
702
|
|
|
863
|
-
|
|
703
|
+
- **Maintain consistent spacing.**
|
|
704
|
+
- Use the `sx` prop with design tokens (`p: 3`, `borderRadius: 'lg'`) rather than arbitrary pixel values to keep layouts consistent across the application.
|
|
864
705
|
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
variant="outlined"
|
|
868
|
-
sx={{
|
|
869
|
-
cursor: 'pointer',
|
|
870
|
-
transition: 'all 0.2s',
|
|
871
|
-
'&:hover': {
|
|
872
|
-
boxShadow: 'md',
|
|
873
|
-
transform: 'translateY(-2px)',
|
|
874
|
-
},
|
|
875
|
-
'&:active': {
|
|
876
|
-
transform: 'translateY(0)',
|
|
877
|
-
},
|
|
878
|
-
}}
|
|
879
|
-
onClick={() => console.log('clicked')}
|
|
880
|
-
>
|
|
881
|
-
클릭 가능한 카드
|
|
882
|
-
</Sheet>
|
|
883
|
-
```
|
|
706
|
+
- **Avoid deeply nested Sheets.**
|
|
707
|
+
- While nesting is supported, more than two levels of nesting can make the visual hierarchy confusing. Consider flattening the structure or using Divider components instead.
|
|
884
708
|
|
|
885
|
-
|
|
709
|
+
- **Prefer composition over complexity.**
|
|
710
|
+
- Sheet is intentionally a low-level primitive. Compose it with Typography, Stack, Button, and other components rather than overloading the Sheet with custom styling.
|
|
886
711
|
|
|
887
|
-
|
|
888
|
-
<Sheet
|
|
889
|
-
initial={{ opacity: 0, y: 20 }}
|
|
890
|
-
animate={{ opacity: 1, y: 0 }}
|
|
891
|
-
transition={{ duration: 0.3 }}
|
|
892
|
-
whileHover={{ scale: 1.02 }}
|
|
893
|
-
variant="outlined"
|
|
894
|
-
sx={{ p: 3 }}
|
|
895
|
-
>
|
|
896
|
-
애니메이션 카드
|
|
897
|
-
</Sheet>
|
|
898
|
-
```
|
|
712
|
+
## Accessibility
|
|
899
713
|
|
|
900
|
-
Sheet
|
|
714
|
+
- Sheet renders as a `<div>` by default. When the content has a semantic meaning (e.g., a section or article), use the `component` prop to render an appropriate HTML element such as `<section>` or `<article>`.
|
|
715
|
+
- When a Sheet is interactive (clickable), ensure it has a proper `role` attribute (e.g., `role="button"`) and supports keyboard interaction via `tabIndex` and `onKeyDown`.
|
|
716
|
+
- Maintain sufficient color contrast between the Sheet background and its text content, especially when using `variant="solid"` with colored backgrounds.
|
|
717
|
+
- Avoid relying solely on color to convey information. Pair color indicators with icons or text labels for users with color vision deficiencies.
|