|
| 1 | +Cards are content containers for text, photos, and actions. Cards are intended to provide |
| 2 | +information on a single subject. |
| 3 | + |
| 4 | +<!-- example(card-overview) --> |
| 5 | + |
| 6 | + |
| 7 | +### Basic card sections |
| 8 | +The most basic card needs only an `<md-card>` element with some content. However, Angular Material |
| 9 | +provides a number of preset sections that you can use inside of an `<md-card>`: |
| 10 | + |
| 11 | + |
| 12 | +| Element | Description | |
| 13 | +|-----------------------|--------------------------------------------------------------------------| |
| 14 | +| `<md-card-title>` | Card title | |
| 15 | +| `<md-card-subtitle>` | Card subtitle | |
| 16 | +| `<md-card-content>` | Primary card content. Intended for blocks of text | |
| 17 | +| `<img md-card-image>` | Card image. Stretches the image to the container width | |
| 18 | +| `<md-card-actions>` | Container for buttons at the bottom of the card | |
| 19 | +| `<md-card-footer>` | Section anchored to the bottom of the card | |
| 20 | + |
| 21 | +These elements primary serve as pre-styled content containers without any additional APIs. |
| 22 | +However, the `align` property on `<md-card-actions>` can be used to position the actions at the |
| 23 | +`'start'` or `'end` of the container. |
| 24 | + |
| 25 | + |
| 26 | +### Card headers |
| 27 | +In addition to the aforementioned sections, `<md-card-header>` gives the ability to add a rich |
| 28 | +header to a card. This header can contain: |
| 29 | + |
| 30 | +| Element | Description | |
| 31 | +|------------------------|-------------------------------------------------------------------------| |
| 32 | +| `<md-card-title>` | A title within the header | |
| 33 | +| `<md-card-subtitle>` | A subtitle within the header | |
| 34 | +| `<img md-card-avatar>` | An image used as an avatar within the header | |
| 35 | + |
| 36 | + |
| 37 | +### Title groups |
| 38 | +An `<md-title-group>` can be used to combine a title, subtitle, and image into a single section. |
| 39 | +This element can contain: |
| 40 | +* `<md-card-title>` |
| 41 | +* `<md-card-subtite>` |
| 42 | +* One of: |
| 43 | + * `<img md-card-sm-image>` |
| 44 | + * `<img md-card-md-image>` |
| 45 | + * `<img md-card-lg-image>` |
0 commit comments