-
-
-***
-
-## Usage
-
-### Integration
+
+
+
+## Core Concepts
+
+- **`CometChatAIAssistantChatHistory`**: The main component class that renders the AI assistant chat history list. It is a Composite Component that can be launched via button clicks or any user-triggered action.
+- **Actions**: Callbacks such as `setOnItemClickListener`, `setOnItemLongClickListener`, `setOnNewChatClickListener`, and `setOnCloseClickListener` that let you respond to user interactions.
+- **Style**: XML theme styles applied via `setStyle()` to customize colors, fonts, and visual appearance of the chat history.
+- **Functionality**: Methods like `setUser`, `setErrorStateVisibility`, and `setEmptyStateVisibility` that configure the component's behavior and state visibility.
+
+## Actions and Events
+
+### Callback Methods
+
+What you're changing: How the component responds to user interactions such as taps, long-presses, new chat clicks, and close clicks.
-##### setOnItemClickListener
+- **Where**: Activity or Fragment where you hold a reference to `CometChatAIAssistantChatHistory`.
+- **Applies to**: `CometChatAIAssistantChatHistory`.
+- **Default behavior**: Predefined actions execute automatically when the user interacts with the component.
+- **Override**: Call the corresponding setter method to replace the default behavior with your own logic.
-Function invoked when a chat history item is clicked, typically used to open an ai assistant chat screen.
+#### `setOnItemClickListener`
+
+Function invoked when a chat history item is clicked, used to open an AI assistant chat screen.
-```xml themes.xml
-
-
-
+- **Code**:
+
+```xml themes.xml lines
+
+
+
```
+> **What this does:** Defines a custom style `CustomAIAssistantChatHistoryStyle` that sets the background color to `#FFFAF6` for the component, header, new chat area, date separator, and items. It applies a Times New Roman font to the header, new chat text, date separator, and item text. A helper style `textStyleTimesNewRoman` defines the font family.
+
-## Conversation Starters
+## Conversation Starter
-When a user initiates a new chat, the UI kit displays a list of suggested opening lines that users can select, making it easier for them to start a conversation. These suggestions are powered by CometChat's AI, which predicts contextually relevant conversation starters.
+When a user initiates a new chat, the UI kit displays a list of suggested opening lines that users can select, making it easier for them to start a conversation. These suggestions are powered by CometChat's AI, which predicts contextually relevant conversation starter options.
-For a comprehensive understanding and guide on implementing and using the Conversation Starters, refer to our specific guide on the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter).
+For a comprehensive understanding and guide on implementing and using the Conversation Starter, refer to our specific guide on the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter).
Once you have successfully activated the [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter) from your CometChat Dashboard, the feature will automatically be incorporated into the [MessageList](/ui-kit/android/message-list) Component of UI Kits.
@@ -40,7 +52,7 @@ The Conversation Summary feature provides concise summaries of long conversation
For a comprehensive understanding and guide on implementing and using the Conversation Summary, refer to our specific guide on the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary).
-Once you have successfully activated the [Smart Replies](/fundamentals/ai-user-copilot/smart-replies) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/android/message-composer) Component of UI Kits.
+Once you have successfully activated the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/android/message-composer) Component of UI Kits.
diff --git a/ui-kit/android/android-conversation.mdx b/ui-kit/android/android-conversation.mdx
index 4bebefe49..d11348004 100644
--- a/ui-kit/android/android-conversation.mdx
+++ b/ui-kit/android/android-conversation.mdx
@@ -1,37 +1,50 @@
---
title: "Building A Conversation List + Message View"
sidebarTitle: "Conversation List + Message View"
+description: "Build a conversation list with a full-screen message view using a sequential navigation pattern."
---
-The **Conversation List + Message View** layout offers a seamless **two-panel chat interface**, commonly used in modern messaging applications like **WhatsApp Web, Slack, and Microsoft Teams**.
+
-### **Key Components**
+Three sections working together:
-1. **Chat Header** – Displays user/group name, profile image, and status.
-2. **Message List** – Shows chat history and new messages.
-3. **Message Composer** – Allows users to send messages, media, and reactions.
+1. **Conversation list** — shows all active conversations (users and groups)
+2. **Message header** — displays user/group name, avatar, and status
+3. **Message list + composer** — chat history with real-time updates and text input
-***
+This implementation uses Android's standard Activity navigation: `ConversationActivity` displays the list, user taps a conversation, `MessageActivity` launches with the selected user/group data via Intent extras.
-## **Step-by-Step Guide**
+---
-### **Step 1: Set Up Conversation Activity**
-Create an Activity - `ConversationActivity.kt` to manage and display the chat UI.
+### Step 1: Set Up Conversation Activity
+Create a new Activity called `ConversationActivity` to display the list of conversations.
-#### **Layout**
-Define the layout using the `CometChatConversations` component:
+#### Layout
+Define the layout using the `CometChatConversations` component in `activity_conversations.xml`:
-```xml activity_conversations.xml
+```xml activity_conversations.xml lines
-### **Key Components**
+Three components stacked vertically:
-1. **Chat Header** – Displays user/group name, profile image, and status.
-2. **Message List** – Shows chat history and new messages.
-3. **Message Composer** – Allows users to send messages, media, and reactions.
+1. **Message header** — displays user/group name, avatar, and status
+2. **Message list** — real-time chat history with scrolling
+3. **Message composer** — text input with media and attachments
-***
+The user or group ID is passed via Intent extras when launching the Activity — ideal for launching from a user profile, support button, or notification.
-## **Step-by-Step Guide**
+---
-### **Step 1: Set Up Message Activity**
-Create an Activity - `MessageActivity.kt` to manage and display the chat UI.
+### Step 1: Set Up Message Activity
+Create an Activity - `MessageActivity` to display the full-screen chat interface.
-#### **Layout**
+#### Layout
-Define the layout using CometChat UI Kit components:
+Define the layout with `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` in `activity_message.xml`:
-```xml activity_message.xml
+```xml activity_message.xml lines
-This layout consists of:
+Three sections working together:
-1. **Sidebar (Conversation List)** – Displays recent conversations with active users and groups.
-2. **Message View** – Shows the selected chat with real-time messages.
-3. **Message Input Box** – Allows users to send messages seamlessly.
+1. **Bottom navigation bar** — switches between Chats, Calls, Users, and Groups
+2. **Fragment container** — renders the CometChat component for the active tab
+3. **Dynamic content** — each tab loads its respective Fragment with real-time data
-***
+This uses Android's `BottomNavigationView` pattern: `TabbedActivity` hosts the navigation and fragment container, user taps a tab, the corresponding Fragment loads.
-## **Step-by-Step Guide**
-
-### **Step 1: Create a Tab Component**
+---
-To manage navigation, let's build a **`CometChatTabs`** component. This component will render different tabs and allow switching between sections dynamically.
+### Step 1: Set Up Tabbed Activity
+Create a new Activity called `TabbedActivity` with **BottomNavigationView** to manage tab navigation.
-#### **Folder Structure**
+#### Project Structure
-Create a `TabbedActivity` inside your `src` directory and add the following files:
+Create the following files in your Android project:
-```txt
+```txt lines
src/main/java/your-package-name/
-├── TabbedActivity.kt
-├── ChatsFragment.kt
-├── CallLogsFragment.kt
-├── UsersFragment.kt
-├── GroupsFragment.kt
+├── TabbedActivity.kt (or .java)
+├── ChatsFragment.kt (or .java)
+├── CallLogsFragment.kt (or .java)
+├── UsersFragment.kt (or .java)
+└── GroupsFragment.kt (or .java)
src/main/java/your-package-name/
├── res/
@@ -51,16 +65,19 @@ src/main/java/your-package-name/
│ └── bottom_nav_menu.xml
```
-#### **Download the Icons**
+#### Vector Drawable Icons
+
+Download the navigation icons from the **CometChat UI Kit repository**:
-These icons are available in the **CometChat UI Kit res folder**. You can find them at:\
-🔗 [GitHub Assets Folder](https://github.com/cometchat/cometchat-uikit-android/tree/v5/sample-app-java/src/main/res/drawable)
+🔗 [GitHub Drawable Resources](https://github.com/cometchat/cometchat-uikit-android/tree/v5/sample-app-java/src/main/res/drawable)
-#### **Implementation**
+Place the icon files (`ic_chats.xml`, `ic_calls.xml`, `ic_user.xml`, `ic_group.xml`) in your `res/drawable/` directory.
+
+#### Implementation
-
-
-You can create an `custom_title_view.xml` as a custom layout file. Which we will inflate in `setTitleView()`
-
-```html
-
-
+
+
+### `setTitleView`
+
+Replace the name / title text.
+
+
+
-You can create an `item_converation_list.xml` as a custom layout file. Which we will inflate in `setListItemView()`
+Create an `item_converation_list.xml` custom layout file:
-```html
+```html lines
+
+
+
+
-This method enables developers to define and apply text formatters that dynamically modify or transform message content before rendering it in the UI. Text formatters can be used for purposes such as:
+
-```xml themes.xml
+```xml themes.xml lines
- @Override
- public void bindView(Context context, View createdView, Conversation conversation, RecyclerView.ViewHolder holder, List
@@ -91,7 +100,7 @@ CometChat's User Presence feature allows users to see whether their contacts are
| ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) is a Component that renders Conversations item List, Conversations item also shows user presence information. |
| [Message Header](/ui-kit/android/message-header) | [Message Header](/ui-kit/android/message-header) that renders details of User or Groups in ToolBar. The MessageHeader also handles user Presence information. |
-| [Users](/ui-kit/android/users) | [Users](/ui-kit/android/users) renders list of users available in your app.It also responsible to render users Presence information. |
+| [Users](/ui-kit/android/users) | [Users](/ui-kit/android/users) renders a list of users available in your app. It is also responsible for rendering user presence information. |
| [Group Members](/ui-kit/android/group-members) | [Group Members](/ui-kit/android/group-members) renders list of users available in the group. The Group Members component also handles user Presence information. |
## Reactions
@@ -117,12 +126,26 @@ Mentions is a robust feature provided by CometChat that enhances the interactivi
| Components | Functionality |
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) component provides an enhanced user experience by integrating the Mentions feature. This means that from the conversation list itself, users can see where they or someone else have been specifically mentioned. |
-| [MessageComposer](/ui-kit/android/message-composer) | [MessageComposer](/ui-kit/android/message-composer)is a component that allows users to craft and send various types of messages, including the usage of the Mentions feature for direct addressing within the conversation. |
+| [MessageComposer](/ui-kit/android/message-composer) | [MessageComposer](/ui-kit/android/message-composer) is a component that allows users to craft and send various types of messages, including the usage of the Mentions feature for direct addressing within the conversation. |
| [MessageList](/ui-kit/android/message-list) | [MessageList](/ui-kit/android/message-list) is a component that displays a list of sent and received messages. It also supports the rendering of Mentions, enhancing the readability and interactivity of conversations. |
-## Quoted Reply
+## Threaded Conversations
-Quoted Reply is a robust feature provided by CometChat that enables users to quickly reply to specific messages by selecting the "Reply" option from a message's action menu. This enhances context, keeps conversations organized, and improves overall chat experience in both 1-1 and group chats.
+The Threaded Conversations feature enables users to respond directly to a specific message in a chat. This keeps conversations organized and enhances the user experience by maintaining context, especially in group chats.
+
+
+
+
+
+| Components | Functionality |
+| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Threaded Header](/ui-kit/android/threaded-messages-header) | [Threaded Header](/ui-kit/android/threaded-messages-header) that displays all replies made to a particular message in a conversation. |
+| [MessageComposer](/ui-kit/android/message-composer) | [MessageComposer](/ui-kit/android/message-composer) is a component that allows users to craft and send various types of messages, including the usage of the Mentions feature for direct addressing within the conversation. |
+| [MessageList](/ui-kit/android/message-list) | [MessageList](/ui-kit/android/message-list) is a component that displays a list of sent and received messages. It also supports the rendering of Mentions, enhancing the readability and interactivity of conversations. |
+
+## Quoted Replies
+
+Quoted Replies are a robust feature provided by CometChat that enables users to quickly reply to specific messages by selecting the "Reply" option from a message's action menu. This enhances context, keeps conversations organized, and improves overall chat experience in both 1-1 and group chats.
@@ -133,20 +156,15 @@ Quoted Reply is a robust feature provided by CometChat that enables users to qui
| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) supports replying to messages via the "Reply" option. Users can select "Reply" on a message to open the composer with the quoted reply pre-filled, maintaining context. |
| [Message Composer](/ui-kit/android/message-composer) | [Message Composer](/ui-kit/android/message-composer) works seamlessly with Quoted Message by showing the quoted reply above the input field, letting users compose their response in proper context. |
-## Conversation and Advanced Search
+## Group Chats
-Conversation and Advanced Search is a powerful feature provided by CometChat that enables users to quickly find conversations, messages, and media across chats in real time. It supports filters, scopes, and custom actions, allowing users to locate content efficiently while keeping the chat experience smooth and intuitive.
+CometChat facilitates Group Chats, allowing users to have conversations with multiple participants simultaneously. This feature is crucial for team collaborations, group discussions, social communities, and more.
-
+
-| Components | Functionality |
-| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Search](/ui-kit/android/search) | [Search](/ui-kit/android/search) allows users to search across conversations and messages in real time. Users can click on a result to open the conversation or jump directly to a specific message. |
-| [Message Header](/ui-kit/android/message-header) | [Message Header](/ui-kit/android/message-header) shows the search button in the chat header, allowing users to search within a conversation. |
-| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) shows the selected message when clicked from search results and highlights it in the message list. |
-| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) displays the search input. |
+For a comprehensive understanding and guide on implementing and using the Groups feature in CometChat, you should refer to our detailed guide on [Groups](/ui-kit/android/groups).
## Moderation
@@ -182,26 +200,36 @@ Learn more about how flagged messages are handled, reviewed, and moderated in th
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) provides the "Report Message" option in the message actions menu, allowing users to initiate the reporting process for inappropriate messages. |
-## Threaded Conversations
+## Conversation and Advanced Search
-The Threaded Conversations feature enables users to respond directly to a specific message in a chat. This keeps conversations organized and enhances the user experience by maintaining context, especially in group chats.
+Conversation and Advanced Search is a powerful feature provided by CometChat that enables users to quickly find conversations, messages, and media across chats in real time. It supports filters, scopes, and custom actions, allowing users to locate content efficiently while keeping the chat experience smooth and intuitive.
-
+
-| Components | Functionality |
-| ---------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Threaded Header](/ui-kit/android/threaded-messages-header) | [Threaded Header](/ui-kit/android/threaded-messages-header) that displays all replies made to a particular message in a conversation. |
-| [MessageComposer](/ui-kit/android/message-composer) | [MessageComposer](/ui-kit/android/message-composer)is a component that allows users to craft and send various types of messages, including the usage of the Mentions feature for direct addressing within the conversation. |
-| [MessageList](/ui-kit/android/message-list) | [MessageList](/ui-kit/android/message-list) is a component that displays a list of sent and received messages. It also supports the rendering of Mentions, enhancing the readability and interactivity of conversations. |
-
-## Group Chat
-
-CometChat facilitates Group Chats, allowing users to have conversations with multiple participants simultaneously. This feature is crucial for team collaborations, group discussions, social communities, and more.
+| Components | Functionality |
+| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Search](/ui-kit/android/search) | [Search](/ui-kit/android/search) allows users to search across conversations and messages in real time. Users can click on a result to open the conversation or jump directly to a specific message. |
+| [Message Header](/ui-kit/android/message-header) | [Message Header](/ui-kit/android/message-header) shows the search button in the chat header, allowing users to search within a conversation. |
+| [Message List](/ui-kit/android/message-list) | [Message List](/ui-kit/android/message-list) shows the selected message when clicked from search results and highlights it in the message list. |
+| [Conversations](/ui-kit/android/conversations) | [Conversations](/ui-kit/android/conversations) displays the search input. |
-
-
-
+---
-For a comprehensive understanding and guide on implementing and using the Groups feature in CometChat, you should refer to our detailed guide on [Groups](/ui-kit/android/groups).
+## Next Steps
+
+
-### Profanity Filter
-
-The Profanity Filter extension helps in maintaining the chat decorum by censoring obscene and inappropriate words in the messages. For a comprehensive understanding and guide on implementing and using the Profanity Filter Extension, refer to our specific guide on the [Legacy Extensions](/moderation/legacy-extensions).
-
-Once you have successfully activated the Profanity Filter Extension from your CometChat Dashboard, the feature will automatically be incorporated into the Message Bubble of [MessageList Component](/ui-kit/android/message-list) component of UI Kits.
-
### Thumbnail Generation
The Thumbnail Generation extension automatically creates a smaller preview image whenever a larger image is shared, helping to reduce the upload/download time and bandwidth usage. For a comprehensive understanding and guide on implementing and using the Thumbnail Generation Extension, refer to our specific guide on the [Thumbnail Generation Extension](/fundamentals/thumbnail-generation).
@@ -91,3 +97,9 @@ Once you have successfully activated the [Thumbnail Generation Extension](/funda
---------
-
-***
-
-## **Prerequisites**
-
-Before installing the **CometChat UI Kit for Android**, you must first **create a CometChat application** via the **[CometChat Dashboard](https://app.cometchat.com/)**. The dashboard provides all the essential chat service components, including:
-
-* **User Management**
-* **Group Chat & Messaging**
-* **Voice & Video Calling**
-* **Real-time Notifications**
-
-
-**Use When:**
-
-* You need **mobile-friendly navigation** between multiple chats.
-* Your app supports **both 1:1 and group messaging**.
-* You want a **clean switch between list and message view** without sidebars.
-
-[Integrate Conversation List + Message View](./android-conversation)
-
-***
-
-### **2️⃣ One-to-One / Group Chat**
+
-**Use When:**
-
-* Your flow starts with **a specific contact or ticket** (e.g., customer support).
-* You want a **no-frills, clean chat screen**.
-* Perfect for **helpdesks, dating apps, or onboarding flows**.
-
-[Integrate One-to-One / Group Chat](./android-one-to-one-chat)
-
-***
-
-### **3️⃣ Tab-Based Messaging UI (All-in-One)**
+
-**Use When:**
-
-* You want a **multi-functional chat app** in one interface.
-* Your users need to **navigate easily between modules**.
-* Ideal for **support, enterprise, or social apps**.
-
-[Integrate Tab-Based Chat](./android-tab-based-chat)
-
-***
+
-
+`CometChatGroupMembers` is a list component. It renders all members of a specific group and emits the selected `GroupMember` via `setOnItemClick`. It requires a `Group` object set via `setGroup()` before it can load data. Wire it to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` to build a group messaging layout.
+
+
+
-
-
-
-```xml themes.xml
-
+
+
-| Methods | Description | Code |
-| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
-| setGroup | Sets the group whose members need to be fetched. This is a required property for the component to function properly. | `.setGroup(group);` |
-| setBackIconVisibility | Used to toggle visibility for back button in the app bar | `.setBackIconVisibility(View.VISIBLE);` |
-| setToolbarVisibility | Used to toggle visibility for back button in the app bar | `.setToolbarVisibility(View.GONE);` |
-| setErrorStateVisibility | Used to hide error state on fetching Users | `.setErrorStateVisibility(View.GONE);` |
-| setEmptyStateVisibility | Used to hide empty state on fetching Users | `.setEmptyStateVisibility(View.GONE);` |
-| setLoadingStateVisibility | Used to hide loading state while fetching Users | `.setLoadingStateVisibility(View.GONE);` |
-| setSeparatorVisibility | Used to control visibility of Separators in the list view | `.setSeparatorVisibility(View.GONE);` |
-| setUsersStatusVisibility | Used to control visibility of status indicator shown if user is online | `.setUsersStatusVisibility(View.GONE);` |
-| setSelectionMode | This method determines the selection mode for members, enabling users to select either a single or multiple members at once. | `.setSelectionMode(UIKitConstants.SelectionMode.MULTIPLE);` |
-| setSearchkeyword | Used for fetching members matching the passed keywords | `.setSearchkeyword("anything");` |
-| setSearchBoxVisibility | Used to hide search box shown in the tool bar | `.setSearchBoxVisibility(View.GONE);` |
+Create a custom layout file named `custom_title_view.xml`:
-***
-
-### Advanced
-
-For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your own views, layouts, and UI elements and then incorporate those into the component.
-
-The `Group Memebers` component does not provide additional functionalities beyond this level of customization.
-
-***
-
-#### setOptions
-
-Defines a set of available actions that users can perform when they interact with a group member item.
+```xml custom_title_view.xml lines
+
+
+
-Configures a view to be displayed when no group members are found.
+Create a custom layout file named `custom_title_view.xml`:
-Use Cases:
+```xml custom_title_view.xml lines
+
+
-
-
-You can indeed create a custom layout file named `custom_title_view.xml` for more complex or unique list items.
+
+
-
+
-You can indeed create a custom layout file named `custom_title_view.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
+Create a custom layout file named `custom_tail_view.xml`:
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
-
-```xml custom_title_view.xml
+```xml custom_tail_view.xml lines
-You can indeed create a custom layout file named `item_list.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
+Create a custom layout file named `item_list.xml`:
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
-
-```xml item_list.xml
+```xml item_list.xml lines
+
-You can indeed create a custom layout file named `subtitle_layout.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
-
-
+### Hide kick/ban/scope options
-You can indeed create a custom layout file named `tail_view_layout.xml` for more complex or unique list items.
+
+
-
-
+`CometChatGroups` is a list component. It renders all available groups and emits the selected `Group` via `setOnItemClick`. Wire it to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` to build a group messaging layout.
+
+
+
-##### setOnItemClick
+Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the `cometchat-chat-uikit-android` dependency added.
-Function invoked when a Group item is clicked, typically used to open a Group profile or chat screen.
+To add programmatically in an Activity:
-
-
-```html
-
-
-
-```
-
-
-You can indeed create a custom layout file named `custom_leading_avatar_view.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
+Create a `custom_leading_avatar_view.xml` layout:
-```xml custom_leading_avatar_view.xml
+```xml custom_leading_avatar_view.xml lines
-You can indeed create a custom layout file named `custom_title_view.xml` for more complex or unique list items.
+Create a `custom_group_title_view.xml` layout:
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
-
-```xml custom_title_view.xml
+```xml custom_group_title_view.xml lines
+
-You can indeed create a custom layout file named `custom_tail_view.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
+Create a `custom_tail_view.xml` layout:
-```xml custom_tail_view.xml
+```xml custom_tail_view.xml lines
-You can indeed create a custom layout file named `item_list.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
-
-```xml custom_group_list_itemd.xml
+Create a `custom_group_list_item.xml` layout:
+```xml custom_group_list_item.xml lines
-
-
-You can indeed create a custom layout file named `subtitle_layout.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `GroupsViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the Group object:
+Append to the long-press context menu without removing defaults.
-You need to create a `overflow_menu_layout.xml` as a custom view file. Which we will inflate and pass to `.setOverflowMenu()`.
+Create an `overflow_menu_layout.xml` layout:
-```xml overflow_menu_layout.xml
+```xml overflow_menu_layout.xml lines
+
+
+```xml themes.xml lines
+
+
```
+
-
+`CometChatIncomingCall` is a call-handling component. It renders when the logged-in user receives an incoming voice or video call, displaying the caller's information and providing accept/reject controls. Wire it to `CometChatOngoingCallActivity` after the user accepts the call.
-***
+
+
-##### Activity and Fragment
+Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the `cometchat-chat-uikit-android` dependency added.
-You can integrate `CometChatIncomingCall` into your Activity and Fragment by adding the following code snippets into the respective classes.
+In your Activity, get a reference and set the `Call` object:
-
+ override fun ccCallEnded(call: Call?) {
+ super.ccCallEnded(call)
+ }
+})
+```
-```xml themes.xml
-
+Remove Listener
-
```
+CometChatCallEvents.removeListener("LISTENER_TAG")
+```
+
-```xml leading_view.xml
+```xml leading_view.xml lines
-```xml custom_title_view.xml
+```xml custom_title_view.xml lines
-trailing\_view\.xml
-
-```xml trailing_view.xml
+```xml trailing_view.xml lines
+
+
+```xml themes.xml lines
+
+
+
+```
+
+
-In CometChat UIKit, a string resource is defined as:
-
-```xml strings.xml
+```xml strings.xml lines
-
+Use `setTextFormatters()` on [CometChatMessageComposer](/ui-kit/android/message-composer), [CometChatMessageList](/ui-kit/android/message-list), or [CometChatConversations](/ui-kit/android/conversations).
+
+
-```xml themes.xml
-
+```xml themes.xml lines
-```
-```html
-
+
+
+
+
```
-**Customizing Outgoing Message Bubble**
+Customizing Incoming Message Bubble
-
+
-```html
-
-
-```
+Customizing Outgoing Message Bubble
-```html
-
-
-```
+
+
+
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_message_bubble.xml).
+**Attribute references:**
+- [Message bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_message_bubble.xml)
-### Text Bubble
-Text bubbles display plain text messages. These are the most common bubble type in a chat interface.
+## Core Message Bubbles
+
+The following sections define how to style specific types of messages. Define the custom style, then link it to the central hubs (`CustomIncomingMessageBubbleStyle` or `CustomOutgoingMessageBubbleStyle`) established above.
-**Default**
+### Text Bubble
+Text bubbles display plain text messages. These are the most common bubble type.
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```xml themes.xml
-
+```xml themes.xml lines
+
+
-```
-
-```xml themes.xml
-
-
-```
-
-**Customizing Outgoing Bubble**
-```html
-
-
+
```
+**Attribute reference:**
+- [Text bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_text_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_text_bubble.xml).
### Link Preview Bubble
+Displays a preview of links shared in messages, enriching the experience with titles, descriptions, and images.
-The Link Preview Bubble is designed to display a preview of links shared in messages. It enriches the messaging experience by showing details such as the page title, description, and an image from the linked content, making links more engaging and informative.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
-
-```
-
-```html
-
-
-```
-
-**Customizing Outgoing Bubble**
-
-```html
-
-
-
-
-```
-
-```html
-
-
```
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_text_bubble.xml).
### Image Bubble
-
Image bubbles display images shared within a conversation.
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
@@ -221,19 +189,8 @@ Image bubbles display images shared within a conversation.
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
@@ -242,32 +199,20 @@ Image bubbles display images shared within a conversation.
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Video bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_video_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_video_bubble.xml).
### Audio Bubble
-
Audio bubbles represent audio messages or voice recordings.
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Audio bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_audio_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_audio_bubble.xml).
### File Bubble
+Displays shared files, such as documents, PDFs, or spreadsheets.
-File bubbles are used to display shared files, such as documents, PDFs, or spreadsheets.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
@@ -420,36 +306,23 @@ File bubbles are used to display shared files, such as documents, PDFs, or sprea
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
@@ -457,19 +330,8 @@ Sticker bubbles display stickers shared in a conversation, enhancing visual expr
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
@@ -478,36 +340,23 @@ Sticker bubbles display stickers shared in a conversation, enhancing visual expr
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
@@ -515,19 +364,8 @@ Poll bubbles represent polls shared within the chat, showing options and results
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Poll bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_poll_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_poll_bubble.xml).
### Collaborative Bubble
+Displays collaborative content, such as shared documents or tasks.
-Collaborative bubbles display collaborative content, such as shared documents or tasks.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
@@ -574,19 +399,8 @@ Collaborative bubbles display collaborative content, such as shared documents or
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Collaborative bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_collaborative_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_collaborative_bubble.xml).
### Meet Call Bubble
+Displays call-related actions and statuses in the chat interface.
-Meet call bubbles display call-related actions and statuses in the chat interface.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Meet call bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_meet_call_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_meet_call_bubble.xml).
### Delete Bubble
+Indicates a message that has been removed by the sender.
-Delete bubbles are used to display messages that have been deleted by the sender. These indicate the message removal within the chat interface.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Incoming Bubble**
-
-```html
-
+```xml themes.xml lines
+
@@ -694,57 +471,37 @@ Delete bubbles are used to display messages that have been deleted by the sender
-```
-
-```html
-
-
-```
-**Customizing Outgoing Bubble**
-
-```html
-
+
```
+**Attribute reference:**
+- [Delete bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_delete_bubble.xml)
-```html
-
-
-```
-
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_delete_bubble.xml).
-### Call Action Bubble
+## List-Level Bubbles & Special Features
-Call action bubbles display call-related actions, such as missed calls, in the chat interface.
+Unlike standard messages, **Call Action** and **Action** bubbles are tied to the **Message List Style**, not the Incoming/Outgoing Hubs. AI Assistants and Quoted Replies have specialized formatting.
-**Default**
+### Call Action Bubble
+Displays call actions like missed calls within the message list.
+**Default & Customization**
-
-**Customization**
-
-**Customizing Bubble**
-
-```html
-
+```xml themes.xml lines
+
+
-```
-```html
-
+
```
+**Attribute references:**
+- [Call action bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_call_action_bubble.xml)
+- [Message list attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_message_list.xml)
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_call_action_bubble.xml).
### Action Bubble
+Displays global group actions (e.g., "User joined the chat").
-Action bubbles provide a customizable interface for displaying a variety of actions, such as group actions, within a chat.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Bubble**
-
-```html
-
+```xml themes.xml lines
+
+
-```
-```html
-
+
```
+**Attribute reference:**
+- [Action bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_action_bubble.xml)
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_action_bubble.xml).
### AI Assistant Bubble
+Styles interactions generated by the AI assistant. These are anchored to the `IncomingMessageBubbleStyle`.
-AI Assistant bubbles display messages and interactions from an AI assistant within the chat interface.
-
-**Default**
-
+**Default & Customization**
-
-**Customization**
-
-**Customizing Bubble**
-
-```html
-
-
-
-
-
-
+```xml themes.xml lines
+
+
-
-```
+
+
-```html
-
-
```
+**Attribute reference:**
+- [AI assistant bubble attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/att_cometchat_ai_assistant_bubble.xml)
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_action_bubble.xml).
### Quoted Reply
+Styles the preview block when a user replies to a specific message.
-```xml themes.xml
-
-
-
-
-
-
-
-
-
-
-
-```
+```xml themes.xml lines
+
+
-```xml themes.xml
-
-```
-To know more such attributes, visit the [attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_message_preview.xml).
\ No newline at end of file
+
+
+
+
+
+
+
+
+```
+**Attribute reference:**
+- [Message preview attributes](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_message_preview.xml)
+
+## Customization matrix
+
+| What you want to change | Where | Property/API | Example |
+| --- | --- | --- | --- |
+| Incoming bubble background | `res/values/themes.xml` | `cometchatMessageBubbleBackgroundColor` in `CometChatIncomingMessageBubbleStyle` | `
-
+
+
-The MessageComposer is responsible for managing runtime permissions. To ensure the **ActivityResultLauncher** is properly initialized, its object should be created in the the **onCreate** state of an activity. To ensure that the composer is loaded within the fragment, it is important to make sure that the fragment is loaded in the `onCreate` state of the activity.
+Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the `cometchat-chat-uikit-android` dependency added.
+
+
+
+Create a `custom_header_layout.xml` layout:
+
+```xml custom_header_layout.xml lines
+
+
+
-```html
-
+First, create a custom send button drawable:
+
+```xml drawable/custom_send_button.xml lines
+
+
+
+
+
+
-```xml themes.xml
-
+```xml themes.xml lines
+```
+
-
+`CometChatMessageHeader` is a header bar component. It sits at the top of a chat screen and displays the avatar, name, and status of the user or group in the conversation. Wire it alongside `CometChatMessageList` and `CometChatMessageComposer` to build a complete messaging layout.
-***
+
+
-This action doesn't change the behavior of the component but rather listens for any errors that occur in the Users component.
+Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the `cometchat-chat-uikit-android` dependency added.
-
-
+## Custom View Slots
-```xml themes.xml
-
+Each slot replaces a section of the default header UI. Slots accept a `Function3
-
+Sets a custom style for the overflow popup menu.
+
+
+```xml themes.xml lines
+
+
+
+```
+
+
+
-#### setLoadingView
+```xml custom_footer_layout.xml lines
-Customizes the loading indicator when messages are being fetched.
+
+
-```xml themes.xml
+```xml themes.xml lines
-
+
+```
+
+> **What this does:** Defines custom mention styles for incoming and outgoing message bubbles. Incoming mentions appear in pink (`#D6409F`) and outgoing mentions appear in white (`#FFFFFF`), both with green self-mentions (`#30A46C`).
+
+
-
+cometchatMessageList.setDateTimeFormatter(new DateTimeFormatterCallback() {
-```html custom_header_layout.xml
+ private final SimpleDateFormat fullTimeFormatter = new SimpleDateFormat("hh:mm a", Locale.getDefault());
+ private final SimpleDateFormat dateFormatter = new SimpleDateFormat("dd MMM yyyy", Locale.getDefault());
-
-
-
+Replaces the entire message list with a new list.
-```xml custom_footer_layout.xml
+
+
+
+```xml themes.xml lines
+
+
+
+```
+
+> **What this does:** Defines two custom styles: `CustomOutgoingMessageBubbleStyle` sets the outgoing message bubble background to orange (`#F76808`); `CustomCometChatMessageListStyle` sets the message list background to light peach (`#FEEDE1`) and applies the custom outgoing bubble style.
+
+
-
-
-The MessageBubble structure can typically be broken down into the following views:
-
-1. **Leading view**: This is where the sender's avatar is displayed. It's typically on the left of the MessageBubble for messages from others and on the right for messages from the current user.
-
-2. **Header view**: This displays the sender's name and is especially useful in group chats where multiple users are sending messages.
-
-3. **Content view**: This is the core of the MessageBubble where the message content (text, images, videos, etc.) is displayed.
-
-4. **Bottom view**: This view can be used to extend the MessageBubble with additional elements, such as link previews or a 'load more' button for long messages. It's typically placed beneath the Content view.
-
-5. **Footer view**: This is where the timestamp of the message and its delivery or read status are displayed. It's located at the bottom of the MessageBubble.
-
-### Properties
-
-MessageTemplate provides you with methods that allow you to alter various properties of the MessageBubble. These properties include aspects such as the `type` and `category` of a message, the appearance and behavior of the header, content, and footer sections of the message bubble,
-
-1. **Type**
-
- Using `setType()` you can set the type of CometChatMessage, This will map your MessageTemplate to the corresponding CometChatMessage. You can set the MessageTemplate Type using the following code snippet.
-
- ```swift
- messageTemplate.setType(UIKitConstants.MessageType.CUSTOM);
- ```
-
-2. **Category**
-
- Using `.setCategory()` you can set the category of a MessageTemplate. This will create a MessageTemplate with the specified category and link it with a CometChatMessage of the same category.
-
- Please refer to our guide on [Message Categories](/sdk/android/message-structure-and-hierarchy) for a deeper understanding of message categories.
-
- ```swift
- messageTemplate.setCategory(UIKitConstants.MessageCategory.CUSTOM);
- ```
-
-3. **Header View**
-
- The .`setHeaderView()` method allows you to assign a custom header view to the MessageBubble. By default, it is configured to display the sender's name.
-
-```typescript
-messageTemplate.setHeaderView(new MessagesViewHolderListener() {
- @Override
- public View createView(Context context, CometChatMessageBubble messageBubble, UIKitConstants.MessageBubbleAlignment alignment) {
- return null;
- }
-
- @Override
- public void bindView(Context context,
- View createdView,
- BaseMessage message,
- UIKitConstants.MessageBubbleAlignment alignment,
- RecyclerView.ViewHolder holder,
- List
+
+
+The `MessageBubble` structure is broken down into these views:
+
+1. **Leading view**: Displays the sender's avatar. It appears on the left of the `MessageBubble` for messages from others and on the right for messages from the current user.
+
+2. **Header view**: Displays the sender's name. This is useful in group chats where multiple users are sending messages.
+
+3. **Content view**: The core of the `MessageBubble` where the message content (text, images, videos, etc.) is displayed.
+
+4. **Bottom view**: Extends the `MessageBubble` with additional elements, such as link previews or a "load more" button for long messages. It is placed beneath the Content view.
+
+5. **Footer view**: Displays the timestamp of the message and its delivery or read status. It is located at the bottom of the `MessageBubble`.
+
+### Template Properties
+
+`MessageTemplate` provides methods that allow you to alter various properties of the `MessageBubble`, including the `type` and `category` of a message, and the appearance and behavior of the header, content, and footer sections.
+
+**Type**: Use `setType()` to set the type of `CometChatMessage`. This maps your `MessageTemplate` to the corresponding `CometChatMessage`.
+
+```java
+messageTemplate.setType(UIKitConstants.MessageType.CUSTOM);
```
-
-```xml message_template_header_view.xml
+**XML Layout:**
+
+```xml message_template_header_view.xml lines
-```xml image_bubble_content_view.xml
+**XML Layout:**
+
+```xml image_bubble_content_view.xml lines
-```xml status_info_layout.xml
+**XML Layout:**
+
+```xml status_info_layout.xml lines
-```xml message_template_bottom_view.xml
+**XML Layout:**
+
+```xml message_template_bottom_view.xml lines
-```html
+**XML Layout:**
+
+```html lines
+**XML Layouts:**
+
drawable/left\_bubble\_bg
-```html
+```html lines
+**Code:**
+
-First, let's see how to send a custom message:
+**Sending a custom message:**
-
-
-***
-
-## Usage
-
-### Integration
-
-`CometChatOutgoingCall` being a custom component, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
-
-Since `CometChatOutgoingCall` can be launched by adding the following code snippet into the XML layout file.
-
-
+
- setContentView(cometchatOutgoingCall);
-}
-```
+Prerequisites: CometChat SDK initialized with `CometChatUIKit.init()`, a user logged in, and the `cometchat-chat-uikit-android` dependency added.
-
-
-
-```xml themes.xml
-
-
-```
-
-
-```xml custom_title_view.xml
+Create a `custom_title_view.xml` layout:
+
+```xml custom_title_view.xml lines
-```html custom_subtitle_view.xml
+Create a `custom_subtitle_view.xml` layout:
+
+```xml custom_subtitle_view.xml lines
-```xml end_call_button.xml
+Create an `end_call_button.xml` layout:
+
+```xml end_call_button.xml lines
+
+
+```xml themes.xml lines
+
+
+```
+
+
-***
+---
-## **Download the CometChat Demo App**
+## Try It
-Get started with the **CometChat UI Kit** on your mobile device:
+
](https://link.cometchat.com/android-demo-app)
-**Or Scan the QR Code**
+Or scan the QR code to install directly:
-> **Tip:** On Android, you can use Google Lens or any QR code scanning app to install directly.
-
-***
-
-## **Getting Started**
-
-Before integrating the CometChat UI Kit, familiarize yourself with the key concepts and features offered by CometChat’s platform.
-
-* Review the [Key Concepts](/fundamentals/key-concepts) to understand essential terminology and features.
-* Follow the [Getting Started Guide](/ui-kit/android/getting-started) for detailed steps on initial setup and integration.
-
-***
-
-## **Integration and Customization**
-
-The CometChat UI Kit comprises modular Android Views that can be integrated effortlessly into your app, offering flexible customization:
-
-* **Prebuilt UI Components:** Ready-to-use UI elements.
-* **Modular Structure:** Easy to integrate and modify.
-* **Customization Options:** Highly configurable to fit your brand and UI requirements.
-
-Explore more about UI customization in the [Customization Guide](/ui-kit/android/theme-introduction).
-
-***
-
-## **Helpful Resources**
-
-Explore these essential resources to gain a deeper understanding of **CometChat UI Kits** and streamline your integration process.
-
-
-
+`CometChatSearch` is a composite search component. It searches across conversations and messages in real time and emits the selected result via `setOnConversationClicked` or `setOnMessageClicked`. Wire it to navigation so tapping a conversation opens the message view, or tapping a message scrolls to it in context.
-***
+
+
-
+
-```xml themes.xml
-
+
-
+#### `setTextFormatters`
-Bellow is the list of message item view functions available for customization:
+Enables developers to define and apply text formatters that dynamically modify or transform message content before rendering it in the UI. Text formatters can be used for:
-| Function | Message Type |
-| -------------------------------- | ---------------------|
-| **setTextMessageItemView** | Text Message |
-| **setImageMessageItemView** | Image Message |
-| **setVideoMessageItemView** | Video Message |
-| **setAudioMessageItemView** | Audio Message |
-| **setDocumentMessageItemView** | Document Message |
-| **setLinkMessageItemView** | Link Message |
+* Automatically converting URLs into clickable links
+* Applying Markdown or rich text styling
+* Replacing certain words or patterns with emojis or predefined text
+* Censoring specific words for moderation
-#### DateTime Formatters
+For implementation details, refer to the [MentionsFormatter Guide](/ui-kit/android/mentions-formatter-guide).
-#### setDateTimeFormatter
+### Date/Time Formatting
-By providing a custom implementation of the DateTimeFormatterCallback, you can configure how time and date values are displayed. This ensures consistent formatting for labels such as "Today", "Yesterday", "X minutes ago", and more.
+#### `setDateTimeFormatter`
-Each method in the interface corresponds to a specific case:
+Provides a custom implementation of `DateTimeFormatterCallback` to configure how time and date values are displayed in search results.
-`time(long timestamp)` → Custom full timestamp format
+
+
- override fun lastWeek(timestamp: Long): String {
- return "Last Week"
- }
+```xml themes.xml lines
+
-#### Text Formatters
+
+```
-#### setTextFormatters
+> **What this does:** Defines a custom search style that sets a light purple background color (`#EDEAFA`) for the search component, conversation items, and message items, and applies a Times New Roman font to all text elements including filter chips, section headers, conversation titles/subtitles, message titles/subtitles, timestamps, "see more" text, and the search bar.
-This method enables developers to define and apply text formatters that dynamically modify or transform message content before rendering it in the UI. Text formatters can be used for purposes such as:
+
+
-
-
+---
+
+## Next Steps
+
+
+
+
+### Apply a theme to a specific activity
+What you're changing: The theme for a single activity.
+
+- **Where to change it**: `AndroidManifest.xml`.
+
+- **Applies to**: Only the targeted activity.
+
+- **Default behavior**: Activities inherit the application theme.
+
+- **Override**: Set `android:theme` on the `
-
+- **What this does**: Applies `ChatTheme` only to `ChatActivity`.
-## Customization
+- **Verify**: Open `ChatActivity` and confirm the theme differs from the rest of the app.
-To customize the primary color in your app, you can override the cometchatPrimaryColor attribute in your theme. Here's how:
+### Change the primary color
+What you're changing: The primary brand color used across UI Kit.
-```html
-
-
```
-To know more such attributes, visit the [theme attributes file](https://github.com/cometchat/cometchat-uikit-android/blob/v5/chatuikit/src/main/res/values/attr_cometchat_theme.xml).
+- **What this does**: Replaces the UI Kit primary color with your brand color.
+
+- **Verify**: Buttons and highlights use the new color.
+
+### Customize common theme attributes
+What you're changing: Background, text, and stroke colors.
+
+- **Where to change it**: `app/src/main/res/values/themes.xml`.
+
+- **Applies to**: All UI Kit components that use these attributes.
+
+- **Default behavior**: UI Kit uses its default theme values.
+
+- **Override**: Define the attributes in your app theme.
+
+- **Code**:
+
+```xml themes.xml lines
+
+```
+
+- **What this does**: Updates common UI Kit colors in one place.
+
+- **Verify**: Backgrounds, text, and dividers reflect the new values.
+
+### Add dark mode overrides
+What you're changing: Theme values used in dark mode.
+
+- **Where to change it**: `app/src/main/res/values-night/themes.xml`.
+
+- **Applies to**: Dark mode only.
+
+- **Default behavior**: Dark mode uses the same values as light mode.
+
+- **Override**: Create `values-night/themes.xml` and override the attributes.
+
+- **Code**:
+
+```xml values-night/themes.xml lines
+
+
+
+```xml themes.xml lines
+
+
+
+
+```
+
+
-You can indeed create a custom layout file named `custom_user_title_view.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `UsersViewHolderListener`. The inflation process prepares the layout for use in your application:
+Create a `custom_user_title_view.xml` layout:
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the User object:
-
-```xml custom_user_title_view.xml
+```xml custom_user_title_view.xml lines
+
-You can indeed create a custom layout file named `custom_user_tail_view.xml` for more complex or unique list items.
-
-Once this layout file is made, you would inflate it inside the `createView()` method of the `UsersViewHolderListener`. The inflation process prepares the layout for use in your application:
+Create a `custom_user_tail_view.xml` layout:
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the User object:
-
-```xml custom_user_tail_view.xml
+```xml custom_user_tail_view.xml lines
-You can indeed create a custom layout file named `custom_list_item_view.xml` for more complex or unique list items.
+Create a `custom_list_item_view.xml` layout:
-Once this layout file is made, you would inflate it inside the `createView()` method of the `UsersViewHolderListener`. The inflation process prepares the layout for use in your application:
-
-Following this, you would use the `bindView()` method to initialize and assign values to your individual views. This could include setting text on TextViews, images on ImageViews, and so on based on the properties of the User object:
-
-```xml custom_list_item_view.xml
+```xml custom_list_item_view.xml lines
+
-You can indeed create a custom layout file named `subtitle_layout.xml` for more complex or unique list items.
+
-
+Returns the list of currently selected `User` objects.
+
+
+```xml themes.xml lines
+
+
```
+
-
+`CometChatAIAssistantChat` is a standalone AI chat panel. It composes an internal message header, message list, and message composer into a self-contained AI conversation experience. It requires a `CometChat.User` representing the AI agent.
-
+
-
+
+
+```tsx lines
+import { useState, useEffect } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
import { CometChatAIAssistantChat } from "@cometchat/chat-uikit-react";
-export function AIAssistantChatDemo() {
- const [agent, setAgent] = React.useState
+
-
+
-
+ return
+
+
+```css lines
.cometchat-ai-assistant-chat
.cometchat-ai-assistant-chat__suggested-message-pill {
- background: #30a46c;
- color: #ffffff;
- text-align: center;
- font-family: "Times New Roman";
- font-size: 9px;
- font-style: normal;
- font-weight: 400;
- line-height: 120%;
+ background: #30a46c;
+ color: #ffffff;
+ font-size: 9px;
}
.cometchat-ai-assistant-chat
.cometchat-ai-assistant-chat__suggested-message-pill
.cometchat-ai-assistant-chat__suggested-message-icon {
- background: #ffffff;
- width: 9.55px;
- height: 9.55px;
+ background: #ffffff;
+ width: 9.55px;
+ height: 9.55px;
}
+
.cometchat-ai-assistant-chat
.cometchat-ai-assistant-chat__header-auxiliary-view
.cometchat-button
.cometchat-button__icon-default {
- background: #30a46c;
+ background: #30a46c;
}
```
-
-
+| Key | Value |
+| --- | --- |
+| Type | `React.JSX.Element` |
+| Default | `undefined` |
-
-
+### headerSubtitleView
-
-
+---
-
-
+
-## Smart Replies
-
-Smart Replies are AI-generated responses to messages. They can predict what a user might want to say next by analyzing the context of the conversation. This allows for quicker and more convenient responses, especially on mobile devices.
+### Smart Replies
-For a comprehensive understanding and guide on implementing and using the Smart Replies, refer to our specific guide on the [Smart Replies](/fundamentals/ai-user-copilot/smart-replies).
+AI-generated response suggestions based on conversation context. See [Smart Replies](/fundamentals/ai-user-copilot/smart-replies).
-Once you have successfully activated the [Smart Replies](/fundamentals/ai-user-copilot/smart-replies) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/react/message-composer) Component of UI Kits.
+Auto-integrates into the Action Sheet of [MessageComposer](/ui-kit/react/message-composer) when activated.
-## Conversation Summary
+### Conversation Summary
-The Conversation Summary feature provides concise summaries of long conversations, allowing users to catch up quickly on missed chats. This feature uses natural language processing to determine the main points in a conversation.
+AI-generated recap of long conversations. See [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary).
-For a comprehensive understanding and guide on implementing and using the Conversation Summary, refer to our specific guide on the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary).
-
-Once you have successfully activated the [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary) from your CometChat Dashboard, the feature will automatically be incorporated into the Action sheet of [MessageComposer](/ui-kit/react/message-composer) Component of UI Kits.
+Auto-integrates into the Action Sheet of [MessageComposer](/ui-kit/react/message-composer) when activated.
+
+## Next Steps
+
+
+
-This layout includes:
-
-1. Sidebar (Conversation List) – Users and groups
-2. Message View – Real-time messages for the selected conversation
-3. Message Composer – Input for sending text and media
-
-***
-
-## Prerequisites
-
-- Astro project set up
-- React integration added to Astro
-- CometChat credentials
-
-
-
-
+This guide walks you through adding CometChat to an Astro app using React islands. By the end you'll have a working chat UI.
-***
+
+
-**Recommended for:**
-
-* Desktop-first applications
-* Apps requiring a **rich user experience** with seamless navigation
-* Platforms supporting both **individual and group messaging**
-* **Mobile-friendly** apps needing a **tap-to-open message view**
+
+
-**Recommended for:**
-
-* **Support chat applications** – Direct user-agent communication.
-* **Apps focusing on direct messaging** – No distractions from other conversations.
-* **Community or group chat applications** – A structured way to interact in groups.
-* **Mobile-first applications** – Designed for compact and dedicated messaging experiences.
+
+
-**Recommended for:**
-
-* **Apps requiring structured navigation** – Clearly separate chat, calls, and settings.
-* **Multi-feature chat apps** – Supporting different functionalities in an organized way.
-* **Mobile-first applications** – Ideal for apps needing tab-based UI for easy access to features.
-* **Support & enterprise chat solutions** – Perfect for help desks, business chat platforms, and customer support apps.
+
+
-**Key Components**
-
-1. Chat Header – recipient details and status
-2. Message View – history and live messages
-3. Message Composer – text, media, attachments
-
-***
-
-## Prerequisites
-
-- Astro project with React integration
-- CometChat credentials in `.env`
-
-
+
-Layout structure:
-
-1. Sidebar – conversations, users, groups, or call logs
-2. Messages – header, list, and composer
-3. Tabs – switch between Chats, Calls, Users, and Groups
-
-***
-
-## Prerequisites
-
-- Astro project with React integration
-- CometChat credentials in `.env`
-
-
-
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatCallButtons` renders voice and video call buttons. Pass a `user` for 1-on-1 calls or a `group` for group calls. Typically embedded in `CometChatMessageHeader`'s auxiliary view or used standalone. The component handles call initiation, renders `CometChatOutgoingCall` internally, and manages the full call lifecycle.
-
+
-
-
+function VoiceOnlyCallButtons() {
+ return
+
-
@@ -28,9 +42,7 @@ After adding this dependency, the React UI Kit will automatically detect it and
### Incoming Call
-The [Incoming Call](/ui-kit/react/incoming-call) component of the CometChat UI Kit provides the functionality that lets users receive real-time audio and video calls in the app.
-
-When a call is made to a user, the Incoming Call component triggers and displays a call screen. This call screen typically displays the caller information and provides the user with options to either accept or reject the incoming call.
+The [Incoming Call](/ui-kit/react/incoming-call) component displays a call screen when a call is received, showing caller info with accept/reject options.
@@ -38,9 +50,7 @@ When a call is made to a user, the Incoming Call component triggers and displays
### Outgoing Call
-The [Outgoing Call](/ui-kit/react/outgoing-call) component of the CometChat UI Kit is designed to manage the outgoing call process within your application. When a user initiates an audio or video call to another user or group, this component displays an outgoing call screen, showcasing information about the recipient and the call status.
-
-Importantly, the Outgoing Call component is smartly designed to transition automatically into the ongoing call screen once the receiver accepts the call. This ensures a smooth flow from initiating the call to engaging in a conversation, without any additional steps required from the user.
+The [Outgoing Call](/ui-kit/react/outgoing-call) component displays an outgoing call screen with recipient info and call status. Transitions to the ongoing call screen when the receiver accepts.
@@ -48,8 +58,25 @@ Importantly, the Outgoing Call component is smartly designed to transition autom
### Call Logs
-[Call Logs](/ui-kit/react/call-logs) component provides you with the records call events such as who called who, the time of the call, and the duration of the call. This information can be fetched from the CometChat server and displayed in a structured format for users to view their past call activities.
+The [Call Logs](/ui-kit/react/call-logs) component displays call history — caller, time, and duration.
+
+## Next Steps
+
+
-
-
-The `Call Logs` is comprised of the following components:
-
-| Components | Description |
-| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
-| CometChatList | A reusable container component having title, search box, customizable background and a list view. |
-| CometChatListItem | A component that renders data obtained from a Group object on a Tile having a title, subtitle, leading and trailing view. |
-| CometChatDate | This component used to show the date and time. You can also customize the appearance of this widget by modifying its logic. |
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatCallLogs` is a standalone list component that renders call history entries. Each entry shows the caller/callee, call type (audio/video), direction (incoming/outgoing/missed), and timestamp. The `onItemClick` callback emits the selected call log, and `onCallButtonClicked` fires when the call-back button is tapped.
-
+
-export default CallLogDemo;
-```
+---
-
-
+Replace the entire call log list item.
-
-
-The customized chat interface is displayed below.
-
-
-
-
-
-Use the following code to achieve the customization shown above.
+Replace the right section (call-back button area).
-
-
-The customized chat interface is displayed below.
-
-
-
-
+### callInitiatedDateTimeFormat
-Use the following code to achieve the customization shown above.
+Customize the call initiated timestamp format using a `CalendarObject`.
-No call history
+
-
+### callInitiatedDateTimeFormat
-The customized chat interface is displayed below.
+Format for displaying the call initiated timestamp.
-
-
-
+| | |
+| --- | --- |
+| Type | `CalendarObject` |
+| Default | Component default (`DD MMM, hh:mm A`) |
-Use the following code to achieve the customization shown above.
+Falls back to [global calendar configuration](/ui-kit/react/localize#customisation) if not set.
-
-
+---
-The customized chat interface is displayed below.
+### leadingView
-
-
-
+Custom renderer for the avatar / left section.
-Use the following code to achieve the customization shown above.
+| | |
+| --- | --- |
+| Type | `(call: any) => JSX.Element` |
+| Default | Built-in avatar |
-
-
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-The customized chat interface is displayed below.
+---
-
-
-
+### subtitleView
-Use the following code to achieve the customization shown above.
+Custom renderer for the subtitle text.
-
-
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatConversations` is a sidebar list component. It renders recent conversations and emits the selected `CometChat.Conversation` via `onItemClick`. Wire it to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` to build a standard two-panel chat layout.
-
+
+
+---
+
+## Minimal Render
-
+
-### Actions
+Root CSS class: `.cometchat-conversations`
-[Actions](/ui-kit/react/components-overview#actions) dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.
+---
-#### 1. OnItemClick
+## Filtering Conversations
-`OnItemClick` is triggered when you click on a ListItem of the Conversations component. The `OnItemClick` action doesn't have a predefined behavior. You can override this action using the following code snippet.
+Pass a `CometChat.ConversationsRequestBuilder` to `conversationsRequestBuilder`. Pass the builder instance — not the result of `.build()`.
-
-
+```tsx lines
+import { CometChatConversations } from "@cometchat/chat-uikit-react";
-
-The customized chat interface is displayed below.
+Customized:
-Use the following code to achieve the customization shown above.
-
-Use the following code to achieve the customization shown above.
-
-
-Use the following code to achieve the customization shown above.
-
+
+
-export default class DialogHelper {
- private dialogContainer: HTMLDivElement | null = null;
+Customized:
- createDialog(onClick: () => void, buttonText: string) {
- this.dialogContainer = document.createElement("div");
- document.body.appendChild(this.dialogContainer);
+
+
+
- ReactDOM.render(
- ,
- this.dialogContainer
- );
- }
+
-Use the following code to achieve the customization shown above.
-
+
-```ruby
-new CalendarObject({
- today: `hh:mm A`, // Example: "10:30 AM"
- yesterday: `[yesterday]`, // Example: "yesterday"
- otherDays: `DD/MM/YYYY`, // Example: "25/05/2025"
-});
-```
+Customized:
-The following example demonstrates how to modify the **Last Message** timestamp format using a custom [`CalendarObject`](/ui-kit/react/localize#calendarobject).
+
+
+
-
+Customize the last message timestamp format using a `CalendarObject`.
-Use the following code to achieve the customization shown above.
+```ts lines
+// CalendarObject interface (from source)
+class CalendarObject {
+ today?: string;
+ yesterday?: string;
+ lastWeek?: string;
+ otherDays?: string;
+ relativeTime?: {
+ minute?: string;
+ minutes?: string;
+ hour?: string;
+ hours?: string;
+ };
+}
+```
-No conversations yet
+ +
-
+Overrides survive component updates because the component never sets inline styles on these elements — all styling flows through CSS classes and custom properties.
+
+### Key Selectors
-The customized chat interface is displayed below.
+| Target | Selector |
+| --- | --- |
+| Root | `.cometchat-conversations` |
+| Header title | `.cometchat-conversations .cometchat-list__header-title` |
+| List item | `.cometchat-conversations .cometchat-list-item` |
+| Body title | `.cometchat-conversations .cometchat-list-item__body-title` |
+| Avatar | `.cometchat-conversations .cometchat-avatar` |
+| Avatar text | `.cometchat-conversations .cometchat-avatar__text` |
+| Unread badge | `.cometchat-conversations .cometchat-badge` |
+| Subtitle text | `.cometchat-conversations .cometchat-conversations__subtitle-text` |
+| Status indicator | `.cometchat-conversations .cometchat-status-indicator` |
+| Read receipts | `.cometchat-conversations .cometchat-receipts-read` |
+| Active item | `.cometchat-conversations__list-item-active .cometchat-list-item` |
+| Typing indicator | `.cometchat-conversations__subtitle-typing` |
+| Trailing view | `.cometchat-conversations__trailing-view` |
+
+### Example: Brand-themed conversations
-
+
-Use the following code to achieve the customization shown above.
+```css lines
+.cometchat-conversations .cometchat-list-item__body-title,
+.cometchat-conversations .cometchat-list__header-title,
+.cometchat-conversations .cometchat-avatar__text,
+.cometchat-conversations .cometchat-badge,
+.cometchat-conversations .cometchat-conversations__subtitle-text {
+ font-family: "SF Pro";
+}
-
-
+### loadingView
-The customized chat interface is displayed below.
+Custom component displayed during the loading state.
-
-
-
+| | |
+| --- | --- |
+| Type | `JSX.Element` |
+| Default | Built-in shimmer |
-Use the following code to achieve the customization shown above.
+---
-
@@ -86,7 +96,7 @@ CometChat's User Presence feature allows users to see whether their contacts are
| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Conversations](/ui-kit/react/conversations) | [Conversations](/ui-kit/react/conversations) is a component that renders conversation list item. Conversations item also shows user presence information. |
| [Message Header](/ui-kit/react/message-header) | [Message Header](/ui-kit/react/message-header) that renders details of user/group. The Message Header also handles user presence information. |
-| [Users](/ui-kit/react/users) | [Users](/ui-kit/react/users) renders list of users available in your app.It also responsible to render users presence information. |
+| [Users](/ui-kit/react/users) | [Users](/ui-kit/react/users) renders the list of available users with presence information. |
| [Group Members](/ui-kit/react/group-members) | [Group Members](/ui-kit/react/group-members) renders list of users available in the group. The Group Members component also handles user presence information. |
## Reactions
@@ -115,45 +125,40 @@ Mentions is a robust feature provided by CometChat that enhances the interactivi
| [Message Composer](/ui-kit/react/message-composer) | [Message Composer](/ui-kit/react/message-composer) is a component that allows users to craft and send various types of messages, including the usage of the mentions feature for direct addressing within the conversation. |
| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) is a component that displays a list of sent and received messages. It also supports the rendering of Mentions, enhancing the readability and interactivity of conversations. |
-## Quoted Reply
+## Threaded Conversations
-Quoted Reply is a robust feature provided by CometChat that enables users to quickly reply to specific messages by selecting the "Reply" option from a message's action menu. This enhances context, keeps conversations organized, and improves overall chat experience in both 1-1 and group chats.
+The Threaded Conversations feature enables users to respond directly to a specific message in a chat. This keeps conversations organized and enhances the user experience by maintaining context, especially in group chats.
-
+
-| Components | Functionality |
-| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) supports replying to messages via the "Reply" option. Users can select "Reply" on a message to open the composer with the quoted reply pre-filled, maintaining context. |
-| [Message Composer](/ui-kit/react/message-composer) | [Message Composer](/ui-kit/react/message-composer) works seamlessly with Quoted Message by showing the quoted reply above the input field, letting users compose their response in proper context. |
+| Components | Functionality |
+| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Threaded Message Preview](/ui-kit/react/threaded-message-preview) | [Threaded Message Preview](/ui-kit/react/threaded-message-preview) component displays the parent message along with the number of replies. |
-## Conversation and Advanced Search
+## Quoted Replies
-Conversation and Advanced Search is a powerful feature provided by CometChat that enables users to quickly find conversations, messages, and media across chats in real time. It supports filters, scopes, and custom actions, allowing users to locate content efficiently while keeping the chat experience smooth and intuitive.
+Quoted Replies is a robust feature provided by CometChat that enables users to quickly reply to specific messages by selecting the "Reply" option from a message's action menu. This enhances context, keeps conversations organized, and improves overall chat experience in both 1-1 and group chats.
-
+
| Components | Functionality |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Search](/ui-kit/react/search) | [Search](/ui-kit/react/search) allows users to search across conversations and messages in real time. Users can click on a result to open the conversation or jump directly to a specific message. |
-| [Message Header](/ui-kit/react/message-header) | [Message Header](/ui-kit/react/message-header) shows the search button in the chat header, allowing users to search within a conversation. |
-| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) shows the selected message when clicked from search results and highlights it in the message list. |
-| [Conversations](/ui-kit/react/conversations) | [Conversations](/ui-kit/react/conversations) displays the search input. |
+| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) supports replying to messages via the "Reply" option. Users can select "Reply" on a message to open the composer with the quoted reply pre-filled, maintaining context. |
+| [Message Composer](/ui-kit/react/message-composer) | [Message Composer](/ui-kit/react/message-composer) shows the quoted reply above the input field, providing context for the response. |
-## Threaded Conversations
+## Group Chat
-The Threaded Conversations feature enables users to respond directly to a specific message in a chat. This keeps conversations organized and enhances the user experience by maintaining context, especially in group chats.
+CometChat facilitates Group Chats, allowing users to have conversations with multiple participants simultaneously. This feature is crucial for team collaborations, group discussions, social communities, and more.
-
+
-| Components | Functionality |
-| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Threaded Message Preview](/ui-kit/react/threaded-message-preview) | [Threaded Message Preview](/ui-kit/react/threaded-message-preview) component displays the parent message along with the number of replies. |
+See the [Groups](/ui-kit/react/groups) component page for details.
## Moderation
@@ -169,9 +174,9 @@ Learn more about setting up moderation rules and managing content in the [Modera
| Components | Functionality |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) automatically handles moderated messages, displaying blocked content appropriately based on your moderation settings. |
+| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) automatically handles moderated messages, displaying blocked content based on moderation settings. |
-After implementing moderation rules, users can report messages they find inappropriate or harmful. As a next step, you can enable the **[Report Message](#report-message)** feature to allow users to flag messages for review by moderators.
+The **[Report Message](#report-message)** feature enables users to flag messages for review by moderators.
## Report Message
@@ -189,12 +194,37 @@ Learn more about how flagged messages are handled, reviewed, and moderated in th
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) provides the "Report Message" option in the message actions menu, allowing users to initiate the reporting process for inappropriate messages. |
-## Group Chat
+## Conversation and Advanced Search
-CometChat facilitates Group Chats, allowing users to have conversations with multiple participants simultaneously. This feature is crucial for team collaborations, group discussions, social communities, and more.
+Conversation and Advanced Search is a powerful feature provided by CometChat that enables users to quickly find conversations, messages, and media across chats in real time. It supports filters, scopes, and custom actions, allowing users to locate content efficiently while keeping the chat experience smooth and intuitive.
-
+
-For a comprehensive understanding and guide on implementing and using the Groups feature in CometChat, you should refer to our detailed guide on [Groups](/ui-kit/react/groups).
+| Components | Functionality |
+| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Search](/ui-kit/react/search) | [Search](/ui-kit/react/search) allows users to search across conversations and messages in real time. Users can click on a result to open the conversation or jump directly to a specific message. |
+| [Message Header](/ui-kit/react/message-header) | [Message Header](/ui-kit/react/message-header) shows the search button in the chat header, allowing users to search within a conversation. |
+| [Message List](/ui-kit/react/message-list) | [Message List](/ui-kit/react/message-list) shows the selected message when clicked from search results and highlights it in the message list. |
+| [Conversations](/ui-kit/react/conversations) | [Conversations](/ui-kit/react/conversations) displays the search input. |
+
+See the [Groups](/ui-kit/react/groups) component page for details.
+---
+
+## Next Steps
+
+
@@ -73,75 +88,49 @@ Below is an example demonstrating how to use a custom formatter class in compone
+
-### Polls
+#### Message Shortcuts
+
+Sends predefined messages using short codes (e.g., `!hb` expands to `Happy birthday!`). See [Message Shortcuts Extension](/fundamentals/message-shortcuts).
+
+#### Pin Message
+
+Pins important messages in a conversation for easy access. See [Pin Message Extension](/fundamentals/pin-message).
+
+#### Rich Media Preview
+
+Generates rich preview panels for URLs using iFramely. See [Rich Media Preview Extension](/fundamentals/rich-media-preview).
+
+#### Save Message
+
+Bookmarks messages for later reference. Saved messages are private to the user. See [Save Message Extension](/fundamentals/save-message).
-The Polls extension enhances group discussions by allowing users to create polls. Users can ask questions with a predefined list of answers, enabling a quick, organized way to gather group opinions. For a comprehensive understanding and guide on implementing and using the Polls Extension, refer to our specific guide on the [Polls Extension](/fundamentals/polls).
+#### Thumbnail Generation
-Once you have successfully activated the [Polls Extension](/fundamentals/polls) from your CometChat Dashboard, the feature will automatically be incorporated into the Action Sheet of the [Message Composer](/ui-kit/react/message-composer) component of UI Kits.
+Creates smaller preview images for shared images, reducing bandwidth. See [Thumbnail Generation Extension](/fundamentals/thumbnail-generation).
+
+Auto-integrates into the Message Bubble of [MessageList](/ui-kit/react/message-list) when activated.
-
+
+
-### Collaborative Document
+#### Polls
-With the Collaborative Document extension, users can work together on a shared document. This feature is essential for remote teams where document collaboration is a recurring requirement. For a comprehensive understanding and guide on implementing and using the Collaborative Document Extension, refer to our specific guide on the [Collaborative Document Extension](/fundamentals/collaborative-document).
+Creates polls in group discussions with predefined answer options. See [Polls Extension](/fundamentals/polls).
-Once you have successfully activated the [Collaborative Document Extension](/fundamentals/collaborative-document) from your CometChat Dashboard, the feature will automatically be incorporated into the Action Sheet of the [Message Composer](/ui-kit/react/message-composer) component of UI Kits.
+Auto-integrates into the Action Sheet of [Message Composer](/ui-kit/react/message-composer) when activated.
-
+
-### Message Translation
+#### Reminders
+
+Sets reminders for messages or creates personal reminders. A bot sends a notification when due. See [Reminders Extension](/fundamentals/reminders).
-The Message Translation extension in CometChat is designed to translate any message into your local locale. It eliminates language barriers, making the chat more inclusive. For a comprehensive understanding and guide on implementing and using the Message Translation Extension, refer to our specific guide on the [Message Translation Extension](/fundamentals/message-translation).
+#### Stickers
-Once you have successfully activated the [Message Translation Extension](/fundamentals/message-translation) from your CometChat Dashboard, the feature will automatically be incorporated into the Action Sheet of [MessageList Component](/ui-kit/react/message-list) component of UI Kits.
+Sends pre-designed stickers in chat. See [Sticker Extension](/fundamentals/stickers).
+
+Auto-integrates into [Message Composer](/ui-kit/react/message-composer) when activated.
-
+
-### Link Preview
+#### Stipop
+
+Integrates Stipop's sticker library. See [Stipop Extension](/fundamentals/stickers-stipop).
+
+#### Tenor
+
+Search and share GIFs from Tenor. See [Tenor Extension](/fundamentals/tenor).
+
+### Collaboration
+
+#### Collaborative Document
-The Link Preview extension provides a summary of the URL shared in the chat. It includes the title, a description, and a thumbnail image from the web page. For a comprehensive understanding and guide on implementing and using the Link Preview Extension, refer to our specific guide on the [Link Preview Extension](/fundamentals/link-preview).
+Shared document editing for real-time collaboration. See [Collaborative Document Extension](/fundamentals/collaborative-document).
-Once you have successfully activated the [Link Preview Extension](/fundamentals/link-preview) from your CometChat Dashboard, the feature will automatically be incorporated into the Message Bubble of [MessageList Component](/ui-kit/react/message-list) component of UI Kits.
+Auto-integrates into the Action Sheet of [Message Composer](/ui-kit/react/message-composer) when activated.
-
+
-### Thumbnail Generation
+#### Collaborative Whiteboard
-The Thumbnail Generation extension automatically creates a smaller preview image whenever a larger image is shared, helping to reduce the upload/download time and bandwidth usage. For a comprehensive understanding and guide on implementing and using the Thumbnail Generation Extension, refer to our specific guide on the [Thumbnail Generation Extension](/fundamentals/thumbnail-generation).
+Real-time shared whiteboard for drawing and brainstorming. See [Collaborative Whiteboard Extension](/fundamentals/collaborative-whiteboard).
-Once you have successfully activated the [Thumbnail Generation Extension](/fundamentals/thumbnail-generation) from your CometChat Dashboard, the feature will automatically be incorporated into the Message Bubble of [MessageList Component](/ui-kit/react/message-list) component of UI Kits.
+Auto-integrates into the Action Sheet of [Message Composer](/ui-kit/react/message-composer) when activated.
-
+
+### Security
+
+#### Disappearing Messages
+
+Messages auto-delete after a specified interval. Works for 1:1 and group messages. See [Disappearing Messages Extension](/fundamentals/disappearing-messages).
+
+### Customer Support
+
+#### Chatwoot
+
+Routes user messages to Chatwoot for customer support. See [Chatwoot Extension](/fundamentals/chatwoot).
+
+#### Intercom
+
+Integrates Intercom for in-app customer support. See [Intercom Extension](/fundamentals/intercom).
+
+### Smart Chat Features
+
+#### Conversation Starter
+
+AI-generated opening messages for new chats. See [Conversation Starter](/fundamentals/ai-user-copilot/conversation-starter) and [AI Features](/ui-kit/react/ai-features).
+
+#### Smart Replies
+
+AI-generated response suggestions based on conversation context. See [Smart Replies](/fundamentals/ai-user-copilot/smart-replies) and [AI Features](/ui-kit/react/ai-features).
+
+#### Conversation Summary
+
+AI-generated recap of long conversations. See [Conversation Summary](/fundamentals/ai-user-copilot/conversation-summary) and [AI Features](/ui-kit/react/ai-features).
+
+---
+
+## Next Steps
+
+
-***
-
-## Usage
-
-### Integration
+---
-The following code snippet illustrates how you can directly incorporate the Group Members component into your Application.
+## Minimal Render
-
+
-##### 4. onError
+Customized:
-This action doesn't change the behavior of the component but rather listens for any errors that occur in the Group Members component.
+
+
+
+
-**Example**
+Customized:
-In the example below, we are applying a filter to the Group Members by setting the limit to two and setting the scope to show only admin and moderator.
+
+
+
+
-export default GroupMembersDemo;
-```
+Customized:
-
+
+
+
+
+
+
-
-
+| | |
+| --- | --- |
+| Type | `CometChat.Group` |
+| Default | — |
-The customized chat interface is displayed below.
+---
-
-
-
+### groupMemberRequestBuilder
-Use the following code to achieve the customization shown above.
+Controls which members load and in what order.
-
-
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-Use the following code to achieve the customization shown above.
+---
-
-
+| | |
+| --- | --- |
+| Type | `(groupMember: CometChat.GroupMember) => JSX.Element` |
+| Default | Built-in list item |
-The customized chat interface is displayed below.
+---
-
-
-
+### leadingView
-Use the following code to achieve the customization shown above.
+Custom renderer for the avatar / left section.
-
-
+| | |
+| --- | --- |
+| Type | `((error: CometChat.CometChatException) => void) \| null` |
+| Default | `undefined` |
-Use the following code to achieve the customization shown above.
+---
-
-
+### searchKeyword
-The customized chat interface is displayed below.
+Pre-fills the search and filters the member list.
-
-
-
+| | |
+| --- | --- |
+| Type | `string` |
+| Default | `""` |
-Use the following code to achieve the customization shown above.
+---
-
-
-
-Use the following code to achieve the customization shown above.
-
-
-
+### titleView
-Use the following code to achieve the customization shown above.
+Custom renderer for the name / title text.
-
-
+`CometChatGroups` is a directory list component. It renders available groups and emits the selected `CometChat.Group` via `onItemClick`. Wire it to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` to build a group chat layout.
-The Groups component is composed of the following BaseComponents:
+```tsx lines
+import { useState } from "react";
+import {
+ CometChatGroups,
+ CometChatMessageHeader,
+ CometChatMessageList,
+ CometChatMessageComposer,
+} from "@cometchat/chat-uikit-react";
+import { CometChat } from "@cometchat/chat-sdk-javascript";
+import "@cometchat/chat-uikit-react/css-variables.css";
-| Components | Description |
-| ----------------- | ------------------------------------------------------------------------------------------------------------------------- |
-| CometChatList | A reusable container component having title, search box, customisable background and a list view. |
-| CometChatListItem | A component that renders data obtained from a Group object on a Tile having a title, subtitle, leading and trailing view. |
+function GroupChatApp() {
+ const [selectedGroup, setSelectedGroup] = useState
+
-### Integration
+---
-The following code snippet illustrates how you can directly incorporate the Groups component into your Application.
+## Minimal Render
-
+
-**Example**
+Customized:
-
+
+
+
-The customized chat interface is displayed below.
+Customized:
-
+
-Use the following code to achieve the customization shown above.
-
+
+
+
+
+
+
+
-Use the following code to achieve the customization shown above.
-
-
+### options
-The customized chat interface is displayed below.
+Replace the context menu / hover actions on each group item.
-
+
-Use the following code to achieve the customization shown above.
-
No groups available
+ +
-
+The component uses CSS custom properties (design tokens) defined in `@cometchat/chat-uikit-react/css-variables.css`. The cascade:
-Use the following code to achieve the customization shown above.
+1. Global tokens (e.g., `--cometchat-primary-color`, `--cometchat-background-color-01`) are set on the `.cometchat` root wrapper.
+2. Component CSS (`.cometchat-groups`) consumes these tokens via `var()` with fallback values.
+3. Overrides target `.cometchat-groups` descendant selectors in a global stylesheet.
-
+
-.cometchat-groups .cometchat-list-item .groups__leading-view .cometchat-avatar__image, .cometchat-groups .cometchat-list-item .groups__leading-view .cometchat-avatar{
- border-radius: 8px;
- height: 48px ;
- width: 48px ;
+```css lines
+.cometchat-groups .cometchat-list__header-title {
+ background-color: #edeafa;
+ color: #6852d6;
+ border-width: 0px 1px 1px 0px;
+ border-style: solid;
+ border-color: #6852d6;
+ font-family: "Times New Roman";
+ font-size: 24px;
+ font-weight: 700;
}
-.groups__leading-view-info{
- display: flex;
- width: 48px;
- height: 15px;
- padding: 1px 3px;
- justify-content: center;
- align-items: center;
- color:#FFF;
- font:600 8px/9.6px Roboto;
- background:#FFAB00;
- position:absolute;
- bottom:-2px;
+.cometchat-groups__list-item .cometchat-avatar {
+ background-color: #aa9ee8;
+ border-radius: 6.67px;
}
-.groups__leading-view-joined .groups__leading-view-info{
- background:#09C26F;
+
+.cometchat-groups .cometchat-list-item__body-title {
+ font-family: "Times New Roman";
+ font-size: 16px;
+ font-weight: 400;
}
-.groups__leading-view{
- position: relative;
+
+.cometchat-groups .cometchat-groups__subtitle {
+ font-family: "Times New Roman";
+ font-size: 14px;
+ font-weight: 400;
}
```
-
-
+---
-Use the following code to achieve the customization shown above.
+---
-
-
+---
-Use the following code to achieve the customization shown above.
+### errorView
-
-
+---
-Use the following code to achieve the customization shown above.
+### hideGroupType
-
-
-
-The `Incoming Call` is comprised of the following base components:
-
-| Components | Description |
-| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
-| cometchat-list-item | This component’s view consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
-| cometchat-button | This component represents a button with optional icon and text. |
-| cometchat-avatar | This component component displays an image or user's avatar with fallback to the first two letters of the username. |
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatIncomingCall` is an overlay component that auto-detects incoming calls and renders a notification with accept/decline buttons. Place it at the app root level so it appears above all other content.
-
+
-export default IncomingCallsDemo;
-```
+---
-
+
-
+
-
+
+
+```tsx lines
+import { CometChat } from "@cometchat/chat-sdk-javascript";
+import { CometChatAvatar, CometChatIncomingCall } from "@cometchat/chat-uikit-react";
-const IncomingCallsDemo = () => {
+function CustomItemViewIncoming() {
return (
+
-Use the following code to achieve the customization shown above.
-
-
-
+---
-Use the following code to achieve the customization shown above.
+### callSettingsBuilder
-
-
+### leadingView
-Use the following code to achieve the customization shown above.
+Custom renderer for the avatar / left section.
-
-
+### subtitleView
-Use the following code to achieve the customization shown above.
+Custom renderer for the subtitle text.
-
-## Usage
-
-### Integration
+---
-The following code snippet illustrates how you can directly incorporate the MessageComposer component into your app.
+## Minimal Render
-
+
- return chatUser ? (
-
+
+
+```tsx lines
+import {
+ CometChatMessageComposer,
+ CometChatButton,
+} from "@cometchat/chat-uikit-react";
+
+function ComposerCustomAuxiliary() {
+ return (
+
+
+
+
+
-
+---
-
-
+Hides the entire attachment button.
-The customized chat interface is displayed below.
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-
-
-
+---
-Use the following code to achieve the customization shown above.
+### hideAudioAttachmentOption
-
-
+### hideFileAttachmentOption
-The customized chat interface is displayed below.
+Hides the file attachment option.
-
-
-
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-Use the following code to achieve the customization shown above.
+---
-
-
+### hideSendButton
-The customized chat interface is displayed below.
+Hides the send button.
-
-
-
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-Use the following code to achieve the customization shown above.
+---
-
-
+### initialComposerText
-The customized chat interface is displayed below.
+Pre-fills the text input when the component mounts.
-
-
-
+| | |
+| --- | --- |
+| Type | `string` |
+| Default | `""` |
-Use the following code to achieve the customization shown above.
+---
-
-
-
-The `MessageHeader` is comprised of the following components:
-
-| Component | Description |
-| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
-| CometChatListItem | This component’s view consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
-| Back Button | BackButton that allows users to navigate back from the current activity or screen to the previous one. |
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatMessageHeader` is a toolbar component that sits above `CometChatMessageList` and `CometChatMessageComposer`. It receives a `user` or `group` prop and displays the conversation's avatar, name, online status, and typing indicator. Call buttons are rendered automatically when the calling extension is enabled.
-
+
-**Example**
+---
-In this example, we are employing the `onBack` action.
+## Minimal Render
-
-
+Fires on internal errors.
-
-Use the following code to achieve the customization shown above.
-
-Use the following code to achieve the customization shown above.
-
-Use the following code to achieve the customization shown above.
-
-
-Use the following code to achieve the customization shown above.
-
-Use the following code to achieve the customization shown above.
-
-
+
-.cometchat-message-header
- .cometchat-list-item__trailing-view
- .cometchat-button__icon {
- background: black;
+```tsx lines
+import {
+ CometChatMessageHeader,
+ CometChatButton,
+} from "@cometchat/chat-uikit-react";
+import { CometChat } from "@cometchat/chat-sdk-javascript";
+
+function AuxiliaryButtonHeader({ group }: { group: CometChat.Group }) {
+ return (
+
-
+---
-Use the following code to achieve the customization shown above.
+## Common Patterns
-
+
-// Define a custom date format pattern
-function getDateFormat() {
- const dateFormat = new CalendarObject({
- today: `hh:mm A`, // Example: "10:30 AM"
- yesterday: `[yesterday]`, // Example: "yesterday"
- otherDays: `DD MM YYYY`, // Example: "25 01 2025"
- });
- return dateFormat;
+```css lines
+.cometchat-message-header .cometchat-list-item .cometchat-avatar {
+ background: #f0999b;
+ border-radius: 8px;
}
-// Apply the custom format to the CometChatMessageHeader component
-
-***
-
-## Usage
-
-### Integration
+---
-The following code snippet illustrates how you can directly incorporate the MessageList component into your Application.
+## Minimal Render
-
+
+
-
+---
-
-
+---
-Use the following code to achieve the customization shown above.
+### onThreadRepliesClick
-
-
+---
-Use the following code to achieve the customization shown above.
+### showConversationStarters
-
-
-
-The Message Bubble structure can typically be broken down into the following views:
-
-1. **Leading view**: This is where the sender's avatar is displayed. It's typically on the left of the Message Bubble for messages from others and on the right for messages from the current user.
-
-2. **Header view**: This displays the sender's name and is especially useful in group chats where multiple users are sending messages.
-
-3. **Reply view**: This view can be used to extend the Message Bubble with additional elements. It's typically placed above the Content view.
-
-4. **Content view**: This is the core of the Message Bubble where the message content (text, images, videos, etc.) is displayed.
-
-5. **Bottom view**: This view can be used to extend the Message Bubble with additional elements, such as link previews or a 'load more' button for long messages. It's typically placed beneath the Content view.
-
-6. **Thread view**: This is where the thread reply icon and reply counts are displayed. It's located below the footer view.
-
-7. **Footer view**: This is where the reactions are displayed. It's located at the bottom of the Message Bubble.
-
-8. **Status Info view**: This is where the timestamp of the message and its delivery or read status are displayed. It's located inside the Message Bubble just below the content view.
-
-***
-
-### Properties
-
-MessageTemplate provides you with methods that allow you to alter various properties of the Message Bubble. These properties include aspects such as the `type` and `category` of a message, the appearance and behavior of the header, content, and footer sections of the message bubble,
-
-1. **type**
-
- Using `type` you can set the type of CometChatMessage, This will map your MessageTemplate to the corresponding CometChatMessage. You can set the MessageTemplates Type using the following code snippet.
-
-2. **category**
-
- Using `category` you can set the category of a MessageTemplate. This will create a MessageTemplate with the specified category and link it with a CometChatMessage of the same category.
-
- Please refer to our guide on [Message Categories](/sdk/javascript/message-structure-and-hierarchy) for a deeper understanding of message categories.
-
-3. **headerView**
-
- The `headerView` method allows you to assign a custom header view to the Message Bubble. By default, it is configured to display the sender's name.
-
-4. **contentView**
-
- The `contentView` method allows you to assign a custom content view to the Message Bubble. By default, it displays the Text Bubble, Image Bubble, File Bubble, Audio Bubble, or Video Bubble depending on the message type.
-
-5. **footerView**
-
- The `footerView` method allows you to assign a custom Footer view to the Message Bubble. By default it shows thr reactions for the message bubble.
-
-6. **bottomView**
-
- The `bottomView` method allows you to assign a custom Bottom view to the Message Bubble. By defuault is has buttons such as link previews or a 'load more' button for long messages.
-
-7. **bubbleView**
+## What It Is
- The `bubbleView` method allows you to assign a custom Bubble view to the Message Bubble. By default, headerView, contentView, statusInfoView and footerView together form a message bubble.
+`CometChatMessageTemplate` is a model class, not a rendered component. Each instance maps a message `type` + `category` pair to a set of view functions that control how that message renders inside `CometChatMessageList`. Pass an array of templates to the `templates` prop on `CometChatMessageList`.
-8. **statusInfoView**
+```tsx lines
+import { useState, useEffect } from "react";
+import {
+ CometChatMessageList,
+ CometChatMessageTemplate,
+ CometChatUIKit,
+ CometChatUIKitConstants,
+} from "@cometchat/chat-uikit-react";
+import { CometChat } from "@cometchat/chat-sdk-javascript";
- The `statusInfoView` method allows you to assign a custom status info view to the Message Bubble. By default, it displays the receipt and timestamp.
+function CustomTemplateDemo() {
+ const [chatGroup, setChatGroup] = useState
-
@@ -284,8 +168,8 @@ The `contentview` method of MessageTemplate allows you to add a custom view to t
@@ -547,116 +288,48 @@ The `bottomView` method of MessageTemplate allows you to add a custom button vie
+
-
-
-
+
-Default Reply View
- -
-
-
-Custom Reply View
-
+
-
-
-
-
-
-
+| Key | Value |
+| --- | --- |
+| Type | `((message: CometChat.BaseMessage, alignment: MessageBubbleAlignment, textFormatters?: CometChatTextFormatter[]) => Element \| JSX.Element \| null) \| null` |
+| Default | `null` |
-
-This layout is structured into three key sections:
-
-1. **Sidebar (Conversation List)** – Displays active conversations, including users and groups.
-2. **Message View** – Shows chat messages for the selected conversation in real-time.
-3. **Message Composer** – Provides an input field for typing and sending messages, along with support for media, emojis, and reactions.
-
-***
+[
- */}
+
-
+```css title="globals.css" lines
+@import url("@cometchat/chat-uikit-react/css-variables.css");
+```
-**Recommended for:**
+Also ensure your global CSS sets `height: 100%` on the root elements:
-* Desktop-first applications
-* Apps requiring a **rich user experience** with seamless navigation
-* Platforms supporting both **individual and group messaging**
-* **Mobile-friendly** apps needing a **tap-to-open message view**
+```css title="globals.css" lines
+html,
+body {
+ height: 100%;
+}
-[
+
-**Recommended for:**
-
-* **Support chat applications** – Direct user-agent communication.
-* **Apps focusing on direct messaging** – No distractions from other conversations.
-* **Community or group chat applications** – A structured way to interact in groups.
-* **Mobile-first applications** – Designed for compact and dedicated messaging experiences.
-
-[
+
-**Recommended for:**
+[
+
-**Recommended for:**
+[
-### **Key Components**
-
-1. **Chat Header** – Displays recipient details and optional call/video call buttons.
-2. **Message View** – Shows real-time chat history.
-3. **Message Input Box** – Enables users to send messages, media, and reactions.
-
-***
-
-## **Step-by-Step Guide**
-
-### **Step 1: Implement the Chat Header**
-
-* Display **profile picture, name, and online status**.
-* Add **voice and video call buttons** (optional).
-
-```html
-
-This layout consists of:
-
-1. **Sidebar (Conversation List)** – Displays recent conversations with active users and groups.
-2. **Message View** – Shows the selected chat with real-time messages.
-3. **Message Input Box** – Allows users to send messages seamlessly.
-
-***
-
-## **Step-by-Step Guide**
-
-### **Step 1: Create a Tab Component**
-
-To manage navigation, let's build a **`CometChatTabs`** component. This component will render different tabs and allow switching between sections dynamically.
+[
-
-
-The `Outgoing Call` is comprised of the following components:
-
-| Components | Description |
-| ---------------- | ------------------------------------------------------------------------------------------------------------------- |
-| CometChat Button | This component represents a button with optional icon and text. |
-| CometChat Avatar | This component component displays an image or user's avatar with fallback to the first two letters of the username. |
-
-## Usage
+## Where It Fits
-### Integration
+`CometChatOutgoingCall` is an overlay component that displays the outgoing call screen with the recipient's name, avatar, and a cancel button. It plays a ringtone while the call is pending. Typically rendered at the app root level after initiating a call via `CometChat.initiateCall()`.
-
+
-
+
+
-export default OutgoingCallDemo;
+
+
-To fit your app's design requirements, you can customize the appearance of the Outgoing Call component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.
+
-
+---
-
+
-
-
-
-Use the following code to achieve the customization shown above.
-
-
-
-
-Use the following code to achieve the customization shown above.
-
-
-
+Disables the outgoing call ringtone.
-Use the following code to achieve the customization shown above.
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-
-***
-
-## **Try Live Demo**
+---
-**Experience the CometChat UI Kit in action:**
+## Try It
-This layout is structured into three key sections:
+[
- */}
+
-**Recommended for:**
-
-* Desktop-first applications
-* Apps requiring a **rich user experience** with seamless navigation
-* Platforms supporting both **individual and group messaging**
-* **Mobile-friendly** apps needing a **tap-to-open message view**
-
[
-**Recommended for:**
-
-* **Support chat applications** – Direct user-agent communication.
-* **Apps focusing on direct messaging** – No distractions from other conversations.
-* **Community or group chat applications** – A structured way to interact in groups.
-* **Mobile-first applications** – Designed for compact and dedicated messaging experiences.
-
[
-**Recommended for:**
-
-* **Apps requiring structured navigation** – Clearly separate chat, calls, and settings.
-* **Multi-feature chat apps** – Supporting different functionalities in an organized way.
-* **Mobile-first applications** – Ideal for apps needing tab-based UI for easy access to features.
-* **Support & enterprise chat solutions** – Perfect for help desks, business chat platforms, and customer support apps.
-
[
-This layout is structured into three key sections:
-
-1. **Sidebar (Conversation List)** – Displays active conversations, including users and groups.
-2. **Message View** – Shows chat messages for the selected conversation in real-time.
-3. **Message Composer** – Provides an input field for typing and sending messages, along with support for media, emojis, and reactions.
-
-***
-
-## **Step-by-Step Guide**
-
-### **Step 1: Create Sidebar**
+---
-Let's create the `Sidebar` component which will render different conversations.
+## What You're Building
-#### **Folder Structure**
+Three sections working together:
-Create a `CometChatSelector` folder inside your `src/app` directory and add the following files:
+1. **Sidebar (conversation list)** — shows all active conversations (users and groups)
+2. **Message view** — displays chat messages for the selected conversation in real time
+3. **Message composer** — text input with support for media, emojis, and reactions
-```swift
-src/app/
-│── CometChatSelector/
-│ ├── CometChatSelector.tsx
-│ ├── CometChatSelector.css
-```
+---
-#### **Download the Icon**
+## Step 1 — Create the Sidebar Component
-These icons are available in the **CometChat UI Kit assets folder**. You can find them at:\
-🔗 [GitHub Assets Folder](https://github.com/cometchat/cometchat-uikit-react/tree/v6/sample-app/src/assets)
+
-
---------
-
-***
-
-## **Prerequisites**
-
-Before installing the **CometChat UI Kit for React**, you must first **create a CometChat application** via the **[CometChat Dashboard](https://app.cometchat.com/)**. The dashboard provides all the essential chat service components, including:
-
-* **User Management**
-* **Group Chat & Messaging**
-* **Voice & Video Calling**
-* **Real-time Notifications**
-
-> To initialize the **UI Kit**, you will need the following credentials from your **CometChat application**:
->
-> 1. **App ID**
-> 2. **Auth Key**
-> 3. **Region**
->
-> Ensure you have these details ready before proceeding with the installation and configuration.
-
-***
-
-## **Register & Set Up CometChat**
-
-Follow these steps to **register on CometChat** and **set up your development environment**.
-
-### **Step 1: Register on CometChat**
-
-To use **CometChat UI Kit**, you first need to register on the **CometChat Dashboard**.
+
-
+Also ensure your global CSS sets `height: 100%` on the root elements:
-**Recommended for:**
+```css title="app.css" lines
+html,
+body {
+ height: 100%;
+}
+```
-* Desktop-first applications
-* Apps requiring a **rich user experience** with seamless navigation
-* Platforms supporting both **individual and group messaging**
-* **Mobile-friendly** apps needing a **tap-to-open message view**
+Without the CSS import, components will render with broken or missing styles. Without the height rules, the chat UI won't fill the viewport.
-[Integrate Conversation List + Message](./react-router-conversation)
+---
-***
+## Step 6 — Choose a Chat Experience
-#### **2️⃣ One-to-One/Group Chat**
+Integrate a conversation view that suits your app's UX. Each option below includes a step-by-step guide.
-**Best for:** Apps that require a **focused, direct messaging experience** without a sidebar.
+### Conversation List + Message View
-**Features:**
+Two-panel layout — conversation list on the left, messages on the right. Think WhatsApp Web or Slack.
-* **Dedicated chat window** – Ideal for one-on-one or group messaging.
-* **No conversation list** – Users directly enter the chat without navigating through a list.
-* **Supports both One-to-One and Group Chats** – Easily configurable with minor code modifications.
-* **Optimized for mobile** – Full-screen chat experience without distractions.
-* **Seamless real-time communication** – Auto-updates messages for a smooth experience.
-* **Ideal for support chat or community-based messaging.**
+- Two-panel layout with conversation list and active chat window
+- Switch between one-to-one and group conversations
+- Tap-to-view on mobile — tapping a conversation opens the message view
+- Real-time updates and message sync across sessions
-
+
-**Recommended for:**
-
-* **Support chat applications** – Direct user-agent communication.
-* **Apps focusing on direct messaging** – No distractions from other conversations.
-* **Community or group chat applications** – A structured way to interact in groups.
-* **Mobile-first applications** – Designed for compact and dedicated messaging experiences.
-
-[Integrate One-to-One/Group Chat](./react-router-one-to-one-chat)
+
+
-**Recommended for:**
-
-* **Apps requiring structured navigation** – Clearly separate chat, calls, and settings.
-* **Multi-feature chat apps** – Supporting different functionalities in an organized way.
-* **Mobile-first applications** – Ideal for apps needing tab-based UI for easy access to features.
-* **Support & enterprise chat solutions** – Perfect for help desks, business chat platforms, and customer support apps.
-
-[Integrate Tab-Based Chat](./react-router-tab-based-chat)
+
+
-**Key Areas to Explore:**
+
-### **Key Components**
-
-1. **Chat Header** – Displays recipient details and optional call/video call buttons.
-2. **Message View** – Shows real-time chat history.
-3. **Message Input Box** – Enables users to send messages, media, and reactions.
-
-***
-
-## **Step-by-Step Guide**
-
-### **Step 1: Implement the Chat Header**
-
-* Display **profile picture, name, and online status**.
-* Add **voice and video call buttons** (optional).
-
-```html
-
-This layout consists of:
-
-1. **Sidebar (Conversation List)** – Displays recent conversations with active users and groups.
-2. **Message View** – Shows the selected chat with real-time messages.
-3. **Message Input Box** – Allows users to send messages seamlessly.
-
-***
-
-## **Step-by-Step Guide**
-
-### **Step 1: Create a Tab Component**
-
-To manage navigation, let's build a **`CometChatTabs`** component. This component will render different tabs and allow switching between sections dynamically.
-
-#### **Folder Structure**
-
-Create a `CometChatTabs` folder inside your `src` directory and add the following files:
+---
-```php
-public/
-├── assets # These are the images you need to save
-│ ├── chats.svg
-│ ├── calls.svg
-│ ├── users.svg
-│ ├── groups.svg
-src/app/
-│── CometChatTabs/
-│ ├── CometChatTabs.tsx
-│ ├── CometChatTabs.css
-```
+## What You're Building
-#### **Download the Icons**
+Three sections working together:
-These icons are available in the **CometChat UI Kit assets folder**. You can find them at:\
-🔗 [GitHub Assets Folder](https://github.com/cometchat/cometchat-uikit-react/tree/v6/sample-app/src/assets)
+1. **Tab bar** — switches between Chats, Calls, Users, and Groups
+2. **Sidebar** — renders the list for the active tab
+3. **Message view** — header + messages + composer for the selected item
-***
+---
-#### **Implementation**
+## Step 1 — Create the Tab Component
+
+
-This layout consists of:
-
-1. **Sidebar (Conversation List)** – Displays recent conversations with active users and groups.
-2. **Message View** – Shows the selected chat with real-time messages.
-3. **Message Input Box** – Allows users to send messages seamlessly.
-
-***
+[
+
+
+---
-
-
-
-
-
+### messageItemView
-The customized message search interface is displayed below.
+Replace the entire message list item in search results.
-Use the following code to achieve the customization shown above.
-
-
+### messageLeadingView
-The customized message leading view interface is displayed below.
+Replace the message avatar / left section.
-Use the following code to achieve the customization shown above.
-
-
-
-The customized message title view interface is displayed below.
+Replace the message title text.
-Use the following code to achieve the customization shown above.
-
-
-
-The customized message subtitle view interface is displayed below.
+Replace the message subtitle text.
-Use the following code to achieve the customization shown above.
-
-
+### messageTrailingView
-The customized message trailing view interface is displayed below.
+Replace the message right section.
-Use the following code to achieve the customization shown above.
-
-## Usage
+---
-Here are the steps to create a `ShortCutFormatter` for CometChat using the CometChatTextFormatter:
+## Steps
-1. Firstly, you need to import `CometChatTextFormatter` from the CometChat UI Kit react library.
+### 1. Import the base class
-```javascript
+```javascript lines
import { CometChatTextFormatter } from "@cometchat/chat-uikit-react";
```
-2. Now, extend the `CometChatTextFormatter` class to create your custom text formatter class. In this case, let's create a `HashTagTextFormatter`.
+### 2. Extend it
-```java
+```javascript lines
class ShortCutFormatter extends CometChatTextFormatter {
...
}
```
-3. Set up the `trackCharacter` and define any necessary private fields.
+### 3. Set the track character
-```javascript
+```javascript lines
this.setTrackingCharacter("!");
```
-4. Implement the `onKeyDown` method to handle key events and trigger actions based on defined shortcuts.
+### 4. Handle key events
+
+Detect shortcuts on `keyDown` and trigger expansion logic.
-```javascript
+```javascript lines
onKeyDown(event: KeyboardEvent) {
// Your implementation
}
```
-5. Implement any additional methods required for your custom formatter, such as opening and closing dialogs, handling button clicks, and formatting text.
-
-```typescript
-openDialog(buttonText: string) {
- // Your implementation
-}
-
-closeDialog() {
- // Your implementation
-}
-
-handleButtonClick = () => {
- // Your implementation
-};
-
-getFormattedText(text: string): string {
- return text;
-}
+### 5. Add dialog and formatting methods
-private getTextBeforeCaret(caretPosition: number): string {
- // Your implementation
-}
+```typescript lines
+openDialog(buttonText: string) { ... }
+closeDialog() { ... }
+handleButtonClick = () => { ... };
+getFormattedText(text: string): string { return text; }
+private getTextBeforeCaret(caretPosition: number): string { ... }
```
-## Example
+---
-Below is an example demonstrating how to use a custom formatter class in components such as [CometChatConversations](/ui-kit/react/conversations), [CometChatMessageList](/ui-kit/react/message-list), [CometChatMessageComposer](/ui-kit/react/message-composer).
+## Example
@@ -80,7 +80,10 @@ Below is an example demonstrating how to use a custom formatter class in compone
-
+### Thread header with hidden chrome
-
+
+
+```css lines
+.cometchat-thread-header {
background-color: #edeafa;
}
-.cometchat .cometchat-thread-header__reply-bar-count {
+.cometchat-thread-header__reply-bar-count {
color: #6852d6;
}
-.cometchat .cometchat-thread-header__reply-bar-divider {
- color: #6852d6;
+.cometchat-thread-header__reply-bar-divider {
+ background: #6852d6;
}
```
-
+---
+
## Usage
-`CometChatUrlsFormatter` utilizes regular expressions to identify URLs and applies styles to make them visually distinct as clickable links. Here's an example of how to extend the `CometChatTextFormatter` to create a URL text formatter:
+Extend `CometChatTextFormatter`, set regex patterns for URL detection, and override `onRegexMatch` and `registerEventListeners` to handle formatting and click behavior.
-
+`CometChatUsers` is a contact list component. It renders all available users and emits the selected `CometChat.User` via `onItemClick`. Wire it to `CometChatMessageHeader`, `CometChatMessageList`, and `CometChatMessageComposer` to build a standard two-panel chat layout.
-The Users component is composed of the following BaseComponents:
+```tsx lines
+import { useState } from "react";
+import {
+ CometChatUsers,
+ CometChatMessageHeader,
+ CometChatMessageList,
+ CometChatMessageComposer,
+} from "@cometchat/chat-uikit-react";
+import { CometChat } from "@cometchat/chat-sdk-javascript";
+import "@cometchat/chat-uikit-react/css-variables.css";
-| Components | Description |
-| ----------------- | ------------------------------------------------------------------------------------------------------------------------ |
-| CometChatList | A reusable container component having title, search box, customisable background and a list view. |
-| CometChatListItem | A component that renders data obtained from a User object on a Tile having a title, subtitle, leading and trailing view. |
+function ChatApp() {
+ const [selectedUser, setSelectedUser] = useState
+
-### Integration
+---
-The following code snippet illustrates how you can directly incorporate the Users component into your Application.
+## Minimal Render
-
+
-export default UsersDemo;
-```
+Customized:
-
+
-
+
+
+
+
+
+Customized:
+
+
+
+
+
+
+
+
-The customized chat interface is displayed below.
+Customized:
-
+
-Use the following code to achieve the customization shown above.
-
No users found
+ +
-
+## CSS Architecture
-Use the following code to achieve the customization shown above.
+The component uses CSS custom properties (design tokens) defined in `@cometchat/chat-uikit-react/css-variables.css`. The cascade:
-
+
-.users__title-view{
- display: flex;
- align-items: center;
- gap: 4px;
- align-self: stretch;
- }
- .users__title-view-name{
+```css lines
+.cometchat .cometchat-users .cometchat-list__header-title {
+ background-color: #fce9ea;
+ color: #e5484d;
+ font-family: "Times New Roman";
+}
+
+.cometchat .cometchat-users .cometchat-list-item__body-title {
overflow: hidden;
color: #141414;
text-overflow: ellipsis;
- font:500 16px Roboto
- }
- .users__title-view-type{
- color: #FFF;
- font: 600 8px Roboto;
- display: flex;
- height: 15px;
- padding: 1px 3px;
- justify-content: center;
- align-items: center;
- gap: 3px;
- border-radius: 7px;
- background: #09C26F;
- }
- .users__title-view-type img{
- border-radius: 4px;
- height: 12px;
- width: 12px;
- }
- //different roles customisation
- .users__title-view-teacher .users__title-view-type{
- }
+ font-family: "Times New Roman";
+}
+
+.cometchat-list-item__leading-view {
+ background: #f0999b;
+ border-radius: 9.6px;
+}
```
-
-
+---
-The customized chat interface is displayed below.
+---
-
-
-
+## Props
-Use the following code to achieve the customization shown above.
+All props are optional unless noted.
-
-
+| | |
+| --- | --- |
+| Type | `JSX.Element` |
+| Default | Built-in header with title and search |
-Use the following code to achieve the customization shown above.
+---
-
-
+Hides the online/offline status indicator.
-Use the following code to achieve the customization shown above.
+| | |
+| --- | --- |
+| Type | `boolean` |
+| Default | `false` |
-
-
+Custom component displayed during the loading state.
-Use the following code to achieve the customization shown above.
+| | |
+| --- | --- |
+| Type | `JSX.Element` |
+| Default | Built-in shimmer |
-
-
+---
-The customized chat interface is displayed below.
+### onSelect
-
-
-
+Callback fired when a user is selected/deselected. Requires `selectionMode` to be set.
-Use the following code to achieve the customization shown above.
+| | |
+| --- | --- |
+| Type | `(user: CometChat.User, selected: boolean) => void` |
+| Default | `undefined` |
-