אם סגנון התצוגה מוגדר כ-DisplayStyle.REPLACE, הכרטיס יוצג במקום התצוגה של הכרטיס העליון בערימה.
אם סגנון התצוגה מוגדר לערך DisplayStyle.PEEK, הכותרת של הכרטיס מופיעה בתחתית סרגל הצד, ומכסה חלקית את הכרטיס העליון הנוכחי בערימה. לחיצה על הכותרת תגרום לכרטיס להופיע בערימה. אם אין לכרטיס כותרת, המערכת תיצור כותרת במקום זאת.
DisplayStyle פועל רק לגבי כרטיס שהוחזר מפונקציית הטריגר לפי הקשר.
כרטיס ה-peek מוגדר בכרטיס הראשון שמוחזר מפונקציית טריגר לפי הקשר. הוא משמש כווידג'ט placeholder תיאורי כדי למשתמשים לנווט מסטאק של דף הבית לסטאק לפי הקשר.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-07-26 (שעון UTC)."],[[["\u003cp\u003e\u003ccode\u003eCardBuilder\u003c/code\u003e helps in constructing \u003ca href=\"/apps-script/reference/card-service/card\"\u003eCard\u003c/a\u003e objects for Google Apps Script.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to add sections, actions, headers, footers and define display styles for the card.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCardBuilder\u003c/code\u003e provides control over the card's structure and behavior within the user interface.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method finalizes the card creation and validates its structure before returning a \u003ccode\u003eCard\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eYou can chain methods together for a more fluent and concise building process.\u003c/p\u003e\n"]]],[],null,["CardBuilder\n\nA builder for [Card](/apps-script/reference/card-service/card) objects. \n\nMethods\n\n| Method | Return type | Brief description |\n|---------------------------------------------------------------------|--------------------------------------------------|------------------------------------------------------------------------------------|\n| [addCardAction(cardAction)](#addCardAction(CardAction)) | [CardBuilder](#) | Adds a [CardAction](/apps-script/reference/card-service/card-action) to this Card. |\n| [addSection(section)](#addSection(CardSection)) | [CardBuilder](#) | Adds a section to this card. |\n| [build()](#build()) | [Card](/apps-script/reference/card-service/card) | Builds the current card and validates it. |\n| [setDisplayStyle(displayStyle)](#setDisplayStyle(DisplayStyle)) | [CardBuilder](#) | Sets the display style for this card. |\n| [setFixedFooter(fixedFooter)](#setFixedFooter(FixedFooter)) | [CardBuilder](#) | Sets a fixed footer for this card. |\n| [setHeader(cardHeader)](#setHeader(CardHeader)) | [CardBuilder](#) | Sets the header for this card. |\n| [setName(name)](#setName(String)) | [CardBuilder](#) | Sets the name for this card. |\n| [setPeekCardHeader(peekCardHeader)](#setPeekCardHeader(CardHeader)) | [CardBuilder](#) | Sets the peek card header. |\n\nDetailed documentation \n\n`add``Card``Action(cardAction)` \nAdds a [CardAction](/apps-script/reference/card-service/card-action) to this Card.\n\nParameters\n\n| Name | Type | Description |\n|----------------|---------------------------------------------------------------|---------------------------------------------------------------------------|\n| `card``Action` | [CardAction](/apps-script/reference/card-service/card-action) | The [CardAction](/apps-script/reference/card-service/card-action) to use. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`add``Section(section)` \nAdds a section to this card. You can't add more than 100 sections to a card.\n\nParameters\n\n| Name | Type | Description |\n|-----------|-----------------------------------------------------------------|-----------------------------------------------------------------------------|\n| `section` | [CardSection](/apps-script/reference/card-service/card-section) | The [CardSection](/apps-script/reference/card-service/card-section) to use. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`build()` \nBuilds the current card and validates it.\n\nReturn\n\n\n[Card](/apps-script/reference/card-service/card) --- A validated card.\n\nThrows\n\n\n[`Error`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) --- if the constructed card isn't valid.\n\n*** ** * ** ***\n\n`set``Display``Style(displayStyle)` \nSets the display style for this card.\n\nIf the display style is set to `Display``Style.REPLACE`, the card is shown by replacing\nthe view of top card in the card stack.\n\nIf the display style is set to `Display``Style.PEEK`, the header of the card appears at\nthe bottom of the sidebar, partially covering the current top card of the stack. Clicking the\nheader pops the card into the card stack. If the card has no header, a generated header is used\ninstead.\n\n\n`Display``Style` only works for card returned from contextual trigger function.\n\nParameters\n\n| Name | Type | Description |\n|------------------|-------------------------------------------------------------------|-------------------------------------------------------------------------------|\n| `display``Style` | [DisplayStyle](/apps-script/reference/card-service/display-style) | The [DisplayStyle](/apps-script/reference/card-service/display-style) to set. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Fixed``Footer(fixedFooter)` \nSets a fixed footer for this card.\n\nParameters\n\n| Name | Type | Description |\n|-----------------|-----------------------------------------------------------------|-----------------------------------------------------------------------------|\n| `fixed``Footer` | [FixedFooter](/apps-script/reference/card-service/fixed-footer) | The [FixedFooter](/apps-script/reference/card-service/fixed-footer) to use. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Header(cardHeader)` \nSets the header for this card.\n\nParameters\n\n| Name | Type | Description |\n|----------------|---------------------------------------------------------------|---------------------------------------------------------------------------|\n| `card``Header` | [CardHeader](/apps-script/reference/card-service/card-header) | The [CardHeader](/apps-script/reference/card-service/card-header) to use. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Name(name)` \nSets the name for this card. The name can be used for [navigation](/gmail/add-ons/how-tos/navigation).\n\nParameters\n\n| Name | Type | Description |\n|--------|----------|-------------|\n| `name` | `String` | The name. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining.\n\n*** ** * ** ***\n\n`set``Peek``Card``Header(peekCardHeader)` \nSets the peek card header.\n\nThe peek card is set on the first card returned from a contextual trigger function. It is\nused as a descriptive placeholder widget so that users can navigate from a homepage stack to\nthe contextual stack.\n\nParameters\n\n| Name | Type | Description |\n|----------------------|---------------------------------------------------------------|---------------------------------------------------------------------------|\n| `peek``Card``Header` | [CardHeader](/apps-script/reference/card-service/card-header) | The [CardHeader](/apps-script/reference/card-service/card-header) to set. |\n\nReturn\n\n\n[CardBuilder](#) --- This object, for chaining."]]