Skip to main content

MessageListConfiguration

This refers to the properties of the CometChatMessageList component that are available for customisation via the parent component when the component exists in a deep nested hierarchy.

Configurable Properties

NameDescription
messagesRequestBuilderClass that allows you to set various parameters to the MessagesRequest class based on which the messages are fetched
templatesThis refers to the structure each message will take form or shape of. It defaults to templates for 5 message type i.e. text, audio, video, image, files including the supported extensions.
alignmentThis refers to the visual arrangement or positioning of the message bubble within the message list. Defaults to standard alignment i.e. Sent messages aligned to right and received messages aligned to left.
timestampAlignmentThis refers to the visual arrangement or positioning of the message timestamp within the message list. Defaults to top alignment.
loadingIconURLAsset URL for the loading indicator icon
loadingStateViewUser-defined component to customise the loading indicator
emptyStateViewUser-defined component to customise the empty state of the component.
errorStateViewUser-defined component to customise the error state of the component.
waitIconAsset URL for the wait state indicating that a sent message is in transit.
sentIconAsset URL for the sent state indicating that a message is sent successfully.
deliveredIconAsset URL for the delivered state indicating that a sent message is delivered successfully.
readIconAsset URL for the read state indicating that a sent message is read by the receiver.
errorIconAsset URL for the error state indicating that an error has occurred when the message was in transit.
headerViewUser-defined component to customise the top of the message list component. You can customise it to contain important information, branding elements, or navigation controls. It defaults to an empty view.
footerViewUser-defined component to customise the bottom of the message list component. You can customise it to contain supplementary information, navigation links, or actions. By default, it shows quick reply options to a user when the Smart Replies extension is enabled.
datePatternUser defined date format for the timestamp displayed for each message bubble.
DatePatternsUser defined date format of the delimiters used to separate the message bubbles.
showAvatarWhen set to true, it will display avatar for both the sender and recipient of the message.
hideErrorWhen set to true, hides the error message when an error is encountered in the component
disableReceiptWhen set to true, switches off the visual indication when a message has been read or viewed by the recipient.
scrollToBottomOnNewMessagesWhen set to true, the message list scrolls to the bottom automatically upon receiving a message instead of showing a scroll-to-bottom button.
disableSoundForMessagesWhen set to true, the component will not produce sound for all incoming messages.
customSoundForMessagesmp3 file asset of your choice.
onThreadRepliesClickOverride the method that is invoked when a threaded conversation is clicked in the message list.
onErrorOverride the method that is invoked when an error is encountered within the details component
avatarStyleStyling properties and values of the Avatar component
statusIndicatorStyleStyling properties and values of the StatusIndicator component
backdropStyleStyling properties and values of the Backdrop component
messageListStyleStyling properties and values of the CometChatMessageList component
disableMentionsDisables mentions in message list. Default value is set to false
reactionsConfigurationProperties reactions that are available for customisation via the messages component.
disableReactionsDisables reactions in message list
emojiKeyboardStyleStyling properties for customization of emoji keyboard
threadIndicatorIconAccepts asset file/url for threadIndicatorIcon
textFormattersListAccepts custom text formatters for message list