ChatProps
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.
Definition
Package:@progress/kendo-react-conversational-ui
Properties
allowMessageCollapse?
boolean
Enables expand or collapse for messages to save space.
attachmentsField?
string
Field name for message attachments.
'attachments'
React functional or class component used as an attachment template (see example). The corresponding attachment is passed as an item property.
authorId
string | number
ID of the local user. Identifies messages authored by the local user.
authorIdField?
string
Field name for message author ID.
'authorId'
authorImageAltTextField?
string
Field name for alt text of the author's avatar (when flattened).
'authorImageAltText'
authorImageUrlField?
string
Field name for message author avatar URL (when flattened).
'authorImageUrl'
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?
string
Field name for message author name (when flattened).
'authorName'
autoScrollThreshold?
string | number
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, '30%')
or an absolute pixel value as a number.
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.
'20%'
className?
string
CSS class of the Chat DOM element.
dir?
string
Direction of the Chat component.
endIndex?
number
The index (exclusive) in the full conversation that marks the end of the current batch.
Only relevant in remote mode (messages.length < total).
Actions displayed for files in the message.
filesField?
string
Field name for file attachments.
'files'
headerTemplate?
ReactElement<unknown, string | JSXElementConstructor<any>> | () => ReactElement<unknown, string | JSXElementConstructor<any>>
Template for the header of the Chat component.
height?
string | number
Height of the Chat.
id?
string
ID of the Chat component.
idField?
string
Field name for message ID.
'id'
inputValue?
string
Sets the controlled input value of the Chat component.
When provided, the Chat operates in controlled mode and you must handle onInputValueChange to update the value.
isDeletedField?
string
Field name for message deletion status.
'isDeleted'
isFailedField?
string
Field name for message failed status. Indicates whether the message has failed to send.
'isFailed'
isPinnedField?
string
Field name for message pinned status.
'isPinned'
loading?
boolean
Specifies whether the Send button is transformed to a stop button.
false
messageBox?
ComponentType<ChatMessageBoxProps>
Enables customization or override of the default message box item (see example).
Configuration for the Message Box (PromptBox component).
messageContentTemplate?
ComponentType<ChatMessageTemplateProps>
React functional or class component used as a message content template. Rendered inside the .k-bubble-content element when provided. The corresponding message is passed as an item property.
Actions displayed in the message context menu.
Sets the file layout mode for file attachments in messages.
vertical—Files are displayed in a vertical list layout.wrap—Files are displayed in a wrapped layout.horizontal—Files are displayed in a horizontal list layout with scrollable overflow.
'vertical'
Messages of the Chat. Can be an array of Message objects or raw data objects
that map using the field mapping configuration.
messageTemplate?
ComponentType<ChatMessageTemplateProps>
React functional or class component used as a message template. The corresponding message is passed as an item property.
Actions displayed in the message toolbar.
Sets the message width mode.
full—Message occupies the full width of the Chat.standard—Message occupies a standard width for a compact display.
'standard'
noDataTemplate?
ReactElement<unknown, string | JSXElementConstructor<any>> | () => ReactElement<unknown, string | JSXElementConstructor<any>>
Template for the empty Chat state when no messages are present. Only renders when there are no messages and this template is provided.
onActionExecute?
(event: ChatActionExecuteEvent) => void
Fires when the user clicks a quick action button. The Chat internally handles the reply, openUrl, and call known actions. Emits ExecuteActionEvent. The event is preventable. If you call preventDefault, the built-in action is suppressed.
onContextMenuAction?
(action: MessageAction, event: SyntheticEvent<any, Event>, target: Message) => void
Fires when a context menu action is executed on a message. Provides the action and target message.
onFileAction?
(action: FileAction, event: SyntheticEvent<any, Event>, target: ChatFile) => void
Fires when a file action is executed on a message. Provides the action and target file.
onInputValueChange?
(value: string) => void
Fires when the input value changes. Provides the new input value.
onLoadMoreMessages?
(event: ChatLoadMoreMessagesEvent) => void
Fires in both built-in and remote endless scroll modes when the user scrolls near the edge
of the rendered message window.
In built-in mode, the Chat manages rendering internally and this callback is informational.
In remote mode (messages.length < total), the consumer must provide the requested range.
The event contains the full range that should be rendered (not just the delta).
onReferencedMessageClick?
(event: ChatReferencedMessageClickEvent) => void
Fires when the user clicks a referenced message (pinned indicator or reply preview).
onResendMessage?
(event: ChatResendMessageEvent) => void
Fires when the user clicks the Retry button on a failed message.
Emits ChatResendMessageEvent.
onSendMessage?
(event: ChatSendMessageEvent) => void
Fires when the user types a message and clicks Send or presses Enter. Emits SendMessageEvent.
The Chat does not automatically update with the new message.
onSuggestionClick?
(suggestion: ChatSuggestion) => void
Fires when a suggestion is clicked. Provides the clicked suggestion.
onToolbarAction?
(action: MessageAction, event: SyntheticEvent<any, Event>, target: Message) => void
Fires when a toolbar action is executed on a message. Provides the action and target message.
Fires when a message is unpinned. Provides the message.
pageSize?
number
How many messages to load per scroll-triggered batch.
50
The full set of pinned messages in the conversation.
Only needed in remote mode (messages.length < total).
The Chat uses this to render the pinned message indicator when the pinned message
is outside the current batch. In built-in mode, the Chat has all messages and can
look them up directly. This collection is stable — set once on load and updated
only when pins change.
placeholder?
string
Text displayed inside the new message input when empty.
Controls how quick actions behave when they exceed available space.
scroll—Quick actions scroll horizontally without navigation buttons.wrap—Quick actions wrap to new lines when they overflow.scrollbuttons—Quick actions scroll horizontally with navigation buttons.
'scroll'
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.
Messages that are reply targets for messages in the current batch but live outside messages[].
Only needed in remote mode (messages.length < total).
The Chat uses this to render reply previews when the replied-to message is not in the current batch.
This collection is scoped per batch — rebuilt on each onLoadMoreMessages or batch replacement.
replyToIdField?
string
Field name for reply-to message ID.
'replyToId'
Controls the scroll behavior of the message list.
scrollable—Default mode. All messages are rendered with standard scroll behavior.endless—Endless scroll mode. The Chat starts by rendering the lastpageSizemessages and prepends older ones as the user scrolls up.
'scrollable'
scrollToBottomButton?
boolean
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.
true
sendButtonConfig?
boolean | ButtonProps
Configures the appearance and behavior of the send button in the Chat component.
showAvatar?
boolean
Controls whether avatars are displayed for messages. Can be overridden by author-specific and receiver-specific settings.
true
showUsername?
boolean
Controls whether author names are displayed for messages. Can be overridden by author-specific and receiver-specific settings.
true
speechToTextConfig?
boolean | SpeechToTextButtonProps
Enables the speech-to-text functionality in the Chat. This allows users to dictate messages instead of typing them.
startIndex?
number
The index in the full conversation that messages[0] corresponds to.
Only relevant in remote mode (messages.length < total).
statusField?
string
Field name for message status.
'status'
statusTemplate?
ComponentType<StatusTemplateProps>
Template for status items below each message.
style?
CSSProperties
Represents the styles that are applied to the Chat.
suggestedActionsField?
string
Field name for the suggestedActions property of a message.
'suggestedActions'
List of message suggestions displayed above the message input.
Controls how suggestions behave when they exceed available space.
scroll—Suggestions scroll horizontally without navigation buttons.wrap—Suggestions wrap to new lines when they overflow.scrollbuttons—Suggestions scroll horizontally with navigation buttons.
'scroll'
suggestionTemplate?
ComponentType<SuggestionTemplateProps>
Template for suggestion items displayed above the message input.
textField?
string
Field name for message text content.
'text'
timestampField?
string
Field name for message timestamp.
'timestamp'
timestampTemplate?
ComponentType<{ item: DateMarker }>
Template for the timestamp of the message.
Controls when timestamps are visible for messages.
onFocus—Timestamps are only visible for selected/focused messages.hidden—Timestamps are never visible for any messages.
'onFocus'
total?
number
The total number of messages in the conversation.
Used to determine the mode: when messages.length === total, the Chat manages rendering
internally (built-in mode); when messages.length < total, the consumer manages data (remote mode).
typingField?
string
Field name for the typing property of a message.
'typing'
uploadConfig?
boolean | UploadButtonProps
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?
ComponentType<UserStatusTemplateProps>
Template for user status display next to avatars. Only rendered when an avatar for the user is provided.
webMcp?
boolean | WebMcpProps
Enables browser-native AI agent tools via Web MCP (Chrome 146+).
Pass true for defaults or an object for fine-grained control.
AI agents are multilingual — dataName accepts any language.
width?
string | number
Width of the Chat.