> ## 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 every prebuilt component in the CometChat iOS UI Kit v6, and the API pattern they share in the SwiftUI and UIKit toolkits.

> [accordion] AI Integration Quick Reference
>
> | Field | Value |
> | - | - |
> | Products | `CometChatSwiftUI` (SwiftUI views), `CometChatUIKit` (UIKit view controllers and views) — one per app |
> | Required setup | `CometChatSession.initialize(appID:region:)` + `CometChatSession.login(uid:authKey:)` before rendering any component |
> | Shared core | `CometChatCore` — stores, value types, policies, events (shared by both toolkits) |
> | Calling | `CometChatSession.initialize(appID:region:enableCalling: true)` |

## 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` — bar 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 an SDK `Conversation` whose `conversationWith` is a `User` or a `Group`.
Pass it to the message components to load the chat.

Each component's state lives in a **store** in `CometChatCore` — `ConversationsStore`,
`MessageListStore` and so on — which both toolkits render, so the two can never disagree about *what* to
show. Components talk to each other through the Kit's event bus. See [Events](https://www.cometchat.com/docs/ui-kit/ios/v6/events.md).

> [tab] SwiftUI
>
> In `CometChatSwiftUI`, components are SwiftUI `View`s, configured through initialiser parameters and
> modifiers that cascade to everything below them. Callbacks speak SDK types.

> [tab] UIKit
>
> In `CometChatUIKit`, list components are `open` view controllers and the message components are
> `UIView`s, configured through properties, fluent `set(...)` setters, delegates and subclassing.

***

## Component Catalog

Every component exists in both toolkits unless the table says otherwise.

### Conversations and Lists

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

### Messages

| Component | Purpose | Page |
| - | - | - |
| `CometChatMessageHeader` | Bar with avatar, name, status, typing | [Message Header](https://www.cometchat.com/docs/ui-kit/ios/v6/message-header.md) |
| `CometChatMessageList` | Message feed with reactions, receipts, threads | [Message List](https://www.cometchat.com/docs/ui-kit/ios/v6/message-list.md) |
| `CometChatMessageComposer` | Rich input with attachments, mentions, voice | [Message Composer](https://www.cometchat.com/docs/ui-kit/ios/v6/message-composer.md) |
| `CometChatThreadHeader` | Parent message bubble and reply count | [Thread Header](https://www.cometchat.com/docs/ui-kit/ios/v6/thread-header.md) |
| `CometChatPinnedMessages` | Full-screen list of a conversation's pinned messages | [Pinned Messages](https://www.cometchat.com/docs/ui-kit/ios/v6/pinned-messages.md) |
| `CometChatSavedMessages` | Full-screen, private list of the user's saved messages | [Saved Messages](https://www.cometchat.com/docs/ui-kit/ios/v6/saved-messages.md) |
| `CometChatMessageInformation` | Delivery and read receipts for one sent message | [Message Information](https://www.cometchat.com/docs/ui-kit/ios/v6/message-information.md) |
| `CometChatReactionList` | Who reacted to a message, by emoji | [Reaction List](https://www.cometchat.com/docs/ui-kit/ios/v6/reaction-list.md) |
| `CometChatCreatePoll` | The form for a new poll | [Create Poll](https://www.cometchat.com/docs/ui-kit/ios/v6/create-poll.md) |
| `CometChatStickerKeyboard` | The composer's sticker panel | [Sticker Keyboard](https://www.cometchat.com/docs/ui-kit/ios/v6/sticker-keyboard.md) |
| `CometChatEmojiKeyboard` | The emoji picker for reactions | [Emoji Keyboard](https://www.cometchat.com/docs/ui-kit/ios/v6/emoji-keyboard.md) |
| `CometChatFlagMessage` | The report-a-message dialog | [Flag Message](https://www.cometchat.com/docs/ui-kit/ios/v6/flag-message.md) |

### Calling

| Component | Purpose | Page |
| - | - | - |
| `CometChatCallButtons` | Voice and video call buttons | [Call Buttons](https://www.cometchat.com/docs/ui-kit/ios/v6/call-buttons.md) |
| `CometChatOutgoingCall` | Outgoing call screen | [Outgoing Call](https://www.cometchat.com/docs/ui-kit/ios/v6/outgoing-call.md) |
| `CometChatOngoingCall` | The call in progress | [Ongoing Call](https://www.cometchat.com/docs/ui-kit/ios/v6/ongoing-call.md) |
| `CometChatCallLogs` | Call history list | [Call Logs](https://www.cometchat.com/docs/ui-kit/ios/v6/call-logs.md) |
| `CometChatCallLogDetails` | One call's details and participants | [Call Log Details](https://www.cometchat.com/docs/ui-kit/ios/v6/call-log-details.md) |

> [!NOTE]
>
> There is no `CometChatIncomingCall` component. An incoming call rings through CallKit, with the CometChat
> Push Notifications SDK, and the call screen appears once it is answered. See
> [Calling Integration](https://www.cometchat.com/docs/ui-kit/ios/v6/calling-integration.md).

***

## Component API Pattern

All components share a consistent API surface in each toolkit. The examples use the conversation list and
the message components; every component follows the same shape.

### Setting User or Group

> [tab] SwiftUI
>
> ```swift theme={null}
> CometChatMessageHeader(user: user)
> CometChatMessageList(user: user)
> CometChatMessageComposer(user: user)
>
> // Or for group chat
> CometChatMessageHeader(group: group)
> CometChatMessageList(group: group)
> CometChatMessageComposer(group: group)
> ```

> [tab] UIKit
>
> ```swift theme={null}
> header.set(user: user)
> messageList.set(user: user)
> composer.set(user: user)
>
> // Or for group chat
> header.set(group: group)
> messageList.set(group: group)
> composer.set(group: group)
> ```

### Callbacks

> [tab] SwiftUI
>
> ```swift theme={null}
> CometChatConversations(
>     onItemClick: { conversation in open(conversation) },
>     onLoad: { conversations in print("loaded", conversations.count) },
>     onError: { error in report(error) }
> )
> ```

> [tab] UIKit
>
> ```swift theme={null}
> conversations
>     .set(onItemClick: { conversation, _ in openChat(conversation) })
>     .set(onLoad: { conversations in print("loaded", conversations.count) })
>     .set(onError: { error in print(error.errorDescription) })
> ```

### Data Filtering

Pass the SDK's request builder to choose what a list fetches. The closure runs for every fetch, so return
a new builder each time.

> [tab] SwiftUI
>
> ```swift theme={null}
> CometChatConversations(
>     conversationsRequestBuilder: {
>         ConversationRequest.ConversationRequestBuilder(limit: 20)
>             .setConversationType(conversationType: .user)
>     }
> )
> ```

> [tab] UIKit
>
> ```swift theme={null}
> let store = ConversationsStore(
>     conversationsRequestBuilder: {
>         ConversationRequest.ConversationRequestBuilder(limit: 20)
>             .setConversationType(conversationType: .user)
>     }
> )
> let filtered = CometChatConversations(conversationsStore: store)
> ```

### View Slots

Replace one region of a component's UI with your own view. See
[View Slots](https://www.cometchat.com/docs/ui-kit/ios/v6/customization-view-slots.md).

> [tab] SwiftUI
>
> A slot is an initialiser parameter, or a modifier that applies to every component below it:
>
> ```swift theme={null}
> CometChatConversations(
>     subtitleView: { conversation in AnyView(MySubtitle(conversation)) }
> )
> ```
>
> ```swift theme={null}
> .cometChatConversationSubtitleView { conversation in
>     MySubtitle(conversation)
> }
> ```

> [tab] UIKit
>
> A slot is a fluent setter that returns a `UIView`:
>
> ```swift theme={null}
> conversations.set(subtitleView: { conversation in
>     MySubtitleView(conversation: conversation)
> })
> ```

### Styles

Every component takes a style; anything you leave unset falls through to the theme. See
[Component Styling](https://www.cometchat.com/docs/ui-kit/ios/v6/component-styling.md).

> [tab] SwiftUI
>
> Style values are structs, passed as `style`:
>
> ```swift theme={null}
> CometChatConversations(
>     style: CometChatConversationsStyle(titleColor: .purple)
> )
> ```

> [tab] UIKit
>
> Style objects are classes, set per instance with `set(style:)` — or once for every instance through the
> class's static `style`:
>
> ```swift theme={null}
> let style = ConversationsStyle()
> style.titleColor = .purple
> conversations.set(style: style)
> ```

### Events

Components publish what happens — a message sent, a user blocked, a group member added — so the rest of
your app can react. See [Events](https://www.cometchat.com/docs/ui-kit/ios/v6/events.md) for the full reference.

> [tab] SwiftUI
>
> Listen with a modifier, which stops listening when the view goes away:
>
> ```swift theme={null}
> .onCometChatMessageSent { message, status in
>     if status == .success { print("sent", message.id) }
> }
> ```

> [tab] UIKit
>
> Register a listener with an ID:
>
> ```swift theme={null}
> final class SentMessageObserver: NSObject, CometChatMessageEventListener {
>     func start() {
>         CometChatMessageEvents.addListener("sent-message-observer", self)
>     }
>
>     func ccMessageSent(message: BaseMessage, status: MessageStatus) {
>         if status == .success { print("sent", message.id) }
>     }
> }
> ```

***

## Next Steps

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

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

> [card] [Customization](https://www.cometchat.com/docs/ui-kit/ios/v6/customization-overview.md)
>
> Deep customization through stores, styles, and view slots

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


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