> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Browse all prebuilt UI components in the CometChat Android UI Kit.

> [accordion] AI Integration Quick Reference
>
> | Field | Value |
> | - | - |
> | Packages | `com.cometchat:chatuikit-kotlin-android` (Kotlin XML Views), `com.cometchat:chatuikit-compose-android` (Jetpack Compose) |
> | Required setup | `CometChatUIKit.init()` + `CometChatUIKit.login()` before rendering any component |
> | Shared core | `chatuikit-core` — ViewModels, repositories, use cases, events (shared by both modules) |
> | Calling | Requires separate `com.cometchat:calls-sdk-android` package |

## Architecture

The UI Kit is a set of independent components that compose into chat layouts. A typical chat layout uses four core components:

* `CometChatConversations` — list of recent conversations
* `CometChatMessageHeader` — toolbar with avatar, name, status, typing indicator
* `CometChatMessageList` — scrollable message feed with reactions, receipts, threads
* `CometChatMessageComposer` — rich input with attachments, mentions, voice notes

Selecting a conversation yields a `User` or `Group` object. Pass it to the message components to load the chat.

Components communicate via `CometChatEvents` — a SharedFlow-based event bus. See [Events](https://www.cometchat.com/docs/ui-kit/android/events.md).

***

## Component Catalog

### Conversations and Lists

| Component | Purpose | Page |
| - | - | - |
| `CometChatConversations` | Scrollable list of recent conversations | [Conversations](https://www.cometchat.com/docs/ui-kit/android/conversations.md) |
| `CometChatUsers` | Scrollable list of users | [Users](https://www.cometchat.com/docs/ui-kit/android/users.md) |
| `CometChatGroups` | Scrollable list of groups | [Groups](https://www.cometchat.com/docs/ui-kit/android/groups.md) |
| `CometChatGroupMembers` | Scrollable list of group members | [Group Members](https://www.cometchat.com/docs/ui-kit/android/group-members.md) |

### Messages

| Component | Purpose | Page |
| - | - | - |
| `CometChatMessageHeader` | Toolbar with avatar, name, status, typing | [Message Header](https://www.cometchat.com/docs/ui-kit/android/message-header.md) |
| `CometChatMessageList` | Message feed with reactions, receipts, threads | [Message List](https://www.cometchat.com/docs/ui-kit/android/message-list.md) |
| `CometChatMessageComposer` | Rich input with attachments, mentions, voice | [Message Composer](https://www.cometchat.com/docs/ui-kit/android/message-composer.md) |
| `CometChatThreadHeader` | Parent message bubble and reply count | [Thread Header](https://www.cometchat.com/docs/ui-kit/android/threaded-messages-header.md) |
| `CometChatPinnedMessages` | Full-screen list of a conversation's pinned messages | [Pinned Messages](https://www.cometchat.com/docs/ui-kit/android/pinned-messages.md) |
| `CometChatSavedMessages` | Full-screen, private list of the user's saved messages | [Saved Messages](https://www.cometchat.com/docs/ui-kit/android/saved-messages.md) |

### Calling

| Component | Purpose | Page |
| - | - | - |
| `CometChatCallButtons` | Voice and video call buttons | [Call Buttons](https://www.cometchat.com/docs/ui-kit/android/call-buttons.md) |
| `CometChatIncomingCall` | Incoming call notification | [Incoming Call](https://www.cometchat.com/docs/ui-kit/android/incoming-call.md) |
| `CometChatOutgoingCall` | Outgoing call screen | [Outgoing Call](https://www.cometchat.com/docs/ui-kit/android/outgoing-call.md) |
| `CometChatCallLogs` | Call history list | [Call Logs](https://www.cometchat.com/docs/ui-kit/android/call-logs.md) |

***

## Component API Pattern

All components share a consistent API surface across both modules.

### Setting User or Group

> [tab] Kotlin (XML Views)
>
> ```kotlin lines theme={null}
> messageHeader.setUser(user)
> messageList.setUser(user)
> messageComposer.setUser(user)
>
> // Or for group chat
> messageHeader.setGroup(group)
> messageList.setGroup(group)
> messageComposer.setGroup(group)
> ```

> [tab] Jetpack Compose
>
> ```kotlin lines theme={null}
> CometChatMessageHeader(user = user)
> CometChatMessageList(user = user)
> CometChatMessageComposer(user = user)
>
> // Or for group chat
> CometChatMessageHeader(group = group)
> CometChatMessageList(group = group)
> CometChatMessageComposer(group = group)
> ```

### Callbacks

> [tab] Kotlin (XML Views)
>
> ```kotlin lines theme={null}
> conversations.setOnItemClick { conversation -> /* navigate */ }
> conversations.setOnError { exception -> /* handle error */ }
> conversations.setOnLoad { list -> /* data loaded */ }
> ```

> [tab] Jetpack Compose
>
> ```kotlin lines theme={null}
> CometChatConversations(
>     onItemClick = { conversation -> /* navigate */ },
>     onError = { exception -> /* handle error */ },
>     onLoad = { list -> /* data loaded */ }
> )
> ```

### Data Filtering

> [tab] Kotlin (XML Views)
>
> ```kotlin lines theme={null}
> conversations.setConversationsRequestBuilder(
>     ConversationsRequest.ConversationsRequestBuilder().setLimit(20)
> )
> ```

> [tab] Jetpack Compose
>
> ```kotlin lines theme={null}
> CometChatConversations(
>     conversationsRequestBuilder = ConversationsRequest.ConversationsRequestBuilder().setLimit(20)
> )
> ```

### View Slots

Replace specific regions of a component's UI. See [View Slots](https://www.cometchat.com/docs/ui-kit/android/customization-view-slots.md).

> [tab] Kotlin (XML Views)
>
> ```kotlin lines theme={null}
> conversations.setSubtitleView(object : ConversationsViewHolderListener() {
>     override fun createView(context: Context, binding: CometchatConversationsListItemsBinding): View {
>         return CustomSubtitleView(context)
>     }
>     override fun bindView(context: Context, createdView: View, conversation: Conversation, ...) {
>         (createdView as CustomSubtitleView).bind(conversation)
>     }
> })
> ```

> [tab] Jetpack Compose
>
> ```kotlin lines theme={null}
> CometChatConversations(
>     subtitleView = { conversation, typingIndicator ->
>         Text(conversation.lastMessage?.text ?: "")
>     }
> )
> ```

### Styles

See [Component Styling](https://www.cometchat.com/docs/ui-kit/android/component-styling.md).

> [tab] Kotlin (XML Views)
>
> XML theme attributes in `themes.xml`:
>
> ```xml lines theme={null}
> <style name="AppTheme" parent="CometChatTheme.DayNight">
>     <item name="cometchatConversationsStyle">@style/CustomConversationsStyle</item>
> </style>
> ```

> [tab] Jetpack Compose
>
> Style data classes via parameters:
>
> ```kotlin lines theme={null}
> CometChatConversations(
>     style = CometChatConversationsStyle.default().copy(
>         backgroundColor = Color(0xFFF5F5F5)
>     )
> )
> ```

### Events

Global inter-component communication via `CometChatEvents`:

```kotlin lines theme={null}
// Subscribe to message events
viewModelScope.launch {
    CometChatEvents.messageEvents.collect { event ->
        when (event) {
            is CometChatMessageEvent.MessageSent -> { /* handle */ }
            is CometChatMessageEvent.MessageDeleted -> { /* handle */ }
            else -> {}
        }
    }
}
```

See [Events](https://www.cometchat.com/docs/ui-kit/android/events.md) for the full reference.

***

## Next Steps

> [card] [Core Features](https://www.cometchat.com/docs/ui-kit/android/core-features.md)
>
> Chat features included out of the box

> [card] [Theming](https://www.cometchat.com/docs/ui-kit/android/theme-introduction.md)
>
> Customize colors, fonts, and styles

> [card] [Customization](https://www.cometchat.com/docs/ui-kit/android/customization-overview.md)
>
> Deep customization via ViewModels, styles, and view slots

> [card] [Guides](https://www.cometchat.com/docs/ui-kit/android/guide-overview.md)
>
> Task-oriented tutorials for common patterns


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.