parlant-chat-react 1.0.1 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
|
|
7
7
|
A flexible and customizable React chat component for integrating Parlant agents seamlessly into your website.
|
|
8
8
|
|
|
9
|
+
<img src="src/assets/chatbox.gif" alt="Parlant Chatbox Demo" width="300">
|
|
10
|
+
|
|
11
|
+
|
|
9
12
|
## Installation
|
|
10
13
|
|
|
11
14
|
```bash
|
|
@@ -141,38 +144,4 @@ Replace default UI components with your own:
|
|
|
141
144
|
| `server` | string | Yes | - | API endpoint for chat communication |
|
|
142
145
|
| `sessionId` | string | No | - | Unique identifier for an existing chat session |
|
|
143
146
|
| `titleFn` | function | No | - | Function that returns a string to generate dynamic chat session titles |
|
|
144
|
-
| `agentId`
|
|
145
|
-
| `agentName` | string | No | - | Name of the chat agent |
|
|
146
|
-
| `agentAvatar` | JSX.Element | No | - | Custom avatar for the agent |
|
|
147
|
-
| `chatDescription` | string | No | - | Description text shown at the top of the chat |
|
|
148
|
-
| `float` | boolean | No | `false` | Whether to display as a popup chat |
|
|
149
|
-
| `popupButton` | JSX.Element | No | - | Custom button element for popup mode |
|
|
150
|
-
| `sendIcon` | JSX.Element | No | - | Custom send message icon |
|
|
151
|
-
| `classNames` | object | No | - | Custom CSS class names for styling |
|
|
152
|
-
| `components` | object | No | - | Custom React components to replace defaults |
|
|
153
|
-
| `onPopupButtonClick` | function | No | - | Callback fired when the popup button is clicked (in popup mode) |
|
|
154
|
-
| `agentOpeningMessage` | string | No | - | Message shown as the first message from the agent when starting a session |
|
|
155
|
-
|
|
156
|
-
### ClassNames Object Properties
|
|
157
|
-
|
|
158
|
-
| Property | Description |
|
|
159
|
-
|-------------------------|------------------------------------|
|
|
160
|
-
| `chatboxWrapper` | Wrapper around the main chatbox |
|
|
161
|
-
| `chatbox` | Main chat container |
|
|
162
|
-
| `messagesArea` | Messages list container |
|
|
163
|
-
| `agentMessage` | Agent message bubble |
|
|
164
|
-
| `customerMessage` | Customer message bubble |
|
|
165
|
-
| `textarea` | Message input field |
|
|
166
|
-
| `popupButton` | Popup toggle button |
|
|
167
|
-
| `popupButtonIcon` | Icon in the popup button |
|
|
168
|
-
| `chatDescription` | Chat description container |
|
|
169
|
-
| `bottomLine` | Footer of the chat |
|
|
170
|
-
|
|
171
|
-
### Components Object Properties
|
|
172
|
-
|
|
173
|
-
| Property | Description | Props Passed |
|
|
174
|
-
|------------------|----------------------------------|-------------------------------|
|
|
175
|
-
| `popupButton` | Custom popup button component | `{ toggleChatOpen }` |
|
|
176
|
-
| `agentMessage` | Custom agent message component | `{ message }` |
|
|
177
|
-
| `customerMessage`| Custom customer message component| `{ message }` |
|
|
178
|
-
| `header` | Custom header component | `{ changeIsExpanded }` |
|
|
147
|
+
| `agentId`
|
package/package.json
CHANGED