Class CarouselCard Stay organized with collections Save and categorize content based on your preferences.
Page Summary
A CarouselCard is a card that can be displayed as a carousel item.
CarouselCard is available for Google Workspace add-ons and Google Chat apps.
You can add widgets to the footer or the main body of the CarouselCard using the
addFooterWidgetandaddWidgetmethods respectively.Both
addFooterWidgetandaddWidgetmethods return the CarouselCard object for chaining.
A card that can be displayed as a carousel item.
Available for Google Workspace add-ons and Google Chat apps.
constcarouselCard=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'));
Developer Preview: Available as part of theGoogle Workspace Developer Preview Program, which grants early access to certain features.
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
addFooterWidget(widget)
Adds the given widget to the footer of this carousel card. Widgets are shown in the order theywere added.
constcarouselCard=CardService.newCarouselCard().addFooterWidget(CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));
Parameters
| Name | Type | Description |
|---|---|---|
widget | Widget | A widget to add to the footer of the carousel card. |
Return
Carousel — This object, for chaining.
addWidget(widget)
Adds the given widget to this carousel card. Widgets are shown in the order they were added.
constcarouselCard=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.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-03 UTC.