ChatPropsPremium
Configuration for mapping custom data fields to Chat properties. Lets the Chat work with various data source formats by mapping your field names to expected Chat interface properties.
| Name | Type | Default | Description |
|---|---|---|---|
allowMessageCollapse? |
|
Enables expand or collapse for messages to save space. | |
attachmentsField? |
|
|
Field name for message attachments. |
attachmentTemplate? |
|
React functional or class component used as an attachment template (see example). The corresponding | |
authorId |
|
ID of the local user. Identifies messages authored by the local user. | |
authorIdField? |
|
|
Field name for message author ID. |
authorImageAltTextField? |
|
|
Field name for alt text of the author's avatar (when flattened). |
authorImageUrlField? |
|
|
Field name for message author avatar URL (when flattened). |
authorMessageSettings? |
|
Configuration settings for author messages (messages from the local user). These settings override global message settings for author messages. If both global and author-specific settings are provided, the author-specific settings take precedence. | |
authorNameField? |
|
|
Field name for message author name (when flattened). |
autoScrollThreshold? |
|
|
Specifies the minimum offset between the top of the latest receiver message and the top edge of the visible message area when auto-scrolling on new receiver messages. Accepts a percentage string relative to the visible message area height (for example, When a new receiver message arrives and the user is near or at the bottom of the scrollable message list, the Chat scrolls down so that at least this much space is kept between the new message and the top of the visible area. This ensures older messages remain partially in view rather than being scrolled out entirely. Has no effect on author messages, which always scroll to the bottom. Negative values are intentionally allowed so receiver messages can scroll fully to the bottom if needed. tsx
|
className? |
|
CSS class of the Chat DOM element. | |
dir? |
|
Direction of the Chat component. | |
fileActions? |
|
Actions displayed for files in the message. | |
filesField? |
|
|
Field name for file attachments. |
headerTemplate? |
|
Template for the header of the Chat component. | |
height? |
|
Height of the Chat. | |
id? |
|
ID of the Chat component. | |
idField? |
|
|
Field name for message ID. |
inputValue? |
|
Sets the controlled input value of the Chat component.
When provided, the Chat operates in controlled mode and you must handle tsx
| |
isDeletedField? |
|
|
Field name for message deletion status. |
isFailedField? |
|
|
Field name for message failed status. Indicates whether the message has failed to send. |
isPinnedField? |
|
|
Field name for message pinned status. |
loading? |
|
|
Specifies whether the Send button is transformed to a stop button. tsx
|
messageBox? |
|
Enables customization or override of the default message box item (see example). | |
messageBoxSettings? |
|
Configuration for the Message Box (PromptBox component). tsx
| |
messageContentTemplate? |
|
React functional or class component used as a message content template. Rendered inside the .k-bubble-content element when provided. The corresponding | |
messageContextMenuActions? |
|
Actions displayed in the message context menu. | |
messageFilesLayout? |
|
|
Sets the file layout mode for file attachments in messages.
|
messages |
|
Messages of the Chat. Can be an array of | |
messageTemplate? |
|
React functional or class component used as a message template. The corresponding | |
messageToolbarActions? |
|
Actions displayed in the message toolbar. | |
messageWidthMode? |
|
|
Sets the message width mode.
|
noDataTemplate? |
|
Template for the empty Chat state when no messages are present. Only renders when there are no messages and this template is provided. | |
onActionExecute? |
|
Fires when the user clicks a quick action button. The Chat internally handles the | |
onContextMenuAction? |
|
Fires when a context menu action is executed on a message. Provides the action and target message. | |
onDownload? |
|
Fires when a download action is executed on a message. Provides the selected files and parent message. | |
onFileAction? |
|
Fires when a file action is executed on a message. Provides the action and target file. | |
onInputValueChange? |
|
Fires when the input value changes. Provides the new input value. | |
onResendMessage? |
|
Fires when the user clicks the Retry button on a failed message.
Emits tsx
| |
onSendMessage? |
|
Fires when the user types a message and clicks Send or presses Enter. Emits
| |
onSuggestionClick? |
|
Fires when a suggestion is clicked. Provides the clicked suggestion. | |
onToolbarAction? |
|
Fires when a toolbar action is executed on a message. Provides the action and target message. | |
onUnpin? |
|
Fires when a message is unpinned. Provides the message. | |
placeholder? |
|
Text displayed inside the new message input when empty. | |
quickActionsLayout? |
|
|
Controls how quick actions behave when they exceed available space.
|
receiverMessageSettings? |
|
Configuration settings for receiver messages (messages from other users). These settings override global message settings for receiver messages. If both global and receiver-specific settings are provided, the receiver-specific settings take precedence. | |
replyToIdField? |
|
|
Field name for reply-to message ID. |
scrollToBottomButton? |
|
|
Enables or disables the scroll-to-bottom button that appears when the user scrolls up. When enabled, a floating action button appears to allow quick navigation to the latest messages. tsx
|
sendButtonConfig? |
|
Configures the appearance and behavior of the send button in the Chat component. | |
showAvatar? |
|
|
Controls whether avatars are displayed for messages. Can be overridden by author-specific and receiver-specific settings. |
showUsername? |
|
|
Controls whether author names are displayed for messages. Can be overridden by author-specific and receiver-specific settings. |
speechToTextConfig? |
|
Enables the speech-to-text functionality in the Chat. This allows users to dictate messages instead of typing them. | |
statusField? |
|
|
Field name for message status. |
statusTemplate? |
|
Template for status items below each message. | |
style? |
|
Represents the styles that are applied to the Chat. tsx
| |
suggestedActionsField? |
|
|
Field name for the |
suggestions? |
|
List of message suggestions displayed above the message input. | |
suggestionsLayout? |
|
|
Controls how suggestions behave when they exceed available space.
|
suggestionTemplate? |
|
Template for suggestion items displayed above the message input. | |
textField? |
|
|
Field name for message text content. |
timestampField? |
|
|
Field name for message timestamp. |
timestampTemplate? |
|
Template for the timestamp of the message. | |
timestampVisibility? |
|
|
Controls when timestamps are visible for messages.
|
typingField? |
|
|
Field name for the |
uploadConfig? |
|
Sets the upload configuration for the Chat component. This can be used to customize the file upload behavior, such as accepted file types and maximum file size. | |
userStatusTemplate? |
|
Template for user status display next to avatars. Only rendered when an avatar for the user is provided. | |
width? |
|
Width of the Chat. |