Only supported in dialogs. Not supported for card messages.
CardFixedFooter
represents the footer of a card. Footers can include a primary button and a secondary button.
Example
The following image displays a card consisting of a CardFixedFooter
component.

Here's the card's JSON:
JSON
{
"actionResponse": {
"type": "DIALOG",
"dialogAction": {
"dialog": {
"body": {
"fixed_footer": {
"primaryButton": {
"text": "Submit",
"color": {
"red": 0,
"blue": 1,
"green": 0
},
"onClick": {
"action": {
"function": "setLanguageType",
"parameters": [
{
"key": "languageType",
"value": "C++"
}
]
}
}
},
"secondaryButton": {
"text": "Cancel",
"onClick": {
"action": {
"function": "reset"
}
}
}
},
"sections": [
{
"widgets": [
{
"textInput": {
"name": "preferred_programing_language",
"label": "Preferred Language",
"initialSuggestions": {
"items": [
{
"text": "C++"
},
{
"text": "Java"
},
{
"text": "JavaScript"
},
{
"text": "Python"
}
]
}
}
}
]
}
],
}
}
}
}
}
CardFixedFooter
JSON representation and fields
Button
A text, icon, or text + icon button that users can click.
To make an image a clickable button, specify an
Image
(not an
ImageComponent
) and set an
onClick
action.
Currently supported in Chat apps (including dialogs and card messages ) and Google Workspace Add-ons.
JSON representation |
---|
{ "text": string, "icon": { object ( |
Fields | |
---|---|
text
|
The text displayed inside the button. |
icon
|
The icon image. If both
|
color
|
If set, the button is filled with a solid background color and the font color changes to maintain contrast with the background color. For example, setting a blue background will likely result in white text. If unset, the image background is white and the font color is blue.
For red, green and blue, the value of each field is a
Optionally set alpha, which sets a level of transparency using this equation:
For alpha, a value of 1 corresponds with a solid color, and a value of 0 corresponds with a completely transparent color. For example, the following color represents a half transparent red:
|
onClick
|
Required. The action to perform when the button is clicked, such as opening a hyperlink or running a custom function. |
disabled
|
If
|
altText
|
The alternative text used for accessibility. Set descriptive text that lets users know what the button does. For example, if a button opens a hyperlink, you might write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/chat" . |