تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تظهر الإضافة المستندة إلى البطاقات كلوحة في الشريط الجانبي (أو، على الأجهزة الجوّالة، كنافذة نشاط أخرى يمكن الوصول إليها من خلال القائمة). يحتوي الإضافة على شريط أدوات علوي يحدّد الإضافة ويعرض بطاقة، وهي في الأساس "صفحة" من واجهة مستخدم الإضافة. تمثّل "برمجة التطبيقات" البطاقات في رمز المشروع باستخدام عناصر Card.
بنية البطاقة
البطاقة هي مجموعة من عناصر واجهة المستخدم التي تصمّمها. تتألّف البطاقة من الأقسام التالية:
عنوان البطاقة: يحدد هذا المعرّف البطاقات. ويحتوي على نص العنوان، وقد يتضمّن بشكل اختياري عنوانًا فرعيًا ورمزًا.
قسم واحد أو أكثر من أقسام البطاقات هذه هي الأقسام الفرعية لمساحة واجهة مستخدم البطاقة.
يمكن أن يتضمّن القسم اختياريًا عنوانًا نصيًا.
يتم فصل أقسام البطاقة عن بعضها البعض على البطاقة بخط أفقي.
إذا كان قسم البطاقة كبيرًا بشكل خاص، يتم عرضه تلقائيًا كقسم قابل للتصغير والتوسيع يمكن للمستخدمين توسيعه أو تصغيره حسب الحاجة.
يمكن أن تتضمّن البطاقة ما لا يزيد عن 100 قسم،
ويجب أن تتضمّن عددًا قليلاً فقط لتحقيق أداء أفضل.
يحتوي كل قسم من البطاقة على عنصر واجهة مستخدم واحد أو أكثر. توفّر التطبيقات المصغّرة للمستخدم معلومات أو عناصر تحكّم تفاعلية. البطاقات وأقسام البطاقات هي عناصر واجهة مستخدم
بنيوية، لذا لا يمكنك إضافتها إلى قسم بطاقة. يمكن أن يتضمّن قسم البطاقة ما لا يزيد عن 100 أداة، ويجب أن يكون بسيطًا قدر الإمكان لتحقيق أفضل أداء.
يجب تصميم البطاقات حول أنشطة المستخدمين أو مجموعات البيانات المحددة. على سبيل المثال، قد تحتوي إضافة Google Workspace التي تعرض بيانات مأخوذة من "جداول بيانات Google" على بطاقة منفصلة لكل ورقة بيانات يتم استخراج البيانات منها.
استخدام بطاقات متعدّدة
تتألف الإضافات عادةً من أكثر من بطاقة واحدة. يمكنك إعداد هذه البطاقات كقائمة بسيطة من أجل التنقّل الأساسي باستخدام بطاقات متعددة، أو يمكنك إعداد طرق تنقّل أكثر تعقيدًا للتحكّم في كيفية تنقّل المستخدم بين البطاقات.
إذا كانت الإضافة تستخدم التنقّل الأساسي، عندما يتم فتح الإضافة لأول مرة، ينشئ تطبيق Google Workspace الذي توسّعه الإضافة قائمة بعناوين البطاقات ويعرضها للمستخدم. يؤدي النقر على عنوان البطاقة إلى فتحها. يتوفّر أيضًا سهم رجوع للعودة إلى قائمة عناوين البطاقات. ليس عليك كتابة رمز لوظيفة العنوان وسهم الرجوع، إذ يتم ذلك تلقائيًا عند تحديد البطاقات في الإضافة.
تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-04 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eGoogle Workspace add-ons utilize cards, essentially UI pages, displayed in a sidebar or activity window, to present information and interactive elements.\u003c/p\u003e\n"],["\u003cp\u003eEach card is structured with a header, sections containing widgets (like buttons or text fields), and is designed around specific user tasks or data sets.\u003c/p\u003e\n"],["\u003cp\u003eAdd-ons often employ multiple cards for navigation; basic navigation provides an automatic card header list and back arrow functionality.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal performance and user experience, it's recommended to keep the number of cards, sections, and widgets to a minimum, prioritizing simplicity in card design.\u003c/p\u003e\n"],["\u003cp\u003eCards have technical limitations, restricting them to a maximum of 100 card sections and 100 widgets per section to maintain performance.\u003c/p\u003e\n"]]],["Add-on cards, displayed in a sidebar or activity window, are UI pages built with `Card` objects. Cards have a header, optional subtitle/icon, and sections. Sections, separated by horizontal rules, contain UI widgets, and large sections collapse. Add-ons use multiple cards for navigation, presented as a list of headers. Basic navigation provides automatic back arrow functionality. Each card section can hold a maximum of 100 widgets, and a card can hold no more than 100 card sections.\n"],null,["# Cards\n\nA card-based add-on appears as a pane in the sidebar (or, on mobile, as another\nactivity window reached through the menu). The add-on has a top toolbar that\nidentifies the add-on and displays a *card* ---essentially a \"page\" of the\nadd-on's UI. Apps Script represents cards in project code using\n[`Card`](/apps-script/reference/card-service/card) objects.\n\nCard anatomy\n------------\n\nA card is a group of UI elements you design. A card consists of the\nfollowing sections:\n\n- **A card header**. This identifies the cards. It has title text, and may optionally have a subtitle and an icon.\n- **One or more card sections** . These are sub-divisions of the card's UI area.\n A section may optionally have a text section header.\n Card sections are separated from each other on the card by a horizontal rule.\n If a card section is particularly large, it is automatically rendered as a\n collapsible section that users can expand or collapse as needed.\n A card can have [no more than 100 card sections](/workspace/add-ons/guides/workspace-restrictions#have_more_than_100_widgets),\n and should have only a few for better performance.\n\n- **Each card section contains one or more UI\n [widgets](/workspace/add-ons/concepts/widgets)** . Widgets provide the user with\n information or interactive controls. Cards and card sections are\n *structural* widgets, so you cannot add those to a card section. A card\n section can have [no more than 100 widgets](/workspace/add-ons/guides/workspace-restrictions#have_more_than_100_widgets),\n and should be as simple as possible for best performance.\n\nYou should design cards around particular user activities or data sets. For\nexample, a Google Workspace add-on that displays data\ntaken from Google Sheets might have a separate card for each sheet it pulls\ndata from.\n\nUsing multiple cards\n--------------------\n\nAdd-ons usually consist of more than one card. You can either configure these\ncards as a simple list for\n[basic navigation with multiple cards](/workspace/add-ons/how-tos/navigation#returning_multiple_cards),\nor configure more complex\n[navigation methods](/workspace/add-ons/how-tos/navigation#navigation_methods)\nto control how the user moves between the cards.\n\nIf the add-on uses basic navigation, when the\nadd-on is first opened the\nGoogle Workspace application it extends constructs a\nlist of the card headers and presents those to the user. Clicking on the card\nheader opens that card. A back arrow is also provided to get back to the card\nheader list. You do not have to code the header and back arrow\nfunctionality---this is done automatically when you define the cards in your\nadd-on.\n\nWhen designing add-ons, it's best to\n[limit the number of cards](/workspace/add-ons/guides/workspace-best-practices#_use_just_a_few_cards)\nyou display at once, since cards must share a limited amount of screen space.\nIt's also best to [avoid unnecessary complexity in cards](/workspace/add-ons/guides/workspace-best-practices#_keep_cards_simple).\n| **Note:** For performance reasons, you can't add more than 100 widgets or 100 card sections to a card."]]