Enum TextButtonStyle

  • TextButtonStyle is used to define the style of a TextButton in Google Apps Script's Card Service.

  • It offers two options: OUTLINED (default, transparent background) and FILLED (colored background, customizable with setBackgroundColor()).

  • To use a style, refer to it using the syntax: CardService.TextButtonStyle.STYLE_NAME (e.g., CardService.TextButtonStyle.OUTLINED).

TextButtonStyle

An enum that specifies the style for TextButton.

OUTLINED is the default; it renders a simple text button with clear background. FILLED buttons have a background color you can set with TextButton.setBackgroundColor(backgroundColor).

To call an enum, you call its parent class, name, and property. For example, CardService.TextButtonStyle.OUTLINED.

Properties

PropertyTypeDescription
OUTLINEDEnumNormal text button with clear background. Default.
TEXTEnumDO NOT USE. Deprecated version of OUTLINED. Do not remove the field until it is confirmed not being used by any apps.
FILLEDEnumText button with colored background.
FILLED_TONALEnumNormal text button with an alternative middle ground between filled and outlined buttons.
BORDERLESSEnumNormal text button with no border.