@blumessage/react-chat 1.4.0 → 1.4.2
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 +13 -0
- package/dist/BlumessageChat.js +559 -537
- package/dist/blumessage-chat.browser.js +1 -1
- package/dist/index.browser.js +6 -4
- package/dist/index.commonjs.js +13 -6
- package/dist/index.js +1 -1
- package/dist/types/BlumessageChat.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,6 +114,8 @@ function App() {
|
|
|
114
114
|
| `showTimestamps` | `boolean` | `false` | Display timestamps: today="2:00 PM", older="17 July, 1:00 PM" |
|
|
115
115
|
| `typingText` | `string` | `"Agent is typing..."` | Custom text shown while waiting for assistant response |
|
|
116
116
|
| `emptyStateText` | `string` | `"Start a conversation!"` | Text shown when no messages are present |
|
|
117
|
+
| `markdown` | `boolean` | `true` | Enable markdown rendering for messages |
|
|
118
|
+
| `disableAutoScroll` | `boolean` | `false` | Disable automatic scrolling to bottom when new messages arrive |
|
|
117
119
|
| **Event Callbacks** |
|
|
118
120
|
| `onUserMessage` | `(message: Message) => void` | - | Called when user sends message |
|
|
119
121
|
| `onAssistantMessage` | `(message: Message) => void` | - | Called when assistant responds |
|
|
@@ -234,6 +236,17 @@ const initialMessages = [
|
|
|
234
236
|
/>
|
|
235
237
|
```
|
|
236
238
|
|
|
239
|
+
### Disable Auto-Scroll
|
|
240
|
+
|
|
241
|
+
```tsx
|
|
242
|
+
<BlumessageChat
|
|
243
|
+
apiKey="your-api-key"
|
|
244
|
+
disableAutoScroll={true} // Prevents automatic scrolling to bottom
|
|
245
|
+
// Useful when you want users to maintain their scroll position
|
|
246
|
+
// or when implementing custom scroll behavior
|
|
247
|
+
/>
|
|
248
|
+
```
|
|
249
|
+
|
|
237
250
|
## Icon Options
|
|
238
251
|
|
|
239
252
|
The `icon` prop accepts **any lucide-react icon name** with flexible naming patterns. The component intelligently matches your input to the appropriate lucide-react icon:
|