Class ButtonSet

ButtonSet

Holds a set of Button objects that are displayed in a row.

Available for Google Workspace Add-ons and Google Chat apps.

var textButton = CardService.newTextButton();
// Finish building the text button...

var imageButton = CardService.newImageButton();
// Finish building the image button...

var buttonSet = CardService.newButtonSet()
    .addButton(textButton)
    .addButton(imageButton);

Methods

MethodReturn typeBrief description
addButton(button)ButtonSetAdds a button.

Detailed documentation

addButton(button)

Adds a button.

Parameters

NameTypeDescription
buttonButtonThe button to add.

Return

ButtonSet — This object, for chaining.