Components

MessagingCanvas

<MessagingCanvas {...MessagingCanvas.MessagingCanvasProps} />

A container which holds MessageInput and MessageList Can be themed with theme.Chat.MessagingCanvas

Component children

These below are list of children
Key Condition Type Align Description
list MessageList Message list. Displays the `MessageList` component
input MessageInput Message input. Displays the `MessageInput` component
tray Visible only if `showTrayOnInactive` prop is true and the channel is inactive MessageCanvasTray Message canvas tray. Displays the `MessageCanvasTray` component for webchat

Members

DynamicContentStore.<MessagingCanvas.MessagingCanvasChildrenProps>

# static readonly Content

Dynamic content store
MessagingCanvas.MessagingCanvasProps

# static readonly defaultProps

Default properties
MessageInput

# static readonly Input

Shortcut for MessageInput component
MessageList

# static readonly MessageList

Shortcut for MessageList component

Type Definitions

# AvatarCallback(identity) → {String}

Callback to return URL to the avatar image for message sender/user.
Parameters:
Name Type Description
identity String Identity of a user
URL to the avatar image
String
Object

# MemberDisplayOptions

Chat member display configuration
Properties:
Name Type Attributes Description
yourDefaultName String <optional>
Default string shown for local user's name
theirDefaultName String <optional>
Default string shown for remote user's name
yourFriendlyNameOverride Boolean <optional>
Should the user's friendly name be displayed as name for this user's messages?
theirFriendlyNameOverride Boolean <optional>
Should the user's friendly name be displayed as name for this other user's messages?
"Rounded" | "Squared" | "Minimal"

# MessageStyle

Represents the style of a message.
Object

# MessagingCanvasChildrenProps

Properties:
Name Type Attributes Description
channel ChatChannelState.ChannelState <optional>
charLimit number <optional>
Object

# MessagingCanvasProps

An object properties representing the MessagingCanvas
Properties:
Name Type Attributes Description
sid string A unique identifier of the message.
inputDisabledReason string <optional>
A reason on why the input element is disabled.
avatarCallback MessagingCanvas.AvatarCallback <optional>
A handler to request for avatar.
memberDisplayOptions MessagingCanvas.MemberDisplayOptions <optional>
Chat member display configuration.
messageStyle MessagingCanvas.MessageStyle <optional>
Identifies how the message should be displayed.
showTypingIndicator boolean <optional>
Should the typing indicator be shown.
showReadStatus boolean <optional>
Should the read status be shown.
showTrayOnInactive boolean <optional>
Should MessageTray to be shown when channel is inactive.
showWelcomeMessage boolean <optional>
Should a welcome message to be shown.
welcomeMessageText Template.CompiledTemplate <optional>
string representing the welcome message.
charLimit number <optional>
Identifies character limit for a single message.
predefinedMessage MessagingCanvas.PredefinedMessage <optional>
Defines the predefined, introductory message to be shown to a customer.
autoInitChannel MessagingCanvas.autoInitChannel <optional>
Should the component automatically initialize chat channel if not initialized already.
hasMarkdownSupport boolean <optional>
If set to true, messages bodies will be parsed as markdown.
Object

# PredefinedMessage

An object properties representing the PredefinedMessage
Properties:
Name Type Description
body string content of the message
authorName string name of the author
isFromMe boolean whether it appears as message from the current user or not.