Class CarouselCard

  • CarouselCard is a type of card designed for use in carousels within Google Workspace add-ons and Google Chat apps.

  • The addFooterWidget(widget) method lets you add a widget to the footer area of the CarouselCard, with widgets displayed in the order they are added.

  • The addWidget(widget) method is used to add a widget to the main content area of the CarouselCard, and widgets are shown in the order added.

  • CarouselCard is accessible as part of the Google Workspace Developer Preview Program, allowing developers to get early access to features.

CarouselCard

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

MethodReturn typeBrief description
addFooterWidget(widget)CarouselCardAdds the given widget to the footer of this carousel card.
addWidget(widget)CarouselCardAdds the given widget to this carousel card.

Detailed documentation

addFooterWidget(widget)

Adds the given widget to the footer of this carousel card. Widgets are shown in the order they were added.

const carouselCard = CardService.newCarouselCard()
    .addFooterWidget(
        CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));

Parameters

NameTypeDescription
widgetWidgetA widget to add to the footer of the carousel card.

Return

CarouselCard — This object, for chaining.


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

NameTypeDescription
widgetWidgetA widget to add to the carousel card.

Return

CarouselCard — This object, for chaining.