Reference documentation and code samples for the Google Apps Chat V1 Client class DecoratedText.
A widget that displays text with optional decorations such as a label above
or below the text, an icon in front of the text, a selection widget, or a
button after the text. For an example in
Google Chat apps, seeDisplay text with decorative
text.
The wrap text setting. Iftrue, the text wraps and displays on multiple lines. Otherwise, the text is truncated. Only applies totext, nottopLabelandbottomLabel.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Apps Chat V1 Client - Class DecoratedText (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Card.V1.DecoratedText)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Card.V1.DecoratedText)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Card.V1.DecoratedText)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Card.V1.DecoratedText)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Card.V1.DecoratedText)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Card.V1.DecoratedText)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Card.V1.DecoratedText)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Card.V1.DecoratedText)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Card.V1.DecoratedText)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Card.V1.DecoratedText)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Card.V1.DecoratedText)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Card.V1.DecoratedText) \nReference documentation and code samples for the Google Apps Chat V1 Client class DecoratedText.\n\nA widget that displays text with optional decorations such as a label above\nor below the text, an icon in front of the text, a selection widget, or a\nbutton after the text. For an example in\nGoogle Chat apps, see [Display text with decorative\ntext](https://developers.google.com/workspace/chat/add-text-image-card-dialog#display_text_with_decorative_elements).\n\n[Google Workspace Add-ons and Chat\napps](https://developers.google.com/workspace/extend):\n\nGenerated from protobuf message `google.apps.card.v1.DecoratedText`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Card \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getIcon\n\nDeprecated in favor of `startIcon`.\n\n### hasIcon\n\n### clearIcon\n\n### setIcon\n\nDeprecated in favor of `startIcon`.\n\n### getStartIcon\n\nThe icon displayed in front of the text.\n\n### hasStartIcon\n\n### clearStartIcon\n\n### setStartIcon\n\nThe icon displayed in front of the text.\n\n### getTopLabel\n\nThe text that appears above `text`. Always truncates.\n\n### setTopLabel\n\nThe text that appears above `text`. Always truncates.\n\n### getText\n\nRequired. The primary text.\n\nSupports simple formatting. For more information\nabout formatting text, see\n[Formatting text in Google Chat\napps](https://developers.google.com/workspace/chat/format-messages#card-formatting)\nand\n[Formatting\ntext in Google Workspace\nAdd-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).\n\n### setText\n\nRequired. The primary text.\n\nSupports simple formatting. For more information\nabout formatting text, see\n[Formatting text in Google Chat\napps](https://developers.google.com/workspace/chat/format-messages#card-formatting)\nand\n[Formatting\ntext in Google Workspace\nAdd-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).\n\n### getWrapText\n\nThe wrap text setting. If `true`, the text wraps and displays on\nmultiple lines. Otherwise, the text is truncated.\n\nOnly applies to `text`, not `topLabel` and `bottomLabel`.\n\n### setWrapText\n\nThe wrap text setting. If `true`, the text wraps and displays on\nmultiple lines. Otherwise, the text is truncated.\n\nOnly applies to `text`, not `topLabel` and `bottomLabel`.\n\n### getBottomLabel\n\nThe text that appears below `text`. Always wraps.\n\n### setBottomLabel\n\nThe text that appears below `text`. Always wraps.\n\n### getOnClick\n\nThis action is triggered when users click `topLabel` or `bottomLabel`.\n\n### hasOnClick\n\n### clearOnClick\n\n### setOnClick\n\nThis action is triggered when users click `topLabel` or `bottomLabel`.\n\n### getButton\n\nA button that a user can click to trigger an action.\n\n### hasButton\n\n### setButton\n\nA button that a user can click to trigger an action.\n\n### getSwitchControl\n\nA switch widget that a user can click to change its state and trigger an\naction.\n\n### hasSwitchControl\n\n### setSwitchControl\n\nA switch widget that a user can click to change its state and trigger an\naction.\n\n### getEndIcon\n\nAn icon displayed after the text.\n\nSupports\n[built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)\nand\n[custom](https://developers.google.com/workspace/chat/format-messages#customicons)\nicons.\n\n### hasEndIcon\n\n### setEndIcon\n\nAn icon displayed after the text.\n\nSupports\n[built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons)\nand\n[custom](https://developers.google.com/workspace/chat/format-messages#customicons)\nicons.\n\n### getControl"]]