Class CarouselCard
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
KartuCarousel
Kartu yang dapat ditampilkan sebagai item carousel.
Tersedia untuk add-on Google Workspace dan aplikasi Google Chat.
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'));
Dokumentasi mendetail
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003eCarouselCard is a type of card designed for use in carousels within Google Workspace add-ons and Google Chat apps.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaddFooterWidget(widget)\u003c/code\u003e method lets you add a widget to the footer area of the CarouselCard, with widgets displayed in the order they are added.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eaddWidget(widget)\u003c/code\u003e method is used to add a widget to the main content area of the CarouselCard, and widgets are shown in the order added.\u003c/p\u003e\n"],["\u003cp\u003eCarouselCard is accessible as part of the Google Workspace Developer Preview Program, allowing developers to get early access to features.\u003c/p\u003e\n"]]],[],null,["# Class CarouselCard\n\nCarouselCard\n\nA card that can be displayed as a carousel item.\n\nAvailable for Google Workspace add-ons and Google Chat apps.\n\n```javascript\nconst carouselCard = CardService.newCarouselCard()\n .addWidget(\n CardService.newTextParagraph().setText('a text paragraph in the carousel card'))\n .addFooterWidget(\n CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));\n```\n\n\n| **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features.\n\n\u003cbr /\u003e\n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------------------|-------------------|------------------------------------------------------------|\n| [addFooterWidget(widget)](#addFooterWidget(Widget)) | [CarouselCard](#) | Adds the given widget to the footer of this carousel card. |\n| [addWidget(widget)](#addWidget(Widget)) | [CarouselCard](#) | Adds the given widget to this carousel card. |\n\nDetailed documentation\n----------------------\n\n### `add``Footer``Widget(widget)`\n\nAdds the given widget to the footer of this carousel card. Widgets are shown in the order they\nwere added.\n\n```javascript\nconst carouselCard = CardService.newCarouselCard()\n .addFooterWidget(\n CardService.newTextParagraph().setText('a text paragraph in the carousel card footer'));\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|-----------------------------------------------------|\n| `widget` | [Widget](/apps-script/reference/card-service/widget) | A widget to add to the footer of the carousel card. |\n\n#### Return\n\n\n[CarouselCard](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n### `add``Widget(widget)`\n\nAdds the given widget to this carousel card. Widgets are shown in the order they were added.\n\n```javascript\nconst carouselCard = CardService.newCarouselCard()\n .addWidget(\n CardService.newTextParagraph().setText('a text paragraph in the carousel card'));\n```\n\n#### Parameters\n\n| Name | Type | Description |\n|----------|------------------------------------------------------|---------------------------------------|\n| `widget` | [Widget](/apps-script/reference/card-service/widget) | A widget to add to the carousel card. |\n\n#### Return\n\n\n[CarouselCard](#) --- This object, for chaining."]]