An icon displayed in a widget on a card. For an example in Google Chat apps, see Add an icon.
Supports built-in and custom icons.
Available for Google Chat apps and Google Workspace add-ons.
| JSON representation |
|---|
{ "altText": string, "imageType": enum ( |
| Fields | |
|---|---|
altText |
Optional. A description of the icon used for accessibility. If unspecified, the default value If the icon is set in a |
imageType |
The crop style applied to the image. In some cases, applying a |
| The icon displayed in the widget on the card. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
knownIcon |
Display one of the built-in icons provided by Google Workspace. For example, to display an airplane icon, specify For a full list of supported icons, see built-in icons. |
iconUrl |
Display a custom icon hosted at an HTTPS URL. For example: Supported file types include |
materialIcon |
Display one of the Google Material Icons. For example, to display a checkbox icon, use
|
| End of mutually exclusive fields. | |
MaterialIcon
A Google Material Icon, which includes over 2500+ options.
For example, to display a checkbox icon with customized weight and grade, write the following:
{
"name": "check_box",
"fill": true,
"weight": 300,
"grade": -25
}
Available for Google Chat apps and unavailable for Google Workspace add-ons.
| JSON representation |
|---|
{ "name": string, "fill": boolean, "weight": integer, "grade": integer } |
| Fields | |
|---|---|
name |
The icon name defined in the Google Material Icon, for example, |
fill |
Whether the icon renders as filled. Default value is false. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. |
weight |
The stroke weight of the icon. Choose from {100, 200, 300, 400, 500, 600, 700}. If absent, default value is 400. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. |
grade |
Weight and grade affect a symbol’s thickness. Adjustments to grade are more granular than adjustments to weight and have a small impact on the size of the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If any other value is specified, the default value is used. To preview different icon settings, go to Google Font Icons and adjust the settings under Customize. |