Card

Cards display content and actions about a single subject. MD Card encapsulates MDC Card.

A phone showing a list of saved podcasts represented as outlined cards

[!WARNING] The Card component is deprecated and will be removed in the next major version since it's added in @material/web as experimental component.

View interactive demo inline.

Open interactive demo in new tab.

Elevated1
Filled2
Outlined3
  1. Elevated card
  2. Filled card
  3. Outlined card

Cards can contain any type of content, including text, images, and actions.

ContentContent
<md-filled-card style="--md-card-padding: 16px;">
  Content
</md-filled-card>
<md-outlined-card style="--md-card-padding: 16px;">
  Content
</md-outlined-card>
bookmark

You may want to apply padding to card contents (recommended to 16px by the Material Design guidelines). In the previous live example and the following one the padding is already applied.

md-elevated-card {
--md-card-padding: 16px;
}

A card can be clicked to trigger an action.

Our Changing Planet
by Kurt Wagner
<md-elevated-card clickable class="demo-card">
  <div class="demo-card__header">
    <div class="demo-card__header-text">
      <div class="demo-card__title">Our Changing Planet</div>
      <div class="demo-card__subtitle">by Kurt Wagner</div>
    </div>
  </div>
</md-elevated-card>

A card can display a media element, such as a photo, in a consistent way.

Background photo
Our Changing Planet
by Kurt Wagner
Visit ten places on our planet that are undergoing the biggest changes today.
<md-elevated-card class="demo-card" clickable>
  <img src="https://cdn.glitch.me/9c389208-b279-4e96-bcbc-e5f8712d8706%2Fplaceholder-landscape-short.png"
       alt="Background photo" class="demo-card__media"/>
  <div class="demo-card__header">
    <div class="demo-card__header-text">
      <div class="demo-card__title">Our Changing Planet</div>
      <div class="demo-card__subtitle">by Kurt Wagner</div>
    </div>
  </div>
  <div class="demo-card__secondary mdc-typography mdc-typography--body2">
    Visit ten places on our planet that are undergoing the biggest changes today.
  </div>
</md-elevated-card>

A card can display explicit actions for users to take.

A card can contain buttons.

Title
Subtitle
ReadBookmark
<md-elevated-card class="demo-card" clickable>
    <div class="demo-card__header">
        <div class="demo-card__header-text">
            <div class="demo-card__title">Title</div>
            <div class="demo-card__subtitle">Subtitle</div>
        </div>
    </div>
    <md-outlined-button slot="button">Read</md-outlined-button>
    <md-filled-button slot="button">Bookmark</md-filled-button>
</md-elevated-card>

A card can contain buttons.

Title
Subtitle
favoritesharemore_vert
<md-elevated-card class="demo-card" clickable>
  <div class="demo-card__header">
    <div class="demo-card__header-text">
      <div class="demo-card__title">Title</div>
      <div class="demo-card__subtitle">Subtitle</div>
    </div>
  </div>
  <md-icon-button slot="icon">
    <md-icon>favorite</md-icon>
  </md-icon-button>
  <md-icon-button slot="icon">
    <md-icon>share</md-icon>
  </md-icon-button>
  <md-icon-button slot="icon">
    <md-icon>more_vert</md-icon>
  </md-icon-button>
</md-elevated-card>

Cards supports Material theming and can be customized in terms of color, typography, and shape.

TokenDefault value
--md-card-padding16px
--md-card-margin16px
--md-elevated-card-container-color--md-sys-color-surface-container-low
--md-elevated-card-container-shape--md-sys-shape-corner-medium

Elevated

<style>
  .styled-example {
    background-color: white;
    --md-elevated-card-container-shape: 0px;
    --md-sys-color-surface-container-low: #FAFDFC;
    --md-sys-color-primary: #191C1C;
    --md-card-padding: 16px;
  }
</style>

<md-elevated-card>Elevated</md-elevated-card>
TokenDefault value
--md-card-padding16px
--md-card-margin16px
--md-filled-card-container-color--md-sys-color-surface-container-highest
--md-filled-card-container-shape--md-sys-shape-corner-medium

Filled

<style>
  .styled-example {
    background-color: white;
    --md-filled-card-container-shape: 0px;
    --md-sys-color-surface-container-low: #FAFDFC;
    --md-sys-color-primary: #191C1C;
    --md-card-padding: 16px;
  }
</style>

<md-filled-card>Filled</md-filled-card>
TokenDefault value
--md-card-padding16px
--md-card-margin16px
--md-outlined-card-container-color--md-sys-color-surface
--md-outlined-card-container-shape--md-sys-shape-corner-medium

Outlined

<style>
  .styled-example {
    background-color: white;
    --md-outlined-card-container-shape: 0px;
    --md-sys-color-surface-container-low: #FAFDFC;
    --md-sys-color-primary: #191C1C;
    --md-card-padding: 16px;
  }
</style>

<md-outlined-card>Outlined</md-outlined-card>

MdElevatedCard <md-elevated-card>

Link to “MdElevatedCard <md-elevated-card>”
PropertyAttributeTypeDefaultDescription
clickableclickablebooleanfalseAllows the card to be clickable with a ripple effect.
PropertyAttributeTypeDefaultDescription
clickableclickablebooleanfalseAllows the card to be clickable with a ripple effect.

MdOutlinedCard <md-outlined-card>

Link to “MdOutlinedCard <md-outlined-card>”
PropertyAttributeTypeDefaultDescription
clickableclickablebooleanfalseAllows the card to be clickable with a ripple effect.
Quick Start
Components
CardData TableLayout Grid