ChatProps
attachmentTemplate?
any
A React functional or class component which is used as an attachment template (see example). The corresponding attachment
is passed to the component as a property by the name item
.
className?
string
Sets a class of the Chat DOM element.
dir?
string
Sets the direction of the Chat component.
message?
React.ComponentType<ChatMessageProps>
Represents the ChatMessage component.
messageBox?
React.ComponentType<ChatMessageBoxProps>
Enables the customization or the override of the default message box item in the Conversational UI (see example).
messageTemplate?
React.ComponentType<ChatMessageTemplateProps>
A React functional or class component which is used as a message template. The corresponding message
is passed to the component as a property by the name item
.
messages
Message[]
Sets the messages of the Chat.
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 the ExecuteActionEvent
. The event is preventable. If preventDefault
is called, the built-in action will be suppressed.
onMessageSend?
(event: ChatMessageSendEvent) => void
Fires when the user types a message and clicks the Send button or presses Enter. Emits the MessageSendEvent
.
The Chat is not automatically updated with the new message.
onToolbarActionExecute?
(event: ChatToolbarActionExecuteEvent) => void
Fires when the user clicks the button to show or hide the toolbar.
placeholder?
string
The text which is visible inside the new message input when the message input is empty.
showToolbar?
any
Determines if the toolbar will be rendered.
toolbar?
any
Renders a toolbar inside the Chat.
user
Sets the User
instance for the local user. The User ID identifies messages that are authored by the local user.
width?
string | number
Sets the width of the Chat.