AI-generated Key Takeaways
-
ButtonSet
objects organize and display a row ofButton
objects within Google Workspace Add-ons and Google Chat apps. -
You can add buttons, which can be either text-based or image-based, to a
ButtonSet
using theaddButton()
method. -
The
addButton()
method allows for building the layout by addingButton
objects and facilitating chained operations for efficient design.
Holds a set of Button
objects that are displayed in a row.
Available for Google Workspace add-ons and Google Chat apps.
const textButton = CardService.newTextButton(); // Finish building the text button... const imageButton = CardService.newImageButton(); // Finish building the image button... const buttonSet = CardService.newButtonSet().addButton(textButton).addButton(imageButton);
Methods
Method | Return type | Brief description |
---|---|---|
add | Button | Adds a button. |