<a href="/wiki/display/CPDesign/AI+Container">AI Container</a>

Component Owner: BTP

Designer Responsible: Milanov, Kalin

Specification Status: IN REVIEW

Table of Contents

Overview

Almost all Generative AI interactions are comprised of a prompt and a response. In some cases, multiple prompts are needed to refine the AI response. In such cases, the need for an AI container is also required. It holds the entire conversation, valuable interactions, and the AI prompt.

Look and Feel

&#x3C;p&#x3E;&#x3C;div&#x3E; &#x3C;div&#x3E;Morning Horizon&#x3C;/div&#x3E; &#x3C;div&#x3E;Evening Horizon&#x3C;/div&#x3E; &#x3C;div&#x3E;Horizon HCB&#x3C;/div&#x3E; &#x3C;div&#x3E;Horizon HCW&#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E; &#x3C;picture&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;/content/dam/sapcom/design-system/btp/patterns/generative-ai/ai-container/media1_1ada4c7f3f22962bafef851365c77db53cd22cb09.png?width=2000&#x26;format=webply&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;./media_1ada4c7f3f22962bafef851365c77db53cd22cb09.png?width=750&#x26;format=webply&#x26;optimize=medium&#x22;&#x3E; &#x3C;source type=&#x22;image/png&#x22; srcset=&#x22;./media_1ada4c7f3f22962bafef851365c77db53cd22cb09.png?width=2000&#x26;format=png&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;img loading=&#x22;lazy&#x22; alt=&#x22;&#x22; src=&#x22;&#x3C;a href=&#x22;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media%5C_1ada4c7f3f22962bafef851365c77db53cd22cb09.png?width=750%5C&#x26;format=png%5C&#x26;optimize=medium&#x22;&#x3E;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media_1ada4c7f3f22962bafef851365c77db53cd22cb09.png?width=750&#x26;format=png&#x26;optimize=medium&#x3C;/a&#x3E;&#x22; width=&#x22;1004&#x22; height=&#x22;1200&#x22;&#x3E; &#x3C;/picture&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;picture&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;/content/dam/sapcom/design-system/btp/patterns/generative-ai/ai-container/media1_1abd3b22b39f51ef30a44ef0e9b962587f60742d5.png?width=2000&#x26;format=webply&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;./media_1abd3b22b39f51ef30a44ef0e9b962587f60742d5.png?width=750&#x26;format=webply&#x26;optimize=medium&#x22;&#x3E; &#x3C;source type=&#x22;image/png&#x22; srcset=&#x22;./media_1abd3b22b39f51ef30a44ef0e9b962587f60742d5.png?width=2000&#x26;format=png&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;img loading=&#x22;lazy&#x22; alt=&#x22;&#x22; src=&#x22;&#x3C;a href=&#x22;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media%5C_1abd3b22b39f51ef30a44ef0e9b962587f60742d5.png?width=750%5C&#x26;format=png%5C&#x26;optimize=medium&#x22;&#x3E;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media_1abd3b22b39f51ef30a44ef0e9b962587f60742d5.png?width=750&#x26;format=png&#x26;optimize=medium&#x3C;/a&#x3E;&#x22; width=&#x22;1004&#x22; height=&#x22;1200&#x22;&#x3E; &#x3C;/picture&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;picture&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;/content/dam/sapcom/design-system/btp/patterns/generative-ai/ai-container/media1_19b38b9ad40f8ee2131f9c9315239290218871dfb.png?width=2000&#x26;format=webply&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;./media_19b38b9ad40f8ee2131f9c9315239290218871dfb.png?width=750&#x26;format=webply&#x26;optimize=medium&#x22;&#x3E; &#x3C;source type=&#x22;image/png&#x22; srcset=&#x22;./media_19b38b9ad40f8ee2131f9c9315239290218871dfb.png?width=2000&#x26;format=png&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;img loading=&#x22;lazy&#x22; alt=&#x22;&#x22; src=&#x22;&#x3C;a href=&#x22;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media%5C_19b38b9ad40f8ee2131f9c9315239290218871dfb.png?width=750%5C&#x26;format=png%5C&#x26;optimize=medium&#x22;&#x3E;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media_19b38b9ad40f8ee2131f9c9315239290218871dfb.png?width=750&#x26;format=png&#x26;optimize=medium&#x3C;/a&#x3E;&#x22; width=&#x22;1004&#x22; height=&#x22;1200&#x22;&#x3E; &#x3C;/picture&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;picture&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;/content/dam/sapcom/design-system/btp/patterns/generative-ai/ai-container/media1_16ec3136cda7b8e7c830799a0ceb93b326f091940.png?width=2000&#x26;format=webply&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;./media_16ec3136cda7b8e7c830799a0ceb93b326f091940.png?width=750&#x26;format=webply&#x26;optimize=medium&#x22;&#x3E; &#x3C;source type=&#x22;image/png&#x22; srcset=&#x22;./media_16ec3136cda7b8e7c830799a0ceb93b326f091940.png?width=2000&#x26;format=png&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;img loading=&#x22;lazy&#x22; alt=&#x22;&#x22; src=&#x22;&#x3C;a href=&#x22;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media%5C_16ec3136cda7b8e7c830799a0ceb93b326f091940.png?width=750%5C&#x26;format=png%5C&#x26;optimize=medium&#x22;&#x3E;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media_16ec3136cda7b8e7c830799a0ceb93b326f091940.png?width=750&#x26;format=png&#x26;optimize=medium&#x3C;/a&#x3E;&#x22; width=&#x22;1004&#x22; height=&#x22;1200&#x22;&#x3E; &#x3C;/picture&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E;&#x3C;/p&#x3E;

Anatomy

<div> <div></div> <div>UI Element</div> <div>Description</div> </div> <div> <div>A</div> <div>Header</div> <div>The header of the AI container. This header incorporates specific branding.</div> </div> <div> <div>B</div> <div>Content Area</div> <div>Empty container/aggregation in which the AI interaction or conversation appears.</div> </div> <div> <div>C</div> <div>Footer</div> <div>Empty container/aggregation in which the AI prompt is placed.</div> </div>

Desktop Specification (Compact Mode)

&#x3C;p&#x3E;&#x3C;div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E;UI Element&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E;All Horizon Themes&#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E;AI Container&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;p&#x3E;background: var(--sapGroup_ContentBackground);&#x3C;/p&#x3E; &#x3C;p&#x3E;&#x3C;strong&#x3E;When Floating (Default)&#x3C;/strong&#x3E;&#x3C;br&#x3E;border-radius: 0.5rem;&#x3C;br&#x3E;box-shadow: var(--sapContainer_Shadow2);&#x3C;/p&#x3E; &#x3C;p&#x3E;&#x3C;strong&#x3E;When Docked&#x3C;/strong&#x3E;&#x3C;br&#x3E;border-radius: 0.5rem 0.5rem 0 0;&#x3C;br&#x3E;box-shadow: var(--sapContainer_Shadow1);&#x3C;/p&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;A&#x3C;/div&#x3E; &#x3C;div&#x3E;Header&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E;display: flex;&#x3C;br&#x3E;padding: 0.8125rem 1rem;&#x3C;br&#x3E;align-items: center;&#x3C;br&#x3E;gap: 0.5rem;&#x3C;br&#x3E;align-self: stretch;&#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E;background: var(&#x2013;sapAIHeader_Background);border-bottom: var(--sapContent_Transparent_Border);&#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;A1&#x3C;/div&#x3E; &#x3C;div&#x3E;Title&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;p&#x3E;Title H5 BTP. See &#x3C;a href=&#x22;https%3A%2F%2Fwww.sap.com%2Fwiki%2Fdisplay%2FCPDesign%2FTypography&#x22;&#x3E;Typography&#x3C;/a&#x3E; for full specifications.&#x3C;/p&#x3E; &#x3C;p&#x3E;color: var(--sapAIHeader_TextColor);&#x3C;/p&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;A2&#x3C;/div&#x3E; &#x3C;div&#x3E;Button&#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;picture&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;/content/dam/sapcom/design-system/btp/patterns/generative-ai/ai-container/media1_1702c609495a7b1fbeef25a6e36ce170f7a793c31.png?width=2000&#x26;format=webply&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;source type=&#x22;image/webp&#x22; srcset=&#x22;./media_1702c609495a7b1fbeef25a6e36ce170f7a793c31.png?width=750&#x26;format=webply&#x26;optimize=medium&#x22;&#x3E; &#x3C;source type=&#x22;image/png&#x22; srcset=&#x22;./media_1702c609495a7b1fbeef25a6e36ce170f7a793c31.png?width=2000&#x26;format=png&#x26;optimize=medium&#x22; media=&#x22;(min-width: 600px)&#x22;&#x3E; &#x3C;img loading=&#x22;lazy&#x22; alt=&#x22;&#x22; src=&#x22;&#x3C;a href=&#x22;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media%5C_1702c609495a7b1fbeef25a6e36ce170f7a793c31.png?width=750%5C&#x26;format=png%5C&#x26;optimize=medium&#x22;&#x3E;https://www.sap.com/design-system/btp/patterns/generative-ai/ai-container/media_1702c609495a7b1fbeef25a6e36ce170f7a793c31.png?width=750&#x26;format=png&#x26;optimize=medium&#x3C;/a&#x3E;&#x22; width=&#x22;295&#x22; height=&#x22;300&#x22;&#x3E; &#x3C;/picture&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;p&#x3E;The AI Button is based on the Nested Button. See &#x3C;a href=&#x22;https%3A%2F%2Fwww.sap.com%2Fwiki%2Fdisplay%2FCPDesign%2FNested%2BButton%23NestedButton-SquareNestedButton&#x22;&#x3E;Square Nested Button&#x3C;/a&#x3E; for full specifications.&#x3C;/p&#x3E; &#x3C;p&#x3E;&#x3C;strong&#x3E;Deltas&#x3C;/strong&#x3E;&#x3C;br&#x3E;color: var(--sapButton_Emphasized_TextColor);&#x3C;/p&#x3E; &#x3C;p&#x3E;&#x3C;strong&#x3E;Focus State&#x3C;/strong&#x3E;&#x3C;br&#x3E;outline: var(--sapContent_FocusStyle) var(--sapContent_FocusWidth) var(--sapContent_ContrastFocusColor);&#x3C;/p&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;B&#x3C;/div&#x3E; &#x3C;div&#x3E;Content Area&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;p&#x3E;padding: 0.5rem;&#x3C;/p&#x3E; &#x3C;p&#x3E;background: var(--sapGroup_ContentBackground);&#x3C;/p&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;div&#x3E;C&#x3C;/div&#x3E; &#x3C;div&#x3E;Footer&#x3C;/div&#x3E; &#x3C;div&#x3E;&#x3C;/div&#x3E; &#x3C;div&#x3E; &#x3C;p&#x3E;padding: 0 0.5rem 0.5rem 0.5rem;&#x3C;/p&#x3E; &#x3C;p&#x3E;background: var(--sapGroup_ContentBackground);&#x3C;/p&#x3E; &#x3C;/div&#x3E; &#x3C;/div&#x3E;&#x3C;/p&#x3E;

Tablet Specification (Cozy Mode)

The tablet specification contains only deltas from the desktop specification. All reference components take their touch-optimized sizes and behaviors.

<div> <div></div> <div>UI Element</div> <div>All Horizon Themes</div> </div> <div> <div>A</div> <div>Header</div> <div>padding: 0.875rem 1rem;</div> </div>

Phone Specification (Cozy Mode)

There are no deltas between the tablet and phone specifications.

Keyboard Handling

The keyboard handling for the AI Container is based on the keyboard handling of the Button, Input Field, and Toolbar components. Refer to Fiori Keyboard Interaction for full specifications about each of these components.

AI Container

Keyboard Interaction:

Content Area

The keyboard handling of the content area elements is inspired by the behavior of the Feed List. Refer to Fiori Keyboard Interaction for full specifications about each of these components.

Keyboard Interaction:

Screen Reader

The screen reader for the AI Container is based on the screen reader of the Page Layouts and Floorplans. Refer to Fiori Screen Reader Specification for full specifications.

AI Container

Header

Content Area

See AI Chat Bubble for full specifications.

AI Prompt

See AI Prompt for full specifications.