Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ ChatbotHeaderMenu,
ChatbotHeaderTitle,
ChatbotHeaderActions,
ChatbotHeaderSelectorDropdown,
ChatbotHeaderOptionsDropdown
ChatbotHeaderOptionsDropdown,
ChatbotHeaderCloseButton
} from '@patternfly/chatbot/dist/dynamic/ChatbotHeader';

import ExpandIcon from '@patternfly/react-icons/dist/esm/icons/expand-icon';
Expand Down Expand Up @@ -129,6 +130,22 @@ This demo displays a ChatBot in a static, inline drawer. This demo includes:

```

### Display mode switcher

This demo showcases how the ChatBot can be rendered in different display modes to suit various application layouts. It demonstrates how to dynamically change the page structure in response to the user's selection. This demo includes:

1. The ability to switch between overlay, drawer, and fullscreen modes using the [`<ChatbotHeaderOptionsDropdown>`](/patternfly-ai/chatbot/ui#header-options) in the header.
2. A conditional page layout that renders the ChatBot for each display mode option:
- **Overlay:** As a floating window on top of the page content.
- **Drawer:** Inside an inline PatternFly `<Drawer>` as a side panel.
- **Fullscreen:** As a top-level component that covers the entire screen for an embedded experience.
3. Logic to show or hide the `<ChatbotToggle>` button, which is only present in the default overlay mode.
4. A [basic ChatBot](#basic-chatbot) with a header, welcome prompt, and message bar to populate the different layouts.

```js file="./ChatbotDisplayMode.tsx" isFullscreen

```

### Comparing ChatBots

To let users compare how different ChatBots respond to the same prompt, you can add multiple ChatBots within the same window. The following demo illustrates a comparison view pattern that allows users to toggle between different conversations in a single ChatBot window.
Expand Down
Loading
Loading