A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).
object (Button) A list of buttons. Buttons is alsooneof data and only one of these fields should be set.
Union fielddata. AWidgetMarkup can only have one of the following items. You can use multipleWidgetMarkup fields to display more items.data can be only one of the following:
textParagraph
object (TextParagraph) Display a text paragraph in this widget.
number The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image.
string The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior.
List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might useaction method = snooze(), passing the snooze type and snooze time in the list of string parameters.
JSON representation
{ "key": string, "value": string }
Fields
key
string The name of the parameter for the action script.
value
string The value of the parameter.
OpenLink
A link that opens a new window.
JSON representation
{ "url": string }
Fields
url
string The URL to open.
KeyValue
A UI element contains a key (label) and a value (content). This element can also contain some actions such asonclick button.
string The name of thisimageButton that's used for accessibility. Default value is provided if this name isn't specified.
Union fieldicons. The icon can be specified by anIcon enum or a URL.icons can be only one of the following:
icon
enum (Icon) The icon specified by anenum that indices to an icon provided by Chat API.
iconUrl
string The icon specified by a URL.
CardAction
A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser.