-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(docs): add documentation for interactive cards
- Loading branch information
1 parent
bd63eac
commit 807e63d
Showing
56 changed files
with
295 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
### Live Demos | ||
|
||
<br/> | ||
|
||
#### Action Card | ||
|
||
<Preview name="layout-action-card-all--all" /> | ||
|
||
<PreviewWithPropTable name="layout-action-card-all--all" /> | ||
|
||
#### Selection Card | ||
|
||
<Preview name="layout-selection-card-all--all" /> | ||
|
||
<PreviewWithPropTable name="layout-selection-card-all--all" /> |
Binary file added
BIN
+50.7 KB
docs/src/pages/components/interactiveCard/images/Action-card-states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.8 KB
docs/src/pages/components/interactiveCard/images/Center-aligned-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.8 KB
docs/src/pages/components/interactiveCard/images/Center-content-alignment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+42.3 KB
docs/src/pages/components/interactiveCard/images/Custom-interactive-cards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+79.5 KB
docs/src/pages/components/interactiveCard/images/Interactive-cards-vs-Chips.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.6 KB
docs/src/pages/components/interactiveCard/images/Interactive-cards-vs-radio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.1 KB
docs/src/pages/components/interactiveCard/images/Left-aligned-content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+33.6 KB
docs/src/pages/components/interactiveCard/images/Left-content-alignment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+56.8 KB
docs/src/pages/components/interactiveCard/images/Selection-card-states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+31.2 KB
docs/src/pages/components/interactiveCard/images/Spacing-between-cards.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
--- | ||
title: Interactive cards | ||
description: Interactive cards are used for actions like navigation and selection when our options need to be descriptive. | ||
tabs: ['Usage', 'Code'] | ||
showMobile: true | ||
keywords: ['card', 'action card', 'selection card', 'interactive card'] | ||
--- | ||
|
||
Interactive cards are flexible and make for an easily scannable way to present options. | ||
|
||
### Types | ||
|
||
#### Action cards | ||
|
||
Action cards are used for navigation where description is important and the design needs to look neither overwhelming nor underwhelming. They are single select. | ||
|
||
<br /> | ||
|
||
![Action card](./images/Action-card.png) | ||
|
||
<Caption>Action card</Caption> | ||
|
||
#### Selection cards | ||
|
||
Selection cards are used for selection. They can be single-select or multi-select. | ||
|
||
<br /> | ||
|
||
![Selection card](./images/Selection-card.png) | ||
|
||
<Caption>Selection card</Caption> | ||
|
||
### States | ||
|
||
Interactive cards come in 5 states: default, hover, focus, disabled, and active. | ||
|
||
#### Action cards | ||
|
||
<br /> | ||
|
||
![Various states of action card](./images/Action-card-states.png) | ||
|
||
<Caption>Various states of action card</Caption> | ||
|
||
#### Selection cards | ||
|
||
<br /> | ||
|
||
![Various states of selection card](./images/Selection-card-states.png) | ||
|
||
<Caption>Various states of selection card</Caption> | ||
|
||
### Structure | ||
|
||
#### Content alignment | ||
|
||
##### Center | ||
|
||
![Center aligned content](./images/Center-aligned-content.png) | ||
<Caption>Center aligned content</Caption> | ||
|
||
<br/> | ||
|
||
<table style="width: 100%"> | ||
<tbody> | ||
<tr> | ||
<th style="width:50%; text-align: left;">Property</th> | ||
<th style="width:50%; text-align: left;">Value(s)</th> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Corner radius</td> | ||
<td>4 px</td> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Padding (top, right, bottom, left)</td> | ||
<td>16 px, 16 px, 16 px, 16 px</td> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Spacing between content and icon</td> | ||
<td>8 px </td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<br /> | ||
|
||
##### Left | ||
|
||
![Left aligned content](./images/Left-aligned-content.png) | ||
<Caption>Left aligned content</Caption> | ||
|
||
<br/> | ||
|
||
<table style="width: 100%"> | ||
<tbody> | ||
<tr> | ||
<th style="width:50%; text-align: left;">Property</th> | ||
<th style="width:50%; text-align: left;">Value(s)</th> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Corner radius</td> | ||
<td>4 px</td> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Padding (top, right, bottom, left)</td> | ||
<td>16 px, 16 px, 16 px, 12 px</td> | ||
</tr> | ||
<tr style="vertical-align: top"> | ||
<td>Spacing between content and icon</td> | ||
<td>12 px </td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
<br /> | ||
|
||
### Usage | ||
|
||
#### Interactive cards vs Chips | ||
|
||
Interactive cards are used for descriptive and well organized options, while chips are a space efficient way to display simpler options. | ||
|
||
![ Interactive cards vs Chips](./images/Interactive-cards-vs-Chips.png) | ||
<Caption> Interactive cards vs Chips</Caption> | ||
|
||
<br/> | ||
|
||
#### Interactive cards vs Radio/checkbox | ||
|
||
Interactive cards are used when you need to categorize your options well using strong visual representation without making it overwhelming, while radio/checkbox is used for simpler layouts to save space. | ||
|
||
![Interactive cards vs Radio/checkbox](./images/Interactive-cards-vs-radio.png) | ||
<Caption>Interactive cards vs Radio/checkbox</Caption> | ||
|
||
#### Content alignment | ||
|
||
##### Left | ||
|
||
It is recommended to align content of interactive cards to the left when a long description is used, to give more visual room to read each line. | ||
|
||
![Left content alignment](./images/Left-content-alignment.png) | ||
<Caption>Left content alignment</Caption> | ||
|
||
##### Center | ||
|
||
It is recommended to align the content of interactive cards to the center when the icon is sufficient to convey info or the description is short. | ||
|
||
![Center content alignment](./images/Center-content-alignment.png) | ||
<Caption>Center content alignment</Caption> | ||
|
||
<br/> | ||
|
||
#### Recommended spacing between cards | ||
|
||
It is recommended to give a spacing of 12px between cards when stacking them horizontally or vertically. | ||
|
||
![Recommended spacing between cards](./images/Spacing-between-cards.png) | ||
<Caption>Recommended spacing between cards</Caption> | ||
|
||
<br/> | ||
|
||
#### Custom interactive cards | ||
|
||
Interactive cards can have custom content inside it, but the states of the card with custom content must remain coherent with the default interactive cards. | ||
|
||
![Custom interactive cards](./images/Custom-interactive-cards.png) | ||
<Caption>Custom interactive cards</Caption> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.