Class CardHeader

CardHeader

The header of a Card.


 var cardHeader = CardService.newCardHeader()
     .setTitle("Card header title")
     .setSubtitle("Card header subtitle")
     .setImageStyle(CardService.ImageStile.CIRCLE)
     .setImageUrl("https://image.png");
 

Methods

MethodReturn typeBrief description
setImageAltText(imageAltText)CardHeaderSets the alternative text for the header image.
setImageStyle(imageStyle)CardHeaderSets the cropping of the icon in then card header.
setImageUrl(imageUrl)CardHeaderSets the image to use in the header by providing its URL.
setSubtitle(subtitle)CardHeaderSets the subtitle of the card header.
setTitle(title)CardHeaderSets the title of the card header.

Detailed documentation

setImageAltText(imageAltText)

Sets the alternative text for the header image.

Parameters

NameTypeDescription
imageAltTextStringthe alternative text for the header image.

Return

CardHeader — this object, for chaining.


setImageStyle(imageStyle)

Sets the cropping of the icon in then card header. Defaults to no crop. Optional.

Parameters

NameTypeDescription
imageStyleImageStylethe style setting.

Return

CardHeader — this object, for chaining.


setImageUrl(imageUrl)

Sets the image to use in the header by providing its URL.

Parameters

NameTypeDescription
imageUrlStringthe URL address of a hosted image to use.

Return

CardHeader — this object, for chaining.


setSubtitle(subtitle)

Sets the subtitle of the card header. Optional.

Parameters

NameTypeDescription
subtitleStringthe header subtitle text.

Return

CardHeader — this object, for chaining.


setTitle(title)

Sets the title of the card header. Required.

Parameters

NameTypeDescription
titleStringthe header text.

Return

CardHeader — this object, for chaining.

Send feedback about...

Apps Script
Apps Script