|
| 1 | +--- |
| 2 | +title: Card |
| 3 | +demo: |
| 4 | + cols: 2 |
| 5 | +group: |
| 6 | + title: Data Display |
| 7 | + order: 5 |
| 8 | +toc: content |
| 9 | +--- |
| 10 | + |
| 11 | +# Card |
| 12 | + |
| 13 | +A general-purpose card container component. |
| 14 | + |
| 15 | +Reference: [Cards](https://www.getpapercss.com/docs/components/cards/) |
| 16 | + |
| 17 | +## Examples |
| 18 | + |
| 19 | +<code src="./demos/CardBase.tsx" title="Basic" description="Complete card example"></code> |
| 20 | +<code src="./demos/CardImg.tsx" title="Image" description="Images can be placed at the top or bottom"></code> |
| 21 | +<code src="./demos/CardLinks.tsx" title="Links" description="Cards containing links"></code> |
| 22 | +<code src="./demos/CardHeaderFooter.tsx" title="Header and Footer" description="Cards with header and footer"></code> |
| 23 | + |
| 24 | +## API |
| 25 | + |
| 26 | +### Card |
| 27 | + |
| 28 | +| Property | Description | Type | Default | |
| 29 | +| -------- | ----------------- | ------------------- | ------- | |
| 30 | +| as | Element to render | `React.ElementType` | `div` | |
| 31 | + |
| 32 | +### CardBody |
| 33 | + |
| 34 | +| Property | Description | Type | Default | |
| 35 | +| -------- | ----------------- | ------------------- | ------- | |
| 36 | +| as | Element to render | `React.ElementType` | `div` | |
| 37 | + |
| 38 | +### CardFooter |
| 39 | + |
| 40 | +| Property | Description | Type | Default | |
| 41 | +| -------- | ----------------- | ------------------- | ------- | |
| 42 | +| as | Element to render | `React.ElementType` | `div` | |
| 43 | + |
| 44 | +### CardHeader |
| 45 | + |
| 46 | +| Property | Description | Type | Default | |
| 47 | +| -------- | ----------------- | ------------------- | ------- | |
| 48 | +| as | Element to render | `React.ElementType` | `div` | |
| 49 | + |
| 50 | +### CardImg |
| 51 | + |
| 52 | +| Property | Description | Type | Default | |
| 53 | +| --------- | ----------------- | ------------------- | ------- | |
| 54 | +| as | Element to render | `React.ElementType` | `img` | |
| 55 | +| placement | Image placement | `'top' \| 'bottom'` | - | |
| 56 | + |
| 57 | +### CardLink |
| 58 | + |
| 59 | +| Property | Description | Type | Default | |
| 60 | +| -------- | ----------------- | ------------------- | ------- | |
| 61 | +| as | Element to render | `React.ElementType` | `a` | |
| 62 | + |
| 63 | +### CardTitle |
| 64 | + |
| 65 | +| Property | Description | Type | Default | |
| 66 | +| -------- | ----------------- | ------------------- | ------- | |
| 67 | +| as | Element to render | `React.ElementType` | `h4` | |
| 68 | + |
| 69 | +### CardSubtitle |
| 70 | + |
| 71 | +| Property | Description | Type | Default | |
| 72 | +| -------- | ----------------- | ------------------- | ------- | |
| 73 | +| as | Element to render | `React.ElementType` | `h5` | |
| 74 | + |
| 75 | +### CardText |
| 76 | + |
| 77 | +| Property | Description | Type | Default | |
| 78 | +| -------- | ----------------- | ------------------- | ------- | |
| 79 | +| as | Element to render | `React.ElementType` | `p` | |
0 commit comments