Class ChipList

Chip List

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
Chip List Adds a chip.
Chip List Sets the chip list layout.

Detailed documentation

add Chip(chip)

Adds a chip.

Parameters

Name Type Description
chip
Chip The chip to add.

Return

Chip List — This object, for chaining.


set Layout(layout)

Sets the chip list layout. If unset, it defaults to Chip List Layout.WRAPPED 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 List Layout The chip list layout.

Return

Chip List — This object, for chaining.

Create a Mobile Website
View Site in Mobile | Classic
Share by: