A card that can be displayed as a carousel item.
Available for Google Workspace Add-ons and Google Chat apps.
const carouselCard = CardService.newCarouselCard() .addWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card')) .addFooterWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));
Methods
Method | Return type | Brief description |
---|---|---|
add | Carousel | Adds the given widget to the footer of this carousel card. |
add | Carousel | Adds the given widget to this carousel card. |
Detailed documentation
addWidget(widget)
Adds the given widget to this carousel card. Widgets are shown in the order they were added.
const carouselCard = CardService.newCarouselCard() .addWidget( CardService.newTextParagraph().setText('a text paragraph in the carousel card'));
Parameters
Name | Type | Description |
---|---|---|
widget | Widget | A widget to add to the carousel card. |
Return
Carousel
— This object, for chaining.