AI-generated Key Takeaways
-
A ChipList holds a set of Chip objects displayed in a row, wrapping to the next line or allowing horizontal scrolling.
-
It is available for Google Chat apps and in developer preview for Google Workspace add-ons.
-
Key methods include
addChip(chip)to add chips andsetLayout(layout)to set the display layout.
Holds a set of Chip objects that are displayed in a row, wrapping to the next line to
horizontal scrollable.
Available for Google Chat apps. In developer preview for Google Workspace add-ons.
const chip = CardService.newChip(); // Finish building the text chip... const chipList = CardService.newChipList() .setLayout(CardService.ChipListLayout.WRAPPED) .addChip(chip);
Methods
| Method | Return type | Brief description |
|---|---|---|
add | Chip | Adds a chip. |
set | Chip | Sets the chip list layout. |
Detailed documentation
addChip(chip)
setLayout(layout)
Sets the chip list layout. If unset, it defaults to Chip layout.
const chip = CardService.newChip(); // Finish building the text chip... const chipList = CardService.newChipList() .setLayout(CardService.ChipListLayout.HORIZONTAL_SCROLLABLE) .addChip(chip);
Parameters
| Name | Type | Description |
|---|---|---|
layout | Chip | The chip list layout. |
Return
Chip — This object, for chaining.