@ceed/ads 1.29.1 → 1.30.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.
- package/dist/Overview.md +5 -5
- package/dist/components/DatePicker/DatePicker.d.ts +10 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +10 -0
- package/dist/components/data-display/Avatar.md +85 -74
- package/dist/components/data-display/Badge.md +23 -5
- package/dist/components/data-display/Chip.md +49 -35
- package/dist/components/data-display/DataTable.md +93 -0
- package/dist/components/data-display/InfoSign.md +15 -5
- package/dist/components/data-display/Markdown.md +22 -26
- package/dist/components/data-display/Table.md +63 -53
- package/dist/components/data-display/Tooltip.md +70 -58
- package/dist/components/data-display/Typography.md +28 -11
- package/dist/components/feedback/Alert.md +86 -74
- package/dist/components/feedback/CircularProgress.md +20 -5
- package/dist/components/feedback/Dialog.md +8 -12
- package/dist/components/feedback/Modal.md +12 -16
- package/dist/components/feedback/Skeleton.md +20 -5
- package/dist/components/inputs/Autocomplete.md +8 -10
- package/dist/components/inputs/Button.md +107 -87
- package/dist/components/inputs/ButtonGroup.md +20 -5
- package/dist/components/inputs/Calendar.md +25 -5
- package/dist/components/inputs/Checkbox.md +171 -450
- package/dist/components/inputs/CurrencyInput.md +25 -5
- package/dist/components/inputs/DatePicker.md +87 -5
- package/dist/components/inputs/DateRangePicker.md +91 -5
- package/dist/components/inputs/FilterMenu.md +85 -9
- package/dist/components/inputs/FilterableCheckboxGroup.md +23 -8
- package/dist/components/inputs/FormControl.md +34 -6
- package/dist/components/inputs/IconButton.md +21 -5
- package/dist/components/inputs/Input.md +254 -68
- package/dist/components/inputs/MonthPicker.md +28 -5
- package/dist/components/inputs/MonthRangePicker.md +26 -5
- package/dist/components/inputs/PercentageInput.md +28 -5
- package/dist/components/inputs/RadioButton.md +26 -5
- package/dist/components/inputs/RadioList.md +23 -6
- package/dist/components/inputs/RadioTileGroup.md +40 -8
- package/dist/components/inputs/Select.md +59 -5
- package/dist/components/inputs/Slider.md +26 -5
- package/dist/components/inputs/Switch.md +23 -5
- package/dist/components/inputs/Textarea.md +27 -5
- package/dist/components/inputs/Uploader/Uploader.md +24 -5
- package/dist/components/layout/Box.md +66 -58
- package/dist/components/layout/Container.md +9 -13
- package/dist/components/layout/Grid.md +91 -75
- package/dist/components/layout/Stack.md +85 -70
- package/dist/components/navigation/Breadcrumbs.md +23 -14
- package/dist/components/navigation/Dropdown.md +29 -20
- package/dist/components/navigation/IconMenuButton.md +24 -11
- package/dist/components/navigation/InsetDrawer.md +16 -5
- package/dist/components/navigation/Link.md +30 -14
- package/dist/components/navigation/Menu.md +33 -20
- package/dist/components/navigation/MenuButton.md +26 -12
- package/dist/components/navigation/NavigationGroup.md +7 -11
- package/dist/components/navigation/NavigationItem.md +8 -12
- package/dist/components/navigation/Navigator.md +5 -9
- package/dist/components/navigation/Pagination.md +21 -12
- package/dist/components/navigation/ProfileMenu.md +17 -5
- package/dist/components/navigation/Stepper.md +18 -5
- package/dist/components/navigation/Tabs.md +37 -14
- package/dist/components/surfaces/Accordions.md +12 -16
- package/dist/components/surfaces/Card.md +59 -47
- package/dist/components/surfaces/Divider.md +70 -61
- package/dist/components/surfaces/Sheet.md +18 -5
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.js.map +3 -3
- package/dist/index.cjs +173 -6
- package/dist/index.js +173 -6
- package/framer/index.js +1 -1
- package/package.json +1 -1
|
@@ -50,8 +50,6 @@ function MyComponent() {
|
|
|
50
50
|
}
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
## Features
|
|
54
|
-
|
|
55
53
|
### Basic Tabs
|
|
56
54
|
|
|
57
55
|
Default horizontal tab navigation with tab panels.
|
|
@@ -75,7 +73,7 @@ Default horizontal tab navigation with tab panels.
|
|
|
75
73
|
</Tabs>
|
|
76
74
|
```
|
|
77
75
|
|
|
78
|
-
|
|
76
|
+
## Tab Variants
|
|
79
77
|
|
|
80
78
|
Tabs support `plain`, `outlined`, `soft`, and `solid` visual styles. Apply the variant to both TabList and individual Tab components for a consistent appearance.
|
|
81
79
|
|
|
@@ -116,7 +114,7 @@ Tabs support `plain`, `outlined`, `soft`, and `solid` visual styles. Apply the v
|
|
|
116
114
|
</div>
|
|
117
115
|
```
|
|
118
116
|
|
|
119
|
-
|
|
117
|
+
## Tab Sizes
|
|
120
118
|
|
|
121
119
|
Tabs come in `sm`, `md`, and `lg` sizes. Set the `size` prop on the Tabs container to affect all child components uniformly.
|
|
122
120
|
|
|
@@ -150,7 +148,7 @@ Tabs come in `sm`, `md`, and `lg` sizes. Set the `size` prop on the Tabs contain
|
|
|
150
148
|
</div>
|
|
151
149
|
```
|
|
152
150
|
|
|
153
|
-
|
|
151
|
+
## Tab Colors
|
|
154
152
|
|
|
155
153
|
Apply semantic colors (`primary`, `neutral`, `success`, `warning`, `danger`) to individual tabs for color-coded navigation.
|
|
156
154
|
|
|
@@ -193,7 +191,7 @@ Apply semantic colors (`primary`, `neutral`, `success`, `warning`, `danger`) to
|
|
|
193
191
|
</div>
|
|
194
192
|
```
|
|
195
193
|
|
|
196
|
-
|
|
194
|
+
## Tabs with Icon Decorators
|
|
197
195
|
|
|
198
196
|
Add icons or other elements before or after the tab label using `startDecorator` and `endDecorator` props.
|
|
199
197
|
|
|
@@ -216,7 +214,7 @@ Add icons or other elements before or after the tab label using `startDecorator`
|
|
|
216
214
|
</Tabs>
|
|
217
215
|
```
|
|
218
216
|
|
|
219
|
-
|
|
217
|
+
## Vertical Tabs
|
|
220
218
|
|
|
221
219
|
Set `orientation="vertical"` on the Tabs container for sidebar-style navigation layouts.
|
|
222
220
|
|
|
@@ -235,7 +233,7 @@ Set `orientation="vertical"` on the Tabs container for sidebar-style navigation
|
|
|
235
233
|
</Tabs>
|
|
236
234
|
```
|
|
237
235
|
|
|
238
|
-
|
|
236
|
+
## Disabled Tabs
|
|
239
237
|
|
|
240
238
|
Individual tabs can be disabled with the `disabled` prop while keeping other tabs interactive.
|
|
241
239
|
|
|
@@ -252,7 +250,7 @@ Individual tabs can be disabled with the `disabled` prop while keeping other tab
|
|
|
252
250
|
</Tabs>
|
|
253
251
|
```
|
|
254
252
|
|
|
255
|
-
|
|
253
|
+
## Controlled Tabs
|
|
256
254
|
|
|
257
255
|
Use the `value` and `onChange` props for programmatic control of the active tab.
|
|
258
256
|
|
|
@@ -274,9 +272,7 @@ Use the `value` and `onChange` props for programmatic control of the active tab.
|
|
|
274
272
|
</div>
|
|
275
273
|
```
|
|
276
274
|
|
|
277
|
-
##
|
|
278
|
-
|
|
279
|
-
### Settings Page
|
|
275
|
+
## Tabs for Settings Page
|
|
280
276
|
|
|
281
277
|
```tsx
|
|
282
278
|
function SettingsPage() {
|
|
@@ -295,7 +291,7 @@ function SettingsPage() {
|
|
|
295
291
|
}
|
|
296
292
|
```
|
|
297
293
|
|
|
298
|
-
|
|
294
|
+
## Tabs for Dashboard Navigation
|
|
299
295
|
|
|
300
296
|
```tsx
|
|
301
297
|
function DashboardTabs() {
|
|
@@ -316,7 +312,7 @@ function DashboardTabs() {
|
|
|
316
312
|
}
|
|
317
313
|
```
|
|
318
314
|
|
|
319
|
-
|
|
315
|
+
## Vertical Sidebar Tabs
|
|
320
316
|
|
|
321
317
|
```tsx
|
|
322
318
|
function SidebarTabs() {
|
|
@@ -335,6 +331,33 @@ function SidebarTabs() {
|
|
|
335
331
|
}
|
|
336
332
|
```
|
|
337
333
|
|
|
334
|
+
## Props and Customization
|
|
335
|
+
|
|
336
|
+
### Tabs Props
|
|
337
|
+
|
|
338
|
+
| Prop | Type | Default | Description |
|
|
339
|
+
| -------------- | -------------------------------------------------------------- | -------------- | --------------------------------- |
|
|
340
|
+
| `children` | `ReactNode` | - | TabList and TabPanel elements |
|
|
341
|
+
| `value` | `string \| number` | - | Active tab value (controlled) |
|
|
342
|
+
| `defaultValue` | `string \| number` | - | Initial active tab (uncontrolled) |
|
|
343
|
+
| `onChange` | `(event, value) => void` | - | Callback when active tab changes |
|
|
344
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'horizontal'` | Tab layout direction |
|
|
345
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Tab size |
|
|
346
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'plain'` | Visual style |
|
|
347
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
348
|
+
| `sx` | `SxProps` | - | Custom styles |
|
|
349
|
+
|
|
350
|
+
### Tab Props
|
|
351
|
+
|
|
352
|
+
| Prop | Type | Default | Description |
|
|
353
|
+
| ---------------- | ------------------ | ------- | ----------------------- |
|
|
354
|
+
| `value` | `string \| number` | - | Tab identifier |
|
|
355
|
+
| `startDecorator` | `ReactNode` | - | Content before tab text |
|
|
356
|
+
| `endDecorator` | `ReactNode` | - | Content after tab text |
|
|
357
|
+
| `disabled` | `boolean` | `false` | Disables the tab |
|
|
358
|
+
|
|
359
|
+
> **Note**: Tabs, Tab, TabList, and TabPanel accept all their respective Joy UI props.
|
|
360
|
+
|
|
338
361
|
## Best Practices
|
|
339
362
|
|
|
340
363
|
- **Use clear, concise tab labels.** Each label should describe the content it reveals. Avoid generic names like "Tab 1" or "Other".
|
|
@@ -48,9 +48,7 @@ function FAQSection() {
|
|
|
48
48
|
}
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
### Playground
|
|
51
|
+
## Accordion Playground
|
|
54
52
|
|
|
55
53
|
Interactive example with all controls.
|
|
56
54
|
|
|
@@ -58,7 +56,7 @@ Interactive example with all controls.
|
|
|
58
56
|
<Accordions {...args} />
|
|
59
57
|
```
|
|
60
58
|
|
|
61
|
-
|
|
59
|
+
## Accordion Basics
|
|
62
60
|
|
|
63
61
|
Basic accordion with multiple collapsible sections.
|
|
64
62
|
|
|
@@ -77,7 +75,7 @@ Basic accordion with multiple collapsible sections.
|
|
|
77
75
|
/>
|
|
78
76
|
```
|
|
79
77
|
|
|
80
|
-
|
|
78
|
+
## Accordion Sizes
|
|
81
79
|
|
|
82
80
|
Available size options: `sm`, `md`, `lg`.
|
|
83
81
|
|
|
@@ -89,7 +87,7 @@ Available size options: `sm`, `md`, `lg`.
|
|
|
89
87
|
</>
|
|
90
88
|
```
|
|
91
89
|
|
|
92
|
-
|
|
90
|
+
## Accordion Variants
|
|
93
91
|
|
|
94
92
|
Style variants: `plain`, `outlined`, `soft`, `solid`.
|
|
95
93
|
|
|
@@ -114,7 +112,7 @@ Style variants: `plain`, `outlined`, `soft`, `solid`.
|
|
|
114
112
|
</>
|
|
115
113
|
```
|
|
116
114
|
|
|
117
|
-
|
|
115
|
+
## Accordion Colors
|
|
118
116
|
|
|
119
117
|
Color options: `primary`, `neutral`, `danger`, `success`, `warning`.
|
|
120
118
|
|
|
@@ -143,7 +141,7 @@ Color options: `primary`, `neutral`, `danger`, `success`, `warning`.
|
|
|
143
141
|
</>
|
|
144
142
|
```
|
|
145
143
|
|
|
146
|
-
|
|
144
|
+
## Accordion without Divider
|
|
147
145
|
|
|
148
146
|
Use `disableDivider` to remove the divider lines between accordion items.
|
|
149
147
|
|
|
@@ -172,9 +170,7 @@ Use `disableDivider` to remove the divider lines between accordion items.
|
|
|
172
170
|
- **Single item**: Don't use accordion for a single collapsible section
|
|
173
171
|
- **Deeply nested content**: Avoid nesting accordions within accordions
|
|
174
172
|
|
|
175
|
-
##
|
|
176
|
-
|
|
177
|
-
### FAQ Section
|
|
173
|
+
## Accordion for FAQ
|
|
178
174
|
|
|
179
175
|
```tsx
|
|
180
176
|
function FAQAccordion() {
|
|
@@ -224,7 +220,7 @@ function FAQAccordion() {
|
|
|
224
220
|
}
|
|
225
221
|
```
|
|
226
222
|
|
|
227
|
-
|
|
223
|
+
## Accordion for Settings Panel
|
|
228
224
|
|
|
229
225
|
```tsx
|
|
230
226
|
function SettingsAccordion({ settings, onSettingChange }) {
|
|
@@ -307,7 +303,7 @@ function SettingsAccordion({ settings, onSettingChange }) {
|
|
|
307
303
|
}
|
|
308
304
|
```
|
|
309
305
|
|
|
310
|
-
|
|
306
|
+
## Accordion for Product Details
|
|
311
307
|
|
|
312
308
|
```tsx
|
|
313
309
|
function ProductAccordion({ product }) {
|
|
@@ -387,7 +383,7 @@ function ProductAccordion({ product }) {
|
|
|
387
383
|
}
|
|
388
384
|
```
|
|
389
385
|
|
|
390
|
-
|
|
386
|
+
## Accordion for Navigation Menu
|
|
391
387
|
|
|
392
388
|
```tsx
|
|
393
389
|
function NavigationAccordion() {
|
|
@@ -463,7 +459,7 @@ function NavigationAccordion() {
|
|
|
463
459
|
}
|
|
464
460
|
```
|
|
465
461
|
|
|
466
|
-
|
|
462
|
+
## Accordion for Help Documentation
|
|
467
463
|
|
|
468
464
|
```tsx
|
|
469
465
|
function HelpAccordion() {
|
|
@@ -544,7 +540,7 @@ function HelpAccordion() {
|
|
|
544
540
|
}
|
|
545
541
|
```
|
|
546
542
|
|
|
547
|
-
|
|
543
|
+
## Collapsible Form Sections
|
|
548
544
|
|
|
549
545
|
```tsx
|
|
550
546
|
function MultiSectionForm({ onSubmit }) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Introduction
|
|
4
4
|
|
|
5
|
-
Card
|
|
5
|
+
The Card component is a UI element that groups related content and actions within a single container. It helps users scan and understand information more easily by structuring and visually grouping it. It is commonly used for news feeds, product lists, user profiles, dashboard widgets, and more.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Card {...args} sx={{
|
|
@@ -38,11 +38,9 @@ function MyComponent() {
|
|
|
38
38
|
}
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Card Basic Usage
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
가장 기본적인 카드 사용법입니다.
|
|
43
|
+
The most basic way to use a card.
|
|
46
44
|
|
|
47
45
|
```tsx
|
|
48
46
|
<div style={{
|
|
@@ -63,9 +61,9 @@ function MyComponent() {
|
|
|
63
61
|
</div>
|
|
64
62
|
```
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
## Card Variants
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
Provides various style variants.
|
|
69
67
|
|
|
70
68
|
```tsx
|
|
71
69
|
<div style={{
|
|
@@ -111,9 +109,9 @@ function MyComponent() {
|
|
|
111
109
|
</div>
|
|
112
110
|
```
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
## Card Colors
|
|
115
113
|
|
|
116
|
-
|
|
114
|
+
You can apply various colors.
|
|
117
115
|
|
|
118
116
|
```tsx
|
|
119
117
|
<div style={{
|
|
@@ -168,9 +166,9 @@ function MyComponent() {
|
|
|
168
166
|
</div>
|
|
169
167
|
```
|
|
170
168
|
|
|
171
|
-
|
|
169
|
+
## Card Sizes
|
|
172
170
|
|
|
173
|
-
|
|
171
|
+
You can adjust the size.
|
|
174
172
|
|
|
175
173
|
```tsx
|
|
176
174
|
<div style={{
|
|
@@ -208,9 +206,9 @@ function MyComponent() {
|
|
|
208
206
|
</div>
|
|
209
207
|
```
|
|
210
208
|
|
|
211
|
-
|
|
209
|
+
## Card With Cover
|
|
212
210
|
|
|
213
|
-
|
|
211
|
+
A card that uses the `CardCover` component to display an image as the background.
|
|
214
212
|
|
|
215
213
|
```tsx
|
|
216
214
|
<div style={{
|
|
@@ -254,9 +252,9 @@ function MyComponent() {
|
|
|
254
252
|
</div>
|
|
255
253
|
```
|
|
256
254
|
|
|
257
|
-
|
|
255
|
+
## Card With Actions
|
|
258
256
|
|
|
259
|
-
|
|
257
|
+
You can place action buttons at the bottom.
|
|
260
258
|
|
|
261
259
|
```tsx
|
|
262
260
|
<div style={{
|
|
@@ -305,9 +303,9 @@ function MyComponent() {
|
|
|
305
303
|
</div>
|
|
306
304
|
```
|
|
307
305
|
|
|
308
|
-
|
|
306
|
+
## Card With Overflow
|
|
309
307
|
|
|
310
|
-
CardOverflow
|
|
308
|
+
Use `CardOverflow` to display content that extends beyond the card's padded boundary.
|
|
311
309
|
|
|
312
310
|
```tsx
|
|
313
311
|
<div style={{
|
|
@@ -442,9 +440,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
442
440
|
</div>
|
|
443
441
|
```
|
|
444
442
|
|
|
445
|
-
|
|
443
|
+
## Card Interactive Cards
|
|
446
444
|
|
|
447
|
-
|
|
445
|
+
Interactive cards with click behavior and hover effects.
|
|
448
446
|
|
|
449
447
|
```tsx
|
|
450
448
|
<div style={{
|
|
@@ -482,9 +480,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
482
480
|
</div>
|
|
483
481
|
```
|
|
484
482
|
|
|
485
|
-
|
|
483
|
+
## Card Media Cards
|
|
486
484
|
|
|
487
|
-
|
|
485
|
+
Media cards used with images.
|
|
488
486
|
|
|
489
487
|
```tsx
|
|
490
488
|
<div style={{
|
|
@@ -559,9 +557,9 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
559
557
|
</div>
|
|
560
558
|
```
|
|
561
559
|
|
|
562
|
-
|
|
560
|
+
## Card Complex Layout
|
|
563
561
|
|
|
564
|
-
|
|
562
|
+
A social-media-style card with a complex layout.
|
|
565
563
|
|
|
566
564
|
```tsx
|
|
567
565
|
<div style={{
|
|
@@ -631,21 +629,21 @@ CardOverflow를 사용하여 카드의 경계를 넘나드는 콘텐츠를 표
|
|
|
631
629
|
|
|
632
630
|
## Card Components
|
|
633
631
|
|
|
634
|
-
Card
|
|
632
|
+
Card is composed of several subcomponents:
|
|
635
633
|
|
|
636
634
|
### Card
|
|
637
635
|
|
|
638
|
-
|
|
636
|
+
The main card container.
|
|
639
637
|
|
|
640
638
|
```tsx
|
|
641
639
|
<Card variant="outlined" color="neutral" size="md">
|
|
642
|
-
{/*
|
|
640
|
+
{/* card content */}
|
|
643
641
|
</Card>
|
|
644
642
|
```
|
|
645
643
|
|
|
646
644
|
### CardContent
|
|
647
645
|
|
|
648
|
-
|
|
646
|
+
The area that contains the card's primary content.
|
|
649
647
|
|
|
650
648
|
```tsx
|
|
651
649
|
<CardContent>
|
|
@@ -656,7 +654,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
656
654
|
|
|
657
655
|
### CardCover
|
|
658
656
|
|
|
659
|
-
|
|
657
|
+
Displays background media or an image that covers the entire card.
|
|
660
658
|
|
|
661
659
|
```tsx
|
|
662
660
|
<CardCover>
|
|
@@ -666,7 +664,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
666
664
|
|
|
667
665
|
### CardActions
|
|
668
666
|
|
|
669
|
-
|
|
667
|
+
The area used to place action buttons.
|
|
670
668
|
|
|
671
669
|
```tsx
|
|
672
670
|
<CardActions>
|
|
@@ -677,7 +675,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
677
675
|
|
|
678
676
|
### CardOverflow
|
|
679
677
|
|
|
680
|
-
|
|
678
|
+
An area that ignores the card's padding and uses the full width.
|
|
681
679
|
|
|
682
680
|
```tsx
|
|
683
681
|
<CardOverflow>
|
|
@@ -687,9 +685,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
687
685
|
</CardOverflow>
|
|
688
686
|
```
|
|
689
687
|
|
|
690
|
-
##
|
|
691
|
-
|
|
692
|
-
### Product Cards
|
|
688
|
+
## Product Cards
|
|
693
689
|
|
|
694
690
|
```tsx
|
|
695
691
|
<Card sx={{ maxWidth: 320 }}>
|
|
@@ -713,7 +709,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
713
709
|
</Card>
|
|
714
710
|
```
|
|
715
711
|
|
|
716
|
-
|
|
712
|
+
## User Profile Cards
|
|
717
713
|
|
|
718
714
|
```tsx
|
|
719
715
|
<Card sx={{ maxWidth: 320 }}>
|
|
@@ -733,7 +729,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
733
729
|
</Card>
|
|
734
730
|
```
|
|
735
731
|
|
|
736
|
-
|
|
732
|
+
## News Cards
|
|
737
733
|
|
|
738
734
|
```tsx
|
|
739
735
|
<Card sx={{ maxWidth: 400 }}>
|
|
@@ -752,7 +748,7 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
752
748
|
</Card>
|
|
753
749
|
```
|
|
754
750
|
|
|
755
|
-
|
|
751
|
+
## Dashboard Widget Cards
|
|
756
752
|
|
|
757
753
|
```tsx
|
|
758
754
|
<Card variant="soft" color="primary">
|
|
@@ -764,23 +760,39 @@ Card는 여러 하위 컴포넌트로 구성됩니다:
|
|
|
764
760
|
</Card>
|
|
765
761
|
```
|
|
766
762
|
|
|
763
|
+
## Props and Customization
|
|
764
|
+
|
|
765
|
+
### Key Props
|
|
766
|
+
|
|
767
|
+
| Prop | Type | Default | Description |
|
|
768
|
+
| ---------------- | -------------------------------------------------------------- | ------------ | -------------------------------------------------------- |
|
|
769
|
+
| `children` | `ReactNode` | - | Card content (CardContent, CardCover, CardActions, etc.) |
|
|
770
|
+
| `variant` | `'solid' \| 'soft' \| 'outlined' \| 'plain'` | `'outlined'` | Visual style |
|
|
771
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Card size (affects padding) |
|
|
772
|
+
| `color` | `'primary' \| 'neutral' \| 'danger' \| 'success' \| 'warning'` | `'neutral'` | Color scheme |
|
|
773
|
+
| `orientation` | `'horizontal' \| 'vertical'` | `'vertical'` | Card layout direction |
|
|
774
|
+
| `invertedColors` | `boolean` | `false` | Invert child component colors |
|
|
775
|
+
| `sx` | `SxProps` | - | Custom styles |
|
|
776
|
+
|
|
777
|
+
> **Note**: Card also accepts all Joy UI Card props and Framer Motion props.
|
|
778
|
+
|
|
767
779
|
## Best Practices
|
|
768
780
|
|
|
769
|
-
1.
|
|
781
|
+
1. **Use an appropriate size**: Set a size that fits the card content. If it is too large or too small, readability suffers.
|
|
770
782
|
|
|
771
|
-
2.
|
|
783
|
+
2. **Keep styles consistent**: Cards used in the same context should share consistent `variant`, `color`, and `size` values.
|
|
772
784
|
|
|
773
|
-
3.
|
|
785
|
+
3. **Create clear hierarchy**: Use Typography levels to build a visual hierarchy based on the importance of the information.
|
|
774
786
|
|
|
775
|
-
4.
|
|
787
|
+
4. **Use proper spacing**: When listing multiple cards, keep enough space between them so each one is clearly distinguishable.
|
|
776
788
|
|
|
777
|
-
5.
|
|
778
|
-
-
|
|
779
|
-
-
|
|
780
|
-
-
|
|
789
|
+
5. **Consider accessibility**:
|
|
790
|
+
- Support keyboard navigation when cards are clickable
|
|
791
|
+
- Provide appropriate `alt` text for images
|
|
792
|
+
- Do not rely on color alone to communicate information
|
|
781
793
|
|
|
782
|
-
6.
|
|
794
|
+
6. **Use responsive design**: Use `maxWidth` or responsive props so cards work well across different screen sizes.
|
|
783
795
|
|
|
784
|
-
7.
|
|
796
|
+
7. **Handle loading states**: Use Skeleton components to represent loading states while data is being fetched.
|
|
785
797
|
|
|
786
|
-
8.
|
|
798
|
+
8. **Limit action buttons**: Include only primary actions directly related to the card in `CardActions`. Too many buttons can create confusion.
|