Skip to main content
{
  "component": "CometChatMessageList",
  "package": "@cometchat/chat-uikit-react-native",
  "import": "import { CometChatMessageList } from \"@cometchat/chat-uikit-react-native\";",
  "description": "Scrollable list of sent and received messages with text, media, reactions, read receipts, threaded replies, and AI features.",
  "primaryOutput": {
    "prop": "onThreadRepliesPress",
    "type": "(messageObject: CometChat.BaseMessage, messageBubbleView: () => JSX.Element | null) => void"
  },
  "props": {
    "data": {
      "user": { "type": "CometChat.User", "default": "undefined", "note": "User object for 1-on-1 conversation" },
      "group": { "type": "CometChat.Group", "default": "undefined", "note": "Group object for group conversation" },
      "messageRequestBuilder": { "type": "CometChat.MessagesRequestBuilder", "default": "SDK default", "note": "UID/GUID/types/categories are always overridden internally" },
      "templates": { "type": "CometChatMessageTemplate[]", "default": "SDK defaults", "note": "Custom message bubble templates" },
      "addTemplates": { "type": "CometChatMessageTemplate[]", "default": "[]", "note": "Additional message templates to append to defaults" },
      "parentMessageId": { "type": "number", "default": "undefined", "note": "For threaded message view" },
      "goToMessageId": { "type": "string", "default": "undefined", "note": "Message ID to navigate to and highlight" },
      "searchKeyword": { "type": "string", "default": "undefined", "note": "Keyword to highlight in message text" }
    },
    "callbacks": {
      "onThreadRepliesPress": "(messageObject: CometChat.BaseMessage, messageBubbleView: () => JSX.Element | null) => void",
      "onError": "(error: CometChat.CometChatException) => void",
      "onReactionPress": "(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void",
      "onReactionLongPress": "(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void",
      "onReactionListItemPress": "(reaction: CometChat.Reaction, messageObject: CometChat.BaseMessage) => void",
      "onAddReactionPress": "() => void",
      "onSuggestedMessageClick": "(suggestion: string) => void",
      "onLoad": "(messageList: CometChat.BaseMessage[]) => void",
      "onEmpty": "() => void"
    },
    "visibility": {
      "receiptsVisibility": { "type": "boolean", "default": true },
      "avatarVisibility": { "type": "boolean", "default": true },
      "hideError": { "type": "boolean", "default": false },
      "hideTimestamp": { "type": "boolean", "default": false },
      "hideReplyOption": { "type": "boolean", "default": false },
      "hideReplyInThreadOption": { "type": "boolean", "default": false },
      "hideShareMessageOption": { "type": "boolean", "default": false },
      "hideEditMessageOption": { "type": "boolean", "default": false },
      "hideDeleteMessageOption": { "type": "boolean", "default": false },
      "hideTranslateMessageOption": { "type": "boolean", "default": false },
      "hideReactionOption": { "type": "boolean", "default": false },
      "hideMessagePrivatelyOption": { "type": "boolean", "default": false },
      "hideCopyMessageOption": { "type": "boolean", "default": false },
      "hideMessageInfoOption": { "type": "boolean", "default": false },
      "hideGroupActionMessages": { "type": "boolean", "default": false },
      "hideModerationStatus": { "type": "boolean", "default": false },
      "hideSuggestedMessages": { "type": "boolean", "default": false },
      "showMarkAsUnreadOption": { "type": "boolean", "default": false },
      "hideFlagMessageOption": { "type": "boolean", "default": false },
      "hideFlagRemarkField": { "type": "boolean", "default": false }
    },
    "behavior": {
      "alignment": { "type": "MessageListAlignmentType", "values": ["leftAligned", "standard"], "default": "standard" },
      "scrollToBottomOnNewMessage": { "type": "boolean", "default": false },
      "startFromUnreadMessages": { "type": "boolean", "default": false },
      "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" }
    },
    "sound": {
      "disableSoundForMessages": { "type": "boolean", "default": false },
      "customSoundForMessages": { "type": "audio source", "default": "built-in" }
    },
    "ai": {
      "suggestedMessages": { "type": "string[]", "note": "Predefined prompts for AI assistant chats" },
      "aiAssistantTools": { "type": "CometChatAIAssistantTools", "note": "Tool actions for AI assistant" },
      "quickReactionList": { "type": "string[]", "default": "predefined reactions" },
      "streamingSpeed": { "type": "number", "default": "undefined", "note": "AI response streaming speed in ms" }
    },
    "viewSlots": {
      "HeaderView": "({ user, group, id }) => JSX.Element",
      "FooterView": "({ user, group, id }) => JSX.Element",
      "LoadingView": "() => JSX.Element",
      "EmptyView": "() => JSX.Element",
      "ErrorView": "() => JSX.Element",
      "NewMessageIndicatorView": "() => JSX.Element",
      "emptyChatGreetingView": "JSX.Element",
      "emptyChatIntroMessageView": "JSX.Element",
      "emptyChatImageView": "JSX.Element"
    },
    "newMessageIndicator": {
      "newMessageIndicatorStyle": { "type": "NewMessageIndicatorStyle", "default": "built-in" },
      "newMessageIndicatorText": { "type": "string", "default": "built-in" }
    },
    "formatting": {
      "textFormatters": { "type": "CometChatTextFormatter[]", "default": "default formatters from data source" },
      "datePattern": "(message: CometChat.BaseMessage) => string",
      "dateSeperatorPattern": "(date: number) => string"
    }
  },
  "events": [
    { "name": "openChat", "payload": "{ user, group }", "description": "User opens a chat" },
    { "name": "ccMessageEdited", "payload": "{ message }", "description": "Message edited by logged-in user" },
    { "name": "ccMessageDeleted", "payload": "{ message }", "description": "Message deleted by logged-in user" },
    { "name": "ccActiveChatChanged", "payload": "chat details", "description": "User navigates to a different chat" },
    { "name": "ccMessageRead", "payload": "{ message }", "description": "Message read by logged-in user" },
    { "name": "ccMessageDelivered", "payload": "{ message }", "description": "Messages marked as delivered" }
  ],
  "sdkListeners": [
    "onTextMessageReceived", "onMediaMessageReceived", "onCustomMessageReceived",
    "onMessageEdited", "onMessageDeleted", "onTypingStarted", "onTypingEnded",
    "onMessagesDelivered", "onMessagesRead"
  ],
  "compositionExample": {
    "description": "Message list wired with header and composer for complete chat view",
    "components": ["CometChatMessageHeader", "CometChatMessageList", "CometChatMessageComposer"],
    "flow": "Pass user or group prop to all three components for a complete messaging interface"
  },
  "types": {
    "MessageListAlignmentType": { "leftAligned": "All messages aligned to left", "standard": "Sent messages right, received messages left" }
  }
}

Where It Fits

CometChatMessageList renders a scrollable, real-time message feed for a user or group conversation. Wire it alongside CometChatMessageHeader and CometChatMessageComposer to build a standard chat view.
import { useState, useEffect } from "react";
import { View, StyleSheet } from "react-native";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import {
  CometChatMessageHeader,
  CometChatMessageList,
  CometChatMessageComposer,
  CometChatThemeProvider,
} from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function ChatView() {
  const [chatUser, setChatUser] = useState<CometChat.User>();

  useEffect(() => {
    CometChat.getUser("uid").then((user) => setChatUser(user));
  }, []);

  return chatUser ? (
    <GestureHandlerRootView style={{ flex: 1 }}>
      <SafeAreaProvider>
        <CometChatThemeProvider>
          <View style={styles.container}>
            <CometChatMessageHeader user={chatUser} />
            <CometChatMessageList user={chatUser} />
            <CometChatMessageComposer user={chatUser} />
          </View>
        </CometChatThemeProvider>
      </SafeAreaProvider>
    </GestureHandlerRootView>
  ) : null;
}

const styles = StyleSheet.create({
  container: { flex: 1 },
});

Minimal Render

import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function MessageListDemo() {
  return <CometChatMessageList user={chatUser} />;
}

export default MessageListDemo;
Simply adding the CometChatMessageList component to the layout will result in an error. To fetch messages, you need to supplement it with user or group prop.

Filtering Messages

Pass a CometChat.MessagesRequestBuilder to messageRequestBuilder. The UID/GUID parameters are always overridden internally based on the user/group prop.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function FilteredMessageList() {
  return (
    <CometChatMessageList
      user={chatUser}
      messageRequestBuilder={
        new CometChat.MessagesRequestBuilder().setLimit(5)
      }
    />
  );
}
The following parameters in messageRequestBuilder will always be altered inside the message list:
  1. UID
  2. GUID
  3. types
  4. categories
Refer to MessagesRequestBuilder for the full builder API.

Actions and Events

Callback Props

onThreadRepliesPress

Fires when you press on the threaded message bubble.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function MessageListWithThreads() {
  const handleThreadReplies = (
    msg: CometChat.BaseMessage,
    messageBubbleView: () => JSX.Element | null
  ) => {
    console.log("Thread replies pressed:", msg.getId());
  };

  return (
    <CometChatMessageList
      user={chatUser}
      onThreadRepliesPress={handleThreadReplies}
    />
  );
}

onError

Fires on internal errors (network failure, auth issue, SDK exception).
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function MessageListWithErrorHandler() {
  return (
    <CometChatMessageList
      user={chatUser}
      onError={(error: CometChat.CometChatException) => {
        console.error("MessageList error:", error);
      }}
    />
  );
}

onReactionPress

Fires when a reaction on a message bubble is clicked.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function MessageListWithReactions() {
  const handleReactionPress = (
    reaction: CometChat.ReactionCount,
    messageObject: CometChat.BaseMessage
  ) => {
    console.log("Reaction pressed:", reaction, messageObject.getId());
  };

  return (
    <CometChatMessageList
      user={chatUser}
      onReactionPress={handleReactionPress}
    />
  );
}

onLoad

Fires when messages are successfully fetched and loaded.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function MessageListWithLoadHandler() {
  const handleLoad = (messageList: CometChat.BaseMessage[]) => {
    console.log("Messages loaded:", messageList.length);
  };

  return <CometChatMessageList user={chatUser} onLoad={handleLoad} />;
}

Global UI Events

CometChatUIEventHandler emits events subscribable from anywhere in the application. Subscribe in a useEffect and unsubscribe on cleanup.
EventFires whenPayload
openChatUser opens a user or group chat{ user, group }
ccMessageEditedMessage edited by logged-in user{ message }
ccMessageDeletedMessage deleted by logged-in user{ message }
ccActiveChatChangedUser navigates to a different chatchat details
ccMessageReadMessage read by logged-in user{ message }
ccMessageDeliveredMessages marked as delivered{ message }
import { useEffect } from "react";
import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";

function useMessageListEvents() {
  useEffect(() => {
    const uiListenerId = "UI_LISTENER_" + Date.now();
    const messageListenerId = "MESSAGE_LISTENER_" + Date.now();

    CometChatUIEventHandler.addUIListener(uiListenerId, {
      openChat: ({ user, group }) => {
        console.log("Chat opened:", user || group);
      },
    });

    CometChatUIEventHandler.addMessageListener(messageListenerId, {
      ccMessageEdited: ({ message }) => {
        console.log("Message edited:", message.getId());
      },
      ccMessageDeleted: ({ message }) => {
        console.log("Message deleted:", message.getId());
      },
    });

    return () => {
      CometChatUIEventHandler.removeUIListener(uiListenerId);
      CometChatUIEventHandler.removeMessageListener(messageListenerId);
    };
  }, []);
}

SDK Events (Real-Time, Automatic)

The component listens to these SDK events internally. No manual attachment needed unless additional side effects are required.
SDK ListenerInternal behavior
onTextMessageReceived / onMediaMessageReceived / onCustomMessageReceivedAppends new message to list
onMessageEdited / onMessageDeletedUpdates/removes message in list
onTypingStarted / onTypingEndedShows/hides typing indicator
onMessagesDelivered / onMessagesReadUpdates receipt ticks

Custom View Slots

Each slot replaces a section of the default UI.
SlotSignatureReplaces
HeaderView({ user, group, id }) => JSX.ElementArea above the message list
FooterView({ user, group, id }) => JSX.ElementArea below the message list
LoadingView() => JSX.ElementLoading state
EmptyView() => JSX.ElementEmpty state
ErrorView() => JSX.ElementError state
NewMessageIndicatorView() => JSX.ElementNew messages indicator
templatesCometChatMessageTemplate[]Message bubble rendering
textFormattersCometChatTextFormatter[]Text formatting in messages

HeaderView

Custom view above the message list.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { View, Text, TouchableOpacity } from "react-native";

function MessageListWithHeader() {
  const getHeaderView = ({
    user,
    group,
    id,
  }: {
    user?: CometChat.User;
    group?: CometChat.Group;
    id?: { uid?: string; guid?: string; parentMessageId?: string };
  }) => {
    return (
      <View style={{ flexDirection: "row", padding: 10, backgroundColor: "#edeafa", gap: 8 }}>
        <TouchableOpacity style={{ backgroundColor: "#fafafa", paddingHorizontal: 12, paddingVertical: 6, borderRadius: 16 }}>
          <Text style={{ color: "#6852D6" }}>Notes</Text>
        </TouchableOpacity>
        <TouchableOpacity style={{ backgroundColor: "#fafafa", paddingHorizontal: 12, paddingVertical: 6, borderRadius: 16 }}>
          <Text style={{ color: "#6852D6" }}>Pinned</Text>
        </TouchableOpacity>
      </View>
    );
  };

  return <CometChatMessageList user={chatUser} HeaderView={getHeaderView} />;
}

FooterView

Custom view below the message list.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { View, Text, TouchableOpacity } from "react-native";

function MessageListWithFooter() {
  const getFooterView = ({
    user,
    group,
    id,
  }: {
    user?: CometChat.User;
    group?: CometChat.Group;
    id?: { uid?: string; guid?: string; parentMessageId?: string };
  }) => {
    return (
      <View style={{ flexDirection: "row", padding: 10, backgroundColor: "#edeafa", gap: 8 }}>
        <TouchableOpacity style={{ backgroundColor: "#fafafa", paddingHorizontal: 12, paddingVertical: 6, borderRadius: 16 }}>
          <Text style={{ color: "#6852D6" }}>Ice Breakers</Text>
        </TouchableOpacity>
      </View>
    );
  };

  return <CometChatMessageList user={chatUser} FooterView={getFooterView} />;
}

templates

Custom message bubble templates via CometChatMessageTemplate.
import { CometChatMessageList, ChatConfigurator, CometChatMessageTemplate } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";
import { Text } from "react-native";

function MessageListCustomTemplates() {
  const getTemplates = () => {
    let templates: CometChatMessageTemplate[] = ChatConfigurator.getDataSource().getAllMessageTemplates(theme);
    templates.map((data) => {
      if (data.type === "text") {
        data.ContentView = (messageObject: CometChat.BaseMessage) => {
          const textMessage = messageObject as CometChat.TextMessage;
          return (
            <Text style={{ backgroundColor: "#fff5fd", padding: 10 }}>
              {textMessage.getText()}
            </Text>
          );
        };
      }
    });
    return templates;
  };

  return <CometChatMessageList user={chatUser} templates={getTemplates()} />;
}

dateSeperatorPattern

Custom format for displaying sticky date separators.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function MessageListCustomDateSeparator() {
  const customDateSeparatorPattern = (date: number) => {
    const timeStampInSeconds = new Date(date * 1000);
    const day = String(timeStampInSeconds.getUTCDate()).padStart(2, "0");
    const month = String(timeStampInSeconds.getUTCMonth() + 1).padStart(2, "0");
    const year = timeStampInSeconds.getUTCFullYear();
    return `${day}/${month}/${year}`;
  };

  return (
    <CometChatMessageList
      user={chatUser}
      dateSeperatorPattern={customDateSeparatorPattern}
    />
  );
}

datePattern

Custom format for message timestamps.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";
import { CometChat } from "@cometchat/chat-sdk-react-native";

function MessageListCustomDatePattern() {
  const generateDateString = (message: CometChat.BaseMessage) => {
    const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
    const timeStamp = message.getSentAt();
    if (timeStamp) {
      const date = new Date(timeStamp * 1000);
      const day = days[date.getUTCDay()];
      const hours = date.getUTCHours();
      const minutes = String(date.getUTCMinutes()).padStart(2, "0");
      return `${day}, ${hours}:${minutes}`;
    }
    return "---, --:--";
  };

  return (
    <CometChatMessageList
      user={chatUser}
      datePattern={generateDateString}
    />
  );
}

textFormatters

Custom text formatters for message content.
import {
  CometChatMessageList,
  CometChatTextFormatter,
  CometChatMentionsFormatter,
} from "@cometchat/chat-uikit-react-native";

function MessageListWithFormatters() {
  const getTextFormatters = () => {
    const textFormatters: CometChatTextFormatter[] = [];
    const mentionsFormatter = new CometChatMentionsFormatter();
    mentionsFormatter.setMentionsStyle({
      textStyle: { color: "#D6409F" },
      selfTextStyle: { color: "#30A46C" },
    });
    textFormatters.push(mentionsFormatter);
    return textFormatters;
  };

  return (
    <CometChatMessageList
      user={chatUser}
      textFormatters={getTextFormatters()}
    />
  );
}
See CometChatMentionsFormatter for mention formatting.

Common Patterns

Threaded message list

import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function ThreadedMessageList() {
  return (
    <CometChatMessageList
      user={chatUser}
      parentMessageId={parentMessage.getId()}
    />
  );
}

Hide all chrome — minimal list

import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function MinimalMessageList() {
  return (
    <CometChatMessageList
      user={chatUser}
      receiptsVisibility={false}
      avatarVisibility={false}
      hideTimestamp={true}
      hideGroupActionMessages={true}
    />
  );
}

Left-aligned messages

import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function LeftAlignedList() {
  return (
    <CometChatMessageList
      user={chatUser}
      alignment="leftAligned"
    />
  );
}

AI conversation starters

import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function AIMessageList() {
  const suggestedMessages = [
    "How can I help you today?",
    "Tell me more about your issue.",
    "What would you like to achieve?",
  ];

  return (
    <CometChatMessageList
      user={chatUser}
      suggestedMessages={suggestedMessages}
      onSuggestedMessageClick={(suggestion) => console.log("Clicked:", suggestion)}
    />
  );
}
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function NavigateToMessage() {
  return (
    <CometChatMessageList
      user={chatUser}
      goToMessageId="message_id_123"
    />
  );
}

Styling

The component uses the theme system from CometChatThemeProvider. Pass a style prop to customize the appearance.
import { CometChatMessageList } from "@cometchat/chat-uikit-react-native";

function StyledMessageList() {
  return (
    <CometChatMessageList
      user={chatUser}
      style={{
        containerStyle: {
          backgroundColor: "#FEEDE1",
        },
        outgoingMessageBubbleStyles: {
          containerStyle: {
            backgroundColor: "#F76808",
          },
        },
      }}
    />
  );
}

Style Properties

PropertyTypeDescription
containerStyleViewStyleStyle for the root container
incomingMessageBubbleStylesobjectStyle for incoming message bubbles
outgoingMessageBubbleStylesobjectStyle for outgoing message bubbles
dateSeparatorStyleobjectStyle for date separators
actionSheetStyleobjectStyle for the action sheet

Props

All props are optional unless noted. Either user or group is required.

alignment

Controls message alignment.
Type"leftAligned" | "standard"
Default"standard"

avatarVisibility

Shows/hides avatars on messages.
Typeboolean
Defaulttrue

customSoundForMessages

Custom sound file for incoming message notifications.
Typeaudio source
DefaultBuilt-in sound

datePattern

Custom function to format message timestamps.
Type(message: CometChat.BaseMessage) => string
DefaultComponent default

dateSeperatorPattern

Custom function to format date separator timestamps.
Type(date: number) => string
DefaultComponent default

disableSoundForMessages

Disables the notification sound for incoming messages.
Typeboolean
Defaultfalse

EmptyView

Custom component displayed when there are no messages.
Type() => JSX.Element
DefaultBuilt-in empty state

ErrorView

Custom component displayed when an error occurs.
Type() => JSX.Element
DefaultBuilt-in error state

FooterView

Custom component displayed below the message list.
Type({ user, group, id }) => JSX.Element
Defaultundefined

goToMessageId

Scrolls to the specified message on initial load.
Typestring
Defaultundefined

group

The group for group conversation messages.
TypeCometChat.Group
Defaultundefined

HeaderView

Custom component displayed above the message list.
Type({ user, group, id }) => JSX.Element
Defaultundefined

hideCopyMessageOption

Hides the copy message option.
Typeboolean
Defaultfalse

hideDeleteMessageOption

Hides the delete message option.
Typeboolean
Defaultfalse

hideEditMessageOption

Hides the edit message option.
Typeboolean
Defaultfalse

hideError

Hides the error state view.
Typeboolean
Defaultfalse

hideFlagMessageOption

Hides the “Report Message” option.
Typeboolean
Defaultfalse

hideFlagRemarkField

Hides the remark text area in the flag message dialog.
Typeboolean
Defaultfalse

hideGroupActionMessages

Hides group action messages (join, leave, kick, etc.).
Typeboolean
Defaultfalse

hideMessageInfoOption

Hides the message info option.
Typeboolean
Defaultfalse

hideMessagePrivatelyOption

Hides the “Message Privately” option.
Typeboolean
Defaultfalse

hideModerationStatus

Hides the moderation status UI.
Typeboolean
Defaultfalse

hideReactionOption

Hides the reaction option.
Typeboolean
Defaultfalse

hideReplyInThreadOption

Hides the “Reply in Thread” option.
Typeboolean
Defaultfalse

hideReplyOption

Hides the reply option.
Typeboolean
Defaultfalse

hideShareMessageOption

Hides the share message option.
Typeboolean
Defaultfalse

hideSuggestedMessages

Hides suggested messages in AI view.
Typeboolean
Defaultfalse

hideTimestamp

Hides timestamps on messages.
Typeboolean
Defaultfalse

hideTranslateMessageOption

Hides the translate message option.
Typeboolean
Defaultfalse

LoadingView

Custom component displayed during the loading state.
Type() => JSX.Element
DefaultBuilt-in loading indicator

messageRequestBuilder

Controls which messages load and in what order.
TypeCometChat.MessagesRequestBuilder
DefaultSDK default
UID/GUID are always overridden internally.

NewMessageIndicatorView

Custom view for the “New Messages” indicator.
Type() => JSX.Element
DefaultBuilt-in indicator

onAddReactionPress

Callback fired when the “Add More Reactions” button is clicked.
Type() => void
Defaultundefined

onEmpty

Callback fired when the message list is empty.
Type() => void
Defaultundefined

onError

Callback fired when the component encounters an error.
Type(error: CometChat.CometChatException) => void
Defaultundefined

onLoad

Callback fired when messages are loaded.
Type(messageList: CometChat.BaseMessage[]) => void
Defaultundefined

onReactionLongPress

Callback fired when a reaction is long-pressed.
Type(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void
Defaultundefined

onReactionPress

Callback fired when a reaction is clicked.
Type(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void
Defaultundefined

onSuggestedMessageClick

Callback fired when a suggested message is clicked.
Type(suggestion: string) => void
Defaultundefined

onThreadRepliesPress

Callback fired when a threaded message reply count is clicked.
Type(messageObject: CometChat.BaseMessage, messageBubbleView: () => JSX.Element | null) => void
Defaultundefined

parentMessageId

Displays threaded conversation for the specified parent message.
Typenumber
Defaultundefined

quickReactionList

Custom list of quick reactions.
Typestring[]
DefaultPredefined reactions

receiptsVisibility

Shows/hides read/delivery receipt indicators.
Typeboolean
Defaulttrue

scrollToBottomOnNewMessage

Auto-scrolls to bottom when new messages arrive.
Typeboolean
Defaultfalse

searchKeyword

Keyword to highlight in message text.
Typestring
Defaultundefined

showMarkAsUnreadOption

Shows “Mark Unread” option in message actions.
Typeboolean
Defaultfalse

startFromUnreadMessages

Loads from the first unread message if available.
Typeboolean
Defaultfalse

suggestedMessages

Predefined prompts for AI assistant chats.
Typestring[]
Defaultundefined

templates

Custom message bubble templates. Replaces all default templates.
TypeCometChatMessageTemplate[]
DefaultSDK defaults

addTemplates

Additional message templates to append to the default templates.
TypeCometChatMessageTemplate[]
Default[]

newMessageIndicatorStyle

Custom styles for the “New Messages” indicator.
TypeNewMessageIndicatorStyle
DefaultBuilt-in style

newMessageIndicatorText

Custom text for the “New Messages” indicator.
Typestring
DefaultBuilt-in text

streamingSpeed

Speed in milliseconds for AI response streaming animation.
Typenumber
Defaultundefined

aiAssistantTools

Tool actions for AI assistant functionality.
TypeCometChatAIAssistantTools
Defaultundefined

textFormatters

Custom text formatters for message content.
TypeCometChatTextFormatter[]
DefaultDefault formatters from data source

user

The user for 1-on-1 conversation messages.
TypeCometChat.User
Defaultundefined

Next Steps