All the widgets in the section. Must contain at least one widget.
↳ collapsible
bool
Indicates whether this section is collapsible. Collapsible sections hide some or all widgets, but users can expand the section to reveal the hidden widgets by clickingShow more. Users can hide the widgets again by clickingShow less. To determine which widgets are hidden, specifyuncollapsibleWidgetsCount.
↳ uncollapsible_widgets_count
int
The number of uncollapsible widgets which remain visible even when a section is collapsed. For example, when a section contains five widgets and theuncollapsibleWidgetsCountis set to2, the first two widgets are always shown and the last three are collapsed by default. TheuncollapsibleWidgetsCountis taken into account only whencollapsibleistrue.
Collapsible sections hide some or all widgets, but users can expand the
section to reveal the hidden widgets by clickingShow more. Users
can hide the widgets again by clickingShow less.
To determine which widgets are hidden, specifyuncollapsibleWidgetsCount.
Returns
Type
Description
bool
setCollapsible
Indicates whether this section is collapsible.
Collapsible sections hide some or all widgets, but users can expand the
section to reveal the hidden widgets by clickingShow more. Users
can hide the widgets again by clickingShow less.
To determine which widgets are hidden, specifyuncollapsibleWidgetsCount.
Parameter
Name
Description
var
bool
Returns
Type
Description
$this
getUncollapsibleWidgetsCount
The number of uncollapsible widgets which remain visible even when a
section is collapsed.
For example, when a section
contains five widgets and theuncollapsibleWidgetsCountis set to2,
the first two widgets are always shown and the last three are collapsed
by default. TheuncollapsibleWidgetsCountis taken into account only
whencollapsibleistrue.
Returns
Type
Description
int
setUncollapsibleWidgetsCount
The number of uncollapsible widgets which remain visible even when a
section is collapsed.
For example, when a section
contains five widgets and theuncollapsibleWidgetsCountis set to2,
the first two widgets are always shown and the last three are collapsed
by default. TheuncollapsibleWidgetsCountis taken into account only
whencollapsibleistrue.
[[["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 Section (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Card.V1.Card.Section)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Card.V1.Card.Section)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Card.V1.Card.Section)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Card.V1.Card.Section)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Card.V1.Card.Section)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Card.V1.Card.Section)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Card.V1.Card.Section)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Card.V1.Card.Section)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Card.V1.Card.Section)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Card.V1.Card.Section)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Card.V1.Card.Section)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Card.V1.Card.Section) \nReference documentation and code samples for the Google Apps Chat V1 Client class Section.\n\nA section contains a collection of widgets that are rendered\nvertically in the order that they're specified.\n\n[Google Workspace Add-ons and Chat\napps](https://developers.google.com/workspace/extend):\n\nGenerated from protobuf message `google.apps.card.v1.Card.Section`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Card \\\\ V1 \\\\ Card\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getHeader\n\nText that appears at the top of a section.\n\nSupports simple HTML formatted text. 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### setHeader\n\nText that appears at the top of a section.\n\nSupports simple HTML formatted text. 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### getWidgets\n\nAll the widgets in the section.\n\nMust contain at least one widget.\n\n### setWidgets\n\nAll the widgets in the section.\n\nMust contain at least one widget.\n\n### getCollapsible\n\nIndicates whether this section is collapsible.\n\nCollapsible sections hide some or all widgets, but users can expand the\nsection to reveal the hidden widgets by clicking **Show more** . Users\ncan hide the widgets again by clicking **Show less** .\nTo determine which widgets are hidden, specify\n`uncollapsibleWidgetsCount`.\n\n### setCollapsible\n\nIndicates whether this section is collapsible.\n\nCollapsible sections hide some or all widgets, but users can expand the\nsection to reveal the hidden widgets by clicking **Show more** . Users\ncan hide the widgets again by clicking **Show less** .\nTo determine which widgets are hidden, specify\n`uncollapsibleWidgetsCount`.\n\n### getUncollapsibleWidgetsCount\n\nThe number of uncollapsible widgets which remain visible even when a\nsection is collapsed.\n\nFor example, when a section\ncontains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,\nthe first two widgets are always shown and the last three are collapsed\nby default. The `uncollapsibleWidgetsCount` is taken into account only\nwhen `collapsible` is `true`.\n\n### setUncollapsibleWidgetsCount\n\nThe number of uncollapsible widgets which remain visible even when a\nsection is collapsed.\n\nFor example, when a section\ncontains five widgets and the `uncollapsibleWidgetsCount` is set to `2`,\nthe first two widgets are always shown and the last three are collapsed\nby default. The `uncollapsibleWidgetsCount` is taken into account only\nwhen `collapsible` is `true`."]]