Class ButtonSet  |  Apps Script  |  Google for Developers (original) (raw)

Class ButtonSet

ButtonSet

Holds a set of [Button](/apps-script/reference/card-service/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
addButton(button) ButtonSet Adds a button.

Detailed documentation

addButton(button)

Adds a button.

Parameters

Name Type Description
button Button The button to add.

Return

[ButtonSet](#) — This object, for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-01-30 UTC.