CardHeader

Stay organized with collections Save and categorize content based on your preferences.

CardHeader represents the header of a card. Headers can include a title, subtitle, and avatar-style image.

You can include headers for card messages and dialogs.

Example

The following image displays a card consisting of a CardHeader component.

A card message in Google Chat depicting a CardHeader.
Figure 1: A card message in Google Chat depicting CardHeader displaying a title, subtitle, and icon.

Here's the card's JSON:

JSON

{
  "cardsV2": [
    {
      "cardId": "card_one",
      "card": {
        "header": {
          "title": "Header",
          "subtitle": "Subtitle",
          "imageType": "SQUARE",
          "imageUrl": "https://developers.google.com/chat/images/quickstart-app-avatar.png",
          "imageAltText": "Avatar for the card header",
        },
      }
    }
  ]
}