CarouselCard

A card that can be displayed as a carousel item.

Available for Google Workspace add-ons and Google Chat apps.

```javascript
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'));
```


> [!WARNING]
> **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.

<br />

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/carousel-card#addFooterWidget(Widget)` | `https://developers.google.com/apps-script/reference/card-service/carousel-card#` | Adds the given widget to the footer of this carousel card. |
| `https://developers.google.com/apps-script/reference/card-service/carousel-card#addWidget(Widget)` | `https://developers.google.com/apps-script/reference/card-service/carousel-card#` | 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 they
were added.

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

#### Parameters

| Name | Type | Description |
|---|---|---|
| `widget` | `https://developers.google.com/apps-script/reference/card-service/widget` | A widget to add to the footer of the carousel card. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/carousel-card#` --- This object, for chaining.

*** ** * ** ***

### `addWidget(widget)`

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

```javascript
const carouselCard = CardService.newCarouselCard()
    .addWidget(
        CardService.newTextParagraph().setText('a text paragraph in the carousel card'));
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `widget` | `https://developers.google.com/apps-script/reference/card-service/widget` | A widget to add to the carousel card. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/carousel-card#` --- This object, for chaining.