You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/module/patternfly-docs/content/extensions/chatbot/examples/demos/Chatbot.md
+25-4Lines changed: 25 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,27 @@ This demo displays an embedded ChatBot. Embedded ChatBots are meant to be placed
118
118
119
119
```
120
120
121
+
### Embedded ChatBot with Primary Background
122
+
123
+
This demo displays an embedded ChatBot with a primary background color. Embedded ChatBots are meant to be placed within a page in your product. This demo includes:
124
+
125
+
1. A [PatternFly page](/components/page) with a sidebar, "Skip to chatbot" button, and masthead. To display the "Skip to chatbot" button you must tab into the main window.
126
+
2. A [`<Chatbot>`](/patternfly-ai/chatbot/ui#container) container.
127
+
3. A [`<ChatbotHeader>`](/patternfly-ai/chatbot/ui#header) with all built sub-components laid out, including a `<ChatbotHeaderTitle>`
128
+
4.[`<ChatbotContent>` and `<MessageBox>`](/patternfly-ai/chatbot/ui#content-and-message-box) with:
129
+
- A `<ChatbotWelcomePrompt>`
130
+
- An initial [user `<Message>`](/patternfly-ai/chatbot/messages#user-messages) and an initial bot message with [message actions.](/patternfly-ai/chatbot/messages/#message-actions)
131
+
- Logic for enabling auto-scrolling to the most recent message whenever a new message is sent or received using a `scrollToBottomRef`
132
+
5. A [`<ChatbotFooter>`](/patternfly-ai/chatbot/ui#footer) with a [`<ChatbotFootNote>`](/patternfly-ai/chatbot/ui#footnote-with-popover) and a `<MessageBar>` that contains the abilities of:
133
+
-[Speech to text.](/patternfly-ai/chatbot/ui#message-bar-with-speech-recognition-and-file-attachment)
134
+
- Sending a message to the ChatBot.
135
+
- Receiving a response from a backend AI tool with a loading message state.
136
+
6. A [`<ChatbotConversationHistoryNav>`](/patternfly-ai/chatbot/ui#navigation) that can be toggled by the `<ChatbotHeaderMenu`> in the `<ChatbotHeader>`.
This demo displays a ChatBot in a static, inline drawer. This demo includes:
@@ -137,9 +158,9 @@ This demo showcases how the ChatBot can be rendered in different display modes t
137
158
138
159
1. The ability to switch between overlay, drawer, and fullscreen modes using the [`<ChatbotHeaderOptionsDropdown>`](/patternfly-ai/chatbot/ui#header-options) in the header.
139
160
2. A conditional page layout that renders the ChatBot for each display mode option:
140
-
-**Overlay:** As a floating window on top of the page content.
141
-
-**Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
142
-
-**Fullscreen:** As a top-level component that covers the entire screen for an embedded experience.
161
+
-**Overlay:** As a floating window on top of the page content.
162
+
-**Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
163
+
-**Fullscreen:** As a top-level component that covers the entire screen for an embedded experience.
143
164
3. Logic to show or hide the `<ChatbotToggle>` button, which is only present in the default overlay mode.
144
165
4. A [basic ChatBot](#basic-chatbot) with a header, welcome prompt, and message bar to populate the different layouts.
145
166
@@ -170,7 +191,7 @@ Your code structure should look like this:
170
191
171
192
### Chat transcripts
172
193
173
-
This demo illustrates how you could add downloadable transcripts to your ChatBot, which outline conversation details in a Markdown file. This approach allows users to easily share information from a conversation with others.
194
+
This demo illustrates how you could add downloadable transcripts to your ChatBot, which outline conversation details in a Markdown file. This approach allows users to easily share information from a conversation with others.
174
195
175
196
A message transcript includes details from a single chat message. To download a sample message transcript in this demo, click the "Download" action under a bot message.
0 commit comments