Carousel, also known as slider, rotates and displays a list of widgets in a slideshow format, with buttons navigating to the previous or next widget.
Available for Google Workspace Add-ons and Google Chat apps.
const carousel = CardService.newCarousel() .addCarouselCard(CardService.newCarouselCard().addWidget( CardService.newTextParagraph().setText('The first text paragraph in carousel'))) .addCarouselCard(CardService.newCarouselCard().addWidget( CardService.newTextParagraph().setText('The second text paragraph in carousel'))) .addCarouselCard(CardService.newCarouselCard().addWidget( CardService.newTextParagraph().setText('The third text paragraph in carousel')))
Methods
Method | Return type | Brief description |
---|---|---|
add | Carousel | Adds a carousel card. |
Detailed documentation
addCarouselCard(card)
Adds a carousel card.
const carousel = CardService.newCarousel() .addCarouselCard(CardService.newCarouselCard().addWidget( CardService.newTextParagraph().setText('The first text paragraph in carousel')));
Parameters
Name | Type | Description |
---|---|---|
card | Carousel | The carousel card to add. |
Return
Carousel
— This object, for chaining.