Class Carousel

Carousel

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
Carousel Adds a carousel card.

Detailed documentation

add Carousel Card(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 Card The carousel card to add.

Return

Carousel — This object, for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: