Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@
"group": "Chat",
"pages": [
"ui-kit/react-native/core-features",
"ui-kit/react-native/offline-support",
"ui-kit/react-native/extensions",
"ui-kit/react-native/ai-features"
]
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/react-native/compact-message-composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
export default CompactComposerDemo;
```

<Note>
With [offline support](/ui-kit/react-native/offline-support) on, text messages and voice notes sent without a connection are queued and sent when the connection returns, and the tray survives leaving the chat and an app restart. A file picked into the tray while offline is not queued: its upload fails, and you retry it from the tile once the connection returns. Editing a sent message needs a connection; a failed edit goes to `onError`. See [Sending messages](/ui-kit/react-native/offline-support#sending-messages) and [Attachments and media](/ui-kit/react-native/offline-support#attachments-and-media).
</Note>

---

## Actions and Events
Expand Down Expand Up @@ -84,7 +88,7 @@
}
```

#### onError

Check warning on line 91 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L91

Did you really mean 'onError'?

Fires on internal errors (network failure, auth issue, SDK exception).

Expand Down Expand Up @@ -158,7 +162,7 @@

### Global UI Events

`CometChatUIEventHandler` emits events subscribable from anywhere in the application. Add listeners and remove them on cleanup.

Check warning on line 165 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L165

Did you really mean 'subscribable'?

| Event | Fires when | Payload |
| --- | --- | --- |
Expand Down Expand Up @@ -291,7 +295,7 @@
|------|------|---------|-------------|
| `maxLines` | `number` | `5` | Maximum lines before scrolling is enabled |
| `minInputHeight` | `number` | `40` | Minimum height for the input in pixels |
| `maxInputHeight` | `number` | `144` (calculated from maxLines) | Maximum height for the input. Overrides `maxLines` if both provided |

Check warning on line 298 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L298

Did you really mean 'maxLines'?

```tsx lines
<CometChatCompactMessageComposer
Expand Down Expand Up @@ -320,9 +324,9 @@
| `addAttachmentOptions` | `CometChatMessageComposerAction[]` | Additional attachment options appended to defaults |
| `textFormatters` | `CometChatTextFormatter[]` | Text formatting in composer |

### textFormatters

Check warning on line 327 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L327

Did you really mean 'textFormatters'?

Custom text formatters for the composer input. To configure the existing Mentions look and feel check out [CometChatMentionsFormatter](/ui-kit/react-native/mentions-formatter-guide).

Check warning on line 329 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L329

Did you really mean 'formatters'?

```tsx lines
import {
Expand Down Expand Up @@ -350,7 +354,7 @@
);
```

### attachmentOptions

Check warning on line 357 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L357

Did you really mean 'attachmentOptions'?

Override the default attachment options with custom actions.

Expand Down Expand Up @@ -564,7 +568,7 @@
```

<Note>
The slot lives inside the toolbar, so it only renders while the toolbar is visible — `enableRichTextEditor` `true` and `hideRichTextFormattingOptions` `false`, which are the defaults. It does not appear in the native text selection menu. For a complete walkthrough with a swatch picker, see the [Text Color guide](/ui-kit/react-native/guide-text-color).

Check warning on line 571 in ui-kit/react-native/compact-message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/compact-message-composer.mdx#L571

Did you really mean 'walkthrough'?
</Note>

<Warning>
Expand Down
16 changes: 16 additions & 0 deletions ui-kit/react-native/conversations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,21 @@
"callbacks": {
"onItemPress": "(conversation: CometChat.Conversation) => void",
"onItemLongPress": "(conversation: CometChat.Conversation) => void",
"onBack": "() => void",

Check warning on line 31 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L31

Did you really mean 'onBack'?
"onSelection": "(conversations: Array<CometChat.Conversation>) => void",

Check warning on line 32 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L32

Did you really mean 'onSelection'?
"onError": "(error: CometChat.CometChatException) => void",

Check warning on line 33 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L33

Did you really mean 'onError'?
"onEmpty": "() => void",

Check warning on line 34 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L34

Did you really mean 'onEmpty'?
"onLoad": "(list: CometChat.Conversation[]) => void",

Check warning on line 35 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L35

Did you really mean 'onLoad'?
"onSearchBarClicked": "() => void",
"onSearchTextChanged": "(searchText: string) => void",
"onSubmit": "(conversations: Array<CometChat.Conversation>) => void"

Check warning on line 38 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L38

Did you really mean 'onSubmit'?
},
"visibility": {
"hideBackButton": { "type": "boolean", "default": true },
"hideHeader": { "type": "boolean", "default": false },
"pinConversationOptionVisibility": { "type": "boolean", "default": true },
"hideError": { "type": "boolean", "default": false },
"hideOfflineNotices": { "type": "boolean", "default": false, "note": "Offline support only" },
"receiptsVisibility": { "type": "boolean", "default": true },
"hideSubmitButton": { "type": "boolean", "default": true },
"usersStatusVisibility": { "type": "boolean", "default": true },
Expand Down Expand Up @@ -74,7 +75,7 @@
"SearchView": "() => JSX.Element"
},
"formatting": {
"textFormatters": {

Check warning on line 78 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L78

Did you really mean 'textFormatters'?
"type": "CometChatTextFormatter[]",
"default": "default formatters from data source"
}
Expand Down Expand Up @@ -209,6 +210,10 @@
export default ConversationsDemo;
```

<Note>
With [offline support](/ui-kit/react-native/offline-support) on, the list shows saved conversations at once, shows **Connect to load chats** when it is offline with nothing saved, and marks a conversation whose last message is waiting to send or failed. See [Lists](/ui-kit/react-native/offline-support#lists).
</Note>

---

## Filtering Conversations
Expand Down Expand Up @@ -287,7 +292,7 @@
}
```

#### onSelection

Check warning on line 295 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L295

Did you really mean 'onSelection'?

Fires when conversations are selected/deselected in selection mode. Requires `selectionMode` to be set.

Expand All @@ -309,7 +314,7 @@
}
```

#### onError

Check warning on line 317 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L317

Did you really mean 'onError'?

Fires on internal errors (network failure, auth issue, SDK exception).

Expand All @@ -328,7 +333,7 @@
}
```

#### onEmpty

Check warning on line 336 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L336

Did you really mean 'onEmpty'?

Fires when the conversation list is empty.

Expand All @@ -344,7 +349,7 @@
}
```

#### onLoad

Check warning on line 352 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L352

Did you really mean 'onLoad'?

Fires when the list is successfully fetched and loaded.

Expand All @@ -363,7 +368,7 @@

### Global UI Events

`CometChatUIEventHandler` emits events subscribable from anywhere in the application. Subscribe in a `useEffect` and unsubscribe on cleanup.

Check warning on line 371 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L371

Did you really mean 'subscribable'?

| Event | Fires when | Payload |
| --- | --- | --- |
Expand Down Expand Up @@ -425,7 +430,7 @@
</Warning>

`pinConversationOptionVisibility` (default `true`) hides the option on one particular list. It is
**ANDed** with the Dashboard flag, so the option renders only when both allow it.

Check warning on line 433 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L433

Did you really mean 'ANDed'?

<Tabs>
<Tab title="TypeScript">
Expand Down Expand Up @@ -790,7 +795,7 @@
}
```

### addOptions

Check warning on line 798 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L798

Did you really mean 'addOptions'?

Extends the default context menu actions with additional options.

Expand Down Expand Up @@ -818,7 +823,7 @@
}
```

### datePattern

Check warning on line 826 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L826

Did you really mean 'datePattern'?

Custom date format for displaying timestamps.

Expand Down Expand Up @@ -846,13 +851,13 @@
return `${day}, ${hours}:${minutes}`;
};

return <CometChatConversations datePattern={generateDateString} />;

Check warning on line 854 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L854

Did you really mean 'datePattern'?
}
```

### textFormatters

Check warning on line 858 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L858

Did you really mean 'textFormatters'?

Custom text formatters for the conversation subtitle.

Check warning on line 860 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L860

Did you really mean 'formatters'?

<Frame>
<img src="/images/55490fa9-mentions_conversations-1a7b847ad0af53848dc106216ac64e74.png" />
Expand Down Expand Up @@ -919,11 +924,11 @@
function MinimalConversations() {
return (
<CometChatConversations
receiptsVisibility={false}

Check warning on line 927 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L927

Did you really mean 'receiptsVisibility'?
usersStatusVisibility={false}
groupTypeVisibility={false}
deleteConversationOptionVisibility={false}
hideHeader={true}

Check warning on line 931 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L931

Did you really mean 'hideHeader'?
/>
);
}
Expand Down Expand Up @@ -1128,7 +1133,7 @@

---

### hideError

Check warning on line 1136 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L1136

Did you really mean 'hideError'?

Hides the error state view.

Expand All @@ -1150,6 +1155,17 @@

---

### hideOfflineNotices

With [offline support](/ui-kit/react-native/offline-support) running, hides the one-line offline notices the list shows for the whole session, such as unsent messages that were lost when the offline cache was rebuilt. Has no effect with offline support off.

| | |
| --- | --- |
| Type | `boolean` |
| Default | `false` |

---

### hideSubmitButton

Hides the submit button when selection mode is enabled.
Expand Down Expand Up @@ -1277,7 +1293,7 @@

| | |
| --- | --- |
| Type | `(searchText: string) => void` |

Check warning on line 1296 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L1296

Did you really mean 'searchText'?
| Default | `undefined` |

---
Expand All @@ -1295,7 +1311,7 @@

### onSubmit

Callback fired when the submit button is pressed. Requires `selectionMode` to be set.

Check warning on line 1314 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L1314

Did you really mean 'selectionMode'?

| | |
| --- | --- |
Expand Down Expand Up @@ -1372,12 +1388,12 @@

### textFormatters

Custom text formatters for the conversation subtitle.

Check warning on line 1391 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L1391

Did you really mean 'formatters'?

| | |
| --- | --- |
| Type | `CometChatTextFormatter[]` |
| Default | Default formatters from data source |

Check warning on line 1396 in ui-kit/react-native/conversations.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/conversations.mdx#L1396

Did you really mean 'formatters'?

---

Expand Down
12 changes: 12 additions & 0 deletions ui-kit/react-native/core-features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@

| Components | Functionality |
| --- | --- |
| [Message List](/ui-kit/react-native/message-list) | Adds Pin, Unpin, Save, and Unsave to the message options when the features are enabled. |

Check warning on line 160 in ui-kit/react-native/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/core-features.mdx#L160

Did you really mean 'Unsave'?
| [Pinned Messages](/ui-kit/react-native/pinned-messages) | A screen of the messages pinned in a conversation, opened from the [Message Header](/ui-kit/react-native/message-header). |
| [Saved Messages](/ui-kit/react-native/saved-messages) | A personal screen of the current user's saved messages across all conversations. |

Expand All @@ -169,7 +169,7 @@
| features.ux.messages.saved.limit | Saved messages per user |
| features.ux.conversations.pinned.limit | Pinned conversations per user |

The UI Kit reads these settings at login. When a user reaches a cap, the kit shows a toast that names the exact limit — no extra handling required. For a full walkthrough, see the [Pin & Save Messages guide](/ui-kit/react-native/guide-pin-and-save-messages).

Check warning on line 172 in ui-kit/react-native/core-features.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/core-features.mdx#L172

Did you really mean 'walkthrough'?

## Pin Conversations

Expand Down Expand Up @@ -291,6 +291,18 @@

For a comprehensive understanding and guide on implementing and using the Groups feature in CometChat, refer to the detailed guide on [Groups](/ui-kit/react-native/groups).

## Offline Support

Offline Support keeps chat usable without a network. Chats and messages the user has opened appear at once from the device, messages sent offline are queued and go out when the connection returns, and failed messages offer Retry and Delete. It is **off by default**: turn it on with the `offline` setting in `UIKitSettings` (UI Kit 5.6.0 and Chat SDK 4.2.0 or later).

| Components | Functionality |
| --- | --- |
| [Conversations](/ui-kit/react-native/conversations), [Users](/ui-kit/react-native/users), [Groups](/ui-kit/react-native/groups), [Group Members](/ui-kit/react-native/group-members) | Show saved rows first and merge the server's page in place; offline with nothing saved, show **Connect to load …**. |
| [Message List](/ui-kit/react-native/message-list) | Shows saved history, marks queued and failed messages, and offers **Connect to load more** at a blocked edge. |
| [Message Composer](/ui-kit/react-native/message-composer) | Queues messages sent offline and keeps staged attachments across restarts. Files picked into the tray while offline are not queued: retry their upload once online. |

See [Offline Support](/ui-kit/react-native/offline-support) for setup, native dependencies and the full behavior.

---

## Next Steps
Expand Down
4 changes: 3 additions & 1 deletion ui-kit/react-native/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
| Conversation events | `ccConversationDeleted`, `ccUpdateConversation` |
| User events | `ccUserBlocked`, `ccUserUnBlocked` |
| Group events | `ccGroupCreated`, `ccGroupDeleted`, `ccGroupLeft`, `ccGroupMemberScopeChanged`, `ccGroupMemberKicked`, `ccGroupMemberBanned`, `ccGroupMemberUnBanned`, `ccGroupMemberJoined`, `ccGroupMemberAdded`, `ccOwnershipChanged` |
| Message events | `ccMessageSent`, `ccMessageEdited`, `ccMessageDeleted`, `ccMessageRead`, `ccActiveChatChanged`, plus SDK listener events |
| Message events | `ccMessageSent`, `ccMessageEdited`, `ccMessageDeleted`, `ccMessageRead`, `ccActiveChatChanged`, plus SDK listener events. Offline support adds `OfflineMessageEvents.ccMessageSendStateChanged` and `OfflineMessageEvents.ccOfflineCacheReset` |
| Call events | `ccCallAccepted`, `ccCallRejected`, `ccCallEnded`, `ccOutgoingCall`, `ccCallFailed` |
| UI events | `ccCardActionClicked` |
| Purpose | Decoupled communication between UI Kit components — subscribe to events to react to changes without direct component references |
Expand Down Expand Up @@ -77,8 +77,10 @@
| ccActiveChatChanged | This event is triggered when the user navigates to a particular chat window. |
| ccMessageError | Triggers when the collaborative document or whiteboard extension fails to create its message, or when fetching stickers fails. Payload: the `CometChatException`. |
| ccMessagePinned / ccMessageUnpinned | Triggers when the user pins or unpins a message from the message list or the Pinned Messages panel. Payload: `{ message }`. |
| ccMessageSaved / ccMessageUnsaved | Triggers when the user saves or unsaves a message from the message list, Pinned Messages or Saved Messages. Payload: `{ message }`. |

Check warning on line 80 in ui-kit/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/events.mdx#L80

Did you really mean 'unsaves'?
| ccThreadSubscriptionChanged | Triggers when the user subscribes to or unsubscribes from a thread: on the optimistic change, on the server reply, and on a revert. Payload: `{ parentMessageId, subscribed, inProgress }`. |
| ccMessageSendStateChanged | [Offline support](/ui-kit/react-native/offline-support) only (UI Kit 5.6.0): an own message's send state changed. Payload: `{ message, state, reason? }`, where `state` is `"sending"`, `"sent"`, `"failed"` or `"discarded"`. The name is on `OfflineMessageEvents`. Never emitted with offline support off. |
| ccOfflineCacheReset | [Offline support](/ui-kit/react-native/offline-support) only (UI Kit 5.6.0): the Chat SDK rebuilt its offline cache. Payload: `{ reason, pendingMessagesLost }`. The name is on `OfflineMessageEvents`. Never emitted with offline support off. |
| onTextMessageReceived | This event is emitted when the CometChat SDK listener emits a text message. |
| onMediaMessageReceived | This event is emitted when the CometChat SDK listener emits a media message. |
| onCustomMessageReceived | This event is emitted when the CometChat SDK listener emits a custom message. |
Expand All @@ -93,7 +95,7 @@
| onFormMessageReceived | This event is emitted when an interactive message of 'form' type is received from the CometChat SDK listener. |
| onCardMessageReceived | This event is emitted when a card message (`category: "card"`) is received from the CometChat SDK listener. Used by the Card message bubble to render developer-defined cards. |
| onSchedulerMessageReceived | This event is emitted when an interactive message of 'scheduler' type is received from the CometChat SDK listener. |
| onCustomInteractiveMessageReceived | This event is emitted when an interactive message of 'customInteractive' type is received from the CometChat SDK listener. |

Check warning on line 98 in ui-kit/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/events.mdx#L98

Did you really mean 'customInteractive'?

### CallUIEvents

Expand Down Expand Up @@ -139,7 +141,7 @@
| Name | Description |
| ------------------- | ---------------------------------------------------------------------------- |
| ccCardActionClicked | This event is triggered when the user clicks an action on a card message bubble. The event payload contains the `message` and the clicked `action`. |
| openChat | Triggers when the user picks "Message privately" on a group message. Emitted with `emitUIEvent`. Payload: `{ user }`. |

Check warning on line 144 in ui-kit/react-native/events.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/events.mdx#L144

Did you really mean 'openChat'?


---
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/react-native/expo-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| Field | Value |
| --- | --- |
| Package | `@cometchat/chat-uikit-react-native` |
| Peer deps | `expo` SDK 50+, `@cometchat/chat-sdk-react-native` |

Check warning on line 12 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L12

Did you really mean 'deps'?
| Init | `CometChatUIKit.init(UIKitSettings)` — must resolve before `login()` |
| Login | `CometChatUIKit.login({ uid })` — must resolve before rendering components |
| Order | `init()` → `login()` → render. Breaking this order = blank screen |
Expand Down Expand Up @@ -44,11 +44,11 @@
/cometchat add chat to my app
```

The skill detects your Expo setup (managed workflow + Expo Router), env prefix (`EXPO_PUBLIC_`), and existing auth system. It onboards you to CometChat directly in the terminal — signup, login, and app creation all via the CLI. It reads your screens, nav, and components before proposing a placement, shows the plan, and waits for your approval before writing code.

Check warning on line 47 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L47

Did you really mean 'onboards'?

Check warning on line 47 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L47

Did you really mean 'signup'?

After the first integration, re-run `/cometchat` to access the iteration menu: theme presets, 40+ features, component customization, push notifications, production auth, user management, and diagnostics.

Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and [30+ more agents](https://github.com/cometchat/cometchat-skills).

Check warning on line 51 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L51

Did you really mean 'Kiro'?

---

Expand All @@ -64,7 +64,7 @@

You also need:
- Node.js 22.13+ (or 24.3+) and npm/yarn installed (the minimum the current Expo SDK, 58, requires)
- Xcode (for iOS) and Android Studio (for Android) for development builds

Check warning on line 67 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L67

Did you really mean 'Xcode'?

<Warning>
Auth Key is for development only. In production, generate Auth Tokens server-side via the [REST API](/rest-api/chat-apis) and use [`loginWithAuthToken()`](/ui-kit/react-native/methods#how-to-login-a-user-with-auth-token). Never ship Auth Keys in client code.
Expand Down Expand Up @@ -210,11 +210,15 @@
</Tab>
</Tabs>

<Note>
**Optional: offline support.** To show saved chats without a connection and queue messages sent offline, add `offline: { enabled: true }` to `uiKitSettings`. It needs UI Kit 5.6.0 and Chat SDK 4.2.0 or later and the `@op-engineering/op-sqlite` native module, so it runs in a development build or after `expo prebuild`, not in Expo Go. See [Offline Support](/ui-kit/react-native/offline-support).
</Note>

---

## Step 4 — Login

After init resolves, log the user in. For development, use one of the pre-created test UIDs:

Check warning on line 221 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L221

Did you really mean 'UIDs'?

`cometchat-uid-1` · `cometchat-uid-2` · `cometchat-uid-3` · `cometchat-uid-4` · `cometchat-uid-5`

Expand Down Expand Up @@ -306,12 +310,12 @@
<Tabs>
<Tab title="iOS">
```bash
npx expo run:ios

Check warning on line 313 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L313

Did you really mean 'npx'?
```
</Tab>
<Tab title="Android">
```bash
npx expo run:android

Check warning on line 318 in ui-kit/react-native/expo-integration.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/expo-integration.mdx#L318

Did you really mean 'npx'?
```
</Tab>
</Tabs>
Expand Down
1 change: 1 addition & 0 deletions ui-kit/react-native/llms-react-native-v5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@
1:1. Non-negotiables:
- **No CSS, no `className`, no `<div>`/`<a href>`, no `document.*`/`window.*`.** Styling is
`StyleSheet` objects and the theme API — see [Theming](/ui-kit/react-native/theme).
- **Native peer deps are required**, not optional. As of

Check warning on line 38 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L38

Did you really mean 'deps'?
`@cometchat/chat-uikit-react-native@5.5.2` the peers are `@cometchat/chat-sdk-react-native`,
`@react-native-clipboard/clipboard`, `react-native-gesture-handler`, `react-native-svg`,
`react-native-video`, `react-native-localize` and `react-native-safe-area-context`
(+ `punycode` on Expo). Install and pod-install them before first render; a missing native
module fails at mount, not at build. Take the exact list from the integration page — do not
infer it.
- **Async-storage at `^2.1.2`, no extra Gradle repository.** Install

Check warning on line 45 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L45

Did you really mean 'Gradle'?
`@react-native-async-storage/async-storage@^2.1.2` in the base step (the range the Calls SDK
declares, so it works for chat and calling). 2.x autolinks, so the old `local_repo` entry

Check warning on line 47 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L47

Did you really mean 'autolinks'?
in `android/build.gradle` is not needed.
- **Calling peers go in at their declared ranges.** `@cometchat/calls-sdk-react-native` declares
`@react-native-async-storage/async-storage@^2.1.2`, `react-native-webrtc@^155.0.1`,
`react-native-background-timer@^2.4.1`, `react-native-performance@^5.1.2`,
`react-native-url-polyfill@^2.0.0` and `react-native-svg@^15.12.0` — install them at those
ranges in the same command (use `react-native-svg@^15.16.0`, the first whose podspec targets iOS 15.1) (unpinned latest majors fail with `ERESOLVE`). See

Check warning on line 53 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L53

Did you really mean 'podspec'?
[Calling Integration](/ui-kit/react-native/calling-integration).
- **One screen per route.** Use a stack navigator and a real hardware/gesture back button —
do not stack components on a single screen the way a web layout would.
- **Two toolchains, different setup:** React Native CLI (bare) and Expo. Pick the matching

Check warning on line 57 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L57

Did you really mean 'toolchains'?
integration page below; the install/native-config steps differ.
- **No plugin API.** React v7's `CometChatMessagePlugin` and `CometChatPluginRegistry` **do not
exist in this kit** — emitting them will not compile. RN customises through a **decorator
Expand All @@ -67,7 +67,7 @@
## Hot path — usually no fetch needed
For a plain "add chat" the install, `init → login → render`, and the core drop-in props are
stable; a well-built agent skill bakes them. Fetch below only for exhaustive props, long-tail
components, theming tokens, or feature enablement.

Check warning on line 70 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L70

Did you really mean 'enablement'?
- Setup (bare): [React Native CLI Integration](/ui-kit/react-native/react-native-cli-integration)
- Setup (Expo): [Expo Integration](/ui-kit/react-native/expo-integration)
- Core drop-ins: [Conversations](/ui-kit/react-native/conversations) · [Message Header](/ui-kit/react-native/message-header) · [Message List](/ui-kit/react-native/message-list) · [Message Composer](/ui-kit/react-native/message-composer)
Expand All @@ -81,6 +81,7 @@

## Core & configuration
- [Core Features](/ui-kit/react-native/core-features)
- [Offline Support](/ui-kit/react-native/offline-support)
- [Methods](/ui-kit/react-native/methods)
- [Events](/ui-kit/react-native/events)
- [Sound Manager](/ui-kit/react-native/sound-manager)
Expand Down Expand Up @@ -127,7 +128,7 @@
`CometChatMessageTemplate` → [Custom Message Types](/ui-kit/react-native/custom-message-types).
Needs **five** overrides: `getAllMessageTemplates` · `getMessageTemplate` (render),
`getAllMessageTypes` · `getAllMessageCategories` (fetch — the list builds `setTypes`/`setCategories`
from them) **and** `getId` (identity — `enable()` dedupes on it). Shipping only the render pair

Check warning on line 131 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L131

Did you really mean 'dedupes'?
gives a bubble that appears on send and **vanishes on reload, with no error**; omitting `getId`
or calling `super.getId()` throws `Method not implemented.` at registration, while returning
`this.dataSource.getId()` makes `enable()` skip the decorator **silently**. Register after `login()`.
Expand All @@ -143,7 +144,7 @@
`ExtensionsDataSource` route through `uiKitSettings.extensions` and the `enable()` override it needs.
</Note>

## Text formatters

Check warning on line 147 in ui-kit/react-native/llms-react-native-v5.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/llms-react-native-v5.mdx#L147

Did you really mean 'formatters'?
- [Custom Text Formatter](/ui-kit/react-native/custom-text-formatter-guide)
- [Mentions Formatter](/ui-kit/react-native/mentions-formatter-guide)
- [ShortCut Formatter](/ui-kit/react-native/shortcut-formatter-guide)
Expand Down
30 changes: 30 additions & 0 deletions ui-kit/react-native/localize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
| Override strings | `translations={{ "en": { CHATS: "My Chats" } }}` — key on the language code the kit resolves to |
| Add language | `translations={{ "custom": { CHATS: "Welcome" } }}` with `selectedLanguage="custom"` |
| Use in components | `const { t } = useCometChatTranslation(); t("CHATS")` |
| Supported languages | 18: en, zh, zh-tw, es, hi, ru, pt, ms, fr, de, sv, lt, hu, it, ko, ja, nl, tr (plus `en-US`, `en-GB`, `en-IN` aliases of `en`) |

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'zh'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'ru'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'sv'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'lt'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'hu'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'ko'?

Check warning on line 19 in ui-kit/react-native/localize.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/localize.mdx#L19

Did you really mean 'nl'?
| Dependency | Requires `react-native-localize` package for auto-detection |

</Accordion>
Expand Down Expand Up @@ -213,6 +213,36 @@

CometChat UI Kit provides a `useCometChatTranslation` hook to access translations within components, which can be used when developing custom components.

### Offline Strings

UI Kit 5.6.0 adds the texts of [offline support](/ui-kit/react-native/offline-support), translated in all 18 languages. They appear only while offline support is running. Override them like any other key. Keys ending in `_ONE` and `_OTHER` are the singular and plural forms of one text, chosen from the count for the current language; `{count}` is replaced with the number, so override both forms. See [Offline States and Texts](/ui-kit/react-native/offline-support#offline-states-and-texts) for where each text appears.

| Key | English text |
| --- | --- |
| `OFFLINE_MESSAGE_NOT_SENT_YET` | Not sent yet |
| `OFFLINE_MESSAGE_NOT_SENT_TAP_TO_RETRY` | Not sent. Tap to retry |
| `OFFLINE_UNSENT_MESSAGE_REMOVED` | 1 unsent message was removed |
| `OFFLINE_MESSAGES_NOT_SENT_ONE` | \{count\} message wasn't sent |
| `OFFLINE_MESSAGES_NOT_SENT_OTHER` | \{count\} messages weren't sent |
| `OFFLINE_UNSENT_MESSAGES_LOST_ONE` | \{count\} unsent message couldn't be recovered |
| `OFFLINE_UNSENT_MESSAGES_LOST_OTHER` | \{count\} unsent messages couldn't be recovered |
| `OFFLINE_UNSENT_MESSAGES_MAYBE_LOST` | Some unsent messages may not have been sent |
| `OFFLINE_QUEUE_FULL` | Too many messages waiting to send |
| `OFFLINE_FILE_TOO_LARGE` | File too large to send offline |
| `OFFLINE_CONNECT_TO_LOAD_MORE` | Connect to load more |
| `OFFLINE_CONNECT_TO_SEARCH` | Connect to search |
| `OFFLINE_CONNECT_TO_SEARCH_MESSAGES` | Connect to search |
| `OFFLINE_CONNECT_TO_SEARCH_SUBTITLE` | Search needs an internet connection. |
| `OFFLINE_CONNECT_TO_LOAD_USERS` | Connect to load users |
| `OFFLINE_CONNECT_TO_LOAD_GROUPS` | Connect to load groups |
| `OFFLINE_CONNECT_TO_LOAD_CHATS` | Connect to load chats |
| `OFFLINE_CONNECT_TO_LOAD_MEMBERS` | Connect to load members |
| `OFFLINE_CONNECT_TO_LOAD_MESSAGES` | Connect to load messages |
| `OFFLINE_CONNECT_TO_LOAD_REACTIONS` | Connect to load reactions |
| `OFFLINE_CONNECT_TO_LOAD_NOTIFICATIONS` | Connect to load notifications |
| `OFFLINE_MEDIA_AVAILABLE_WHEN_ONLINE` | Available when online |
| `OFFLINE_SEND_IN_FLIGHT` | Sending… try again in a moment |

---

## Methods
Expand Down
4 changes: 4 additions & 0 deletions ui-kit/react-native/message-composer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

### Tray tile states

| State | Meaning | Tile UI | Retryable |

Check warning on line 62 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L62

Did you really mean 'Retryable'?
| --- | --- | --- | --- |
| `UPLOADING` | Bytes are transferring | Progress overlay with percentage | — |
| `COMPLETED` | Uploaded, ready to send | Thumbnail (image/video first frame) or file/audio card | — |
Expand All @@ -68,6 +68,10 @@

**Failed** uploads are transient and can be retried; **rejected** files must be swapped out.

<Note>
With [offline support](/ui-kit/react-native/offline-support) on, text messages and voice notes sent without a connection are queued and sent when the connection returns, and the tray survives leaving the chat and an app restart. A file picked into the tray while offline is not queued: its upload fails, and you retry it from the tile once the connection returns. Editing a sent message needs a connection; a failed edit goes to `onError`. See [Sending messages](/ui-kit/react-native/offline-support#sending-messages) and [Attachments and media](/ui-kit/react-native/offline-support#attachments-and-media).
</Note>

### Attachment limits

- **Count** — a batch holds up to a server-configured maximum (default **10**, from the `file.count.max` app setting, resolved at runtime). The limit is **all-or-nothing**: if a pick would push the tray past the maximum, the **entire new selection is rejected** — nothing is staged — and a toast explains the limit. Already-staged files are untouched.
Expand Down Expand Up @@ -198,7 +202,7 @@
}
```

#### onError

Check warning on line 205 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L205

Did you really mean 'onError'?

Fires on internal errors (network failure, auth issue, SDK exception).

Expand Down Expand Up @@ -247,7 +251,7 @@

### Global UI Events

`CometChatUIEventHandler` emits events subscribable from anywhere in the application. Add listeners and remove them on cleanup.

Check warning on line 254 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L254

Did you really mean 'subscribable'?

| Event | Fires when | Payload |
| --- | --- | --- |
Expand Down Expand Up @@ -302,9 +306,9 @@
| `attachmentOptions` | `CometChatMessageComposerAction[]` | Default attachment options list |
| `textFormatters` | `CometChatTextFormatter[]` | Text formatting in composer |

### textFormatters

Check warning on line 309 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L309

Did you really mean 'textFormatters'?

Custom text formatters for the composer input. To configure the existing Mentions look and feel check out [CometChatMentionsFormatter](/ui-kit/react-native/mentions-formatter-guide).

Check warning on line 311 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L311

Did you really mean 'formatters'?

```tsx lines
import {
Expand Down Expand Up @@ -336,7 +340,7 @@
<img src="/images/b2f00911-mentions_message_composer-b1d1dd7961bc3c2953e7439bb516200b.png" />
</Frame>

### attachmentOptions

Check warning on line 343 in ui-kit/react-native/message-composer.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-composer.mdx#L343

Did you really mean 'attachmentOptions'?

Override the default attachment options with custom actions.

Expand Down
16 changes: 16 additions & 0 deletions ui-kit/react-native/message-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,20 @@
},
"callbacks": {
"onThreadRepliesPress": "(messageObject: CometChat.BaseMessage, messageBubbleView: () => JSX.Element | null) => void",
"onError": "(error: CometChat.CometChatException) => void",

Check warning on line 30 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L30

Did you really mean 'onError'?
"onReactionPress": "(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void",
"onReactionLongPress": "(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void",
"onReactionListItemPress": "(reaction: CometChat.Reaction, messageObject: CometChat.BaseMessage) => void",
"onAddReactionPress": "() => void",
"onSuggestedMessageClick": "(suggestion: string) => void",
"onLoad": "(messageList: CometChat.BaseMessage[]) => void",

Check warning on line 36 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L36

Did you really mean 'onLoad'?
"onEmpty": "() => void"
},
"visibility": {
"receiptsVisibility": { "type": "boolean", "default": true },
"avatarVisibility": { "type": "boolean", "default": true },
"hideError": { "type": "boolean", "default": false },
"hideOfflineNotices": { "type": "boolean", "default": false, "note": "Offline support only" },
"hideTimestamp": { "type": "boolean", "default": false },
"hideReplyOption": { "type": "boolean", "default": false },
"hideReplyInThreadOption": { "type": "boolean", "default": false },
Expand Down Expand Up @@ -129,7 +130,7 @@

## Where It Fits

`CometChatMessageList` renders a scrollable, real-time message feed for a user or group conversation. Wire it alongside `CometChatMessageHeader` and `CometChatMessageComposer` to build a standard chat view.

Check warning on line 133 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L133

Did you really mean 'scrollable'?

```tsx lines
import { useState, useEffect } from "react";
Expand Down Expand Up @@ -193,6 +194,10 @@
Simply adding the `CometChatMessageList` component to the layout will result in an error. To fetch messages, you need to supplement it with `user` or `group` prop.
</Warning>

<Note>
With [offline support](/ui-kit/react-native/offline-support) on, the list shows saved messages at once, marks own messages that are waiting to send (**Not sent yet**) or failed (**Not sent. Tap to retry**, with Retry and Delete), and shows **Connect to load more** where older messages need a connection. See [Message list and threads](/ui-kit/react-native/offline-support#message-list-and-threads).
</Note>

---

## Multi-Attachment Batch Grouping
Expand Down Expand Up @@ -251,7 +256,7 @@
`getId` is the exception: it must **not** call `super`. The base implementation throws
`Method not implemented.`, so omitting the override crashes at `ChatConfigurator.enable()` with a
message that names neither `getId` nor your decorator. Returning the wrapped source's id is worse —
`enable()` dedupes on the id, finds it already registered, and skips your decorator **silently**.

Check warning on line 259 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L259

Did you really mean 'dedupes'?
Return an id unique to your decorator. See
[Custom Message Types](/ui-kit/react-native/custom-message-types) for the full contract.

Expand Down Expand Up @@ -381,7 +386,7 @@

### Global UI Events

`CometChatUIEventHandler` emits events subscribable from anywhere in the application. Subscribe in a `useEffect` and unsubscribe on cleanup.

Check warning on line 389 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L389

Did you really mean 'subscribable'?

| Event | Fires when | Payload |
| --- | --- | --- |
Expand Down Expand Up @@ -445,7 +450,7 @@
| `hidePinMessageOption` | `false` | Pin message |
| `hideUnpinMessageOption` | `false` | Unpin message |
| `hideSaveMessageOption` | `false` | Save message |
| `hideUnsaveMessageOption` | `false` | Unsave message |

Check warning on line 453 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L453

Did you really mean 'Unsave'?
| `hideThreadSubscriptionOption` | `false` | Subscribe to thread / Unsubscribe from thread |

<Warning>
Expand All @@ -469,15 +474,15 @@
ThreadSubscriptionConfig.setEnabled(false);
```

It is **on** by default, matching React. The global switch and the per-instance props are ANDed, so

Check warning on line 477 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L477

Did you really mean 'ANDed'?
the option appears only when this is enabled *and* the list does not hide it. `ThreadSubscriptionConfig
.isEnabled()` reads the current value.

The Dashboard flag and the per-instance prop are **ANDed**: the Dashboard decides whether a feature is

Check warning on line 481 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L481

Did you really mean 'ANDed'?
available to your app at all, and these props hide it on one particular list.

<Note>
**Removing asks, adding does not.** Unpin and Unsave show a confirmation; Pin and Save run

Check warning on line 485 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L485

Did you really mean 'Unsave'?
immediately. The asymmetry is deliberate and shared across all CometChat UI Kits — the additive
action has its own undo one tap away, the destructive one does not.
</Note>
Expand Down Expand Up @@ -507,7 +512,7 @@
| `ErrorView` | `() => JSX.Element` | Error state |
| `NewMessageIndicatorView` | `() => JSX.Element` | New messages indicator |
| `templates` | `CometChatMessageTemplate[]` | Message bubble rendering |
| `textFormatters` | `CometChatTextFormatter[]` | Text formatting in messages |

Check warning on line 515 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L515

Did you really mean 'textFormatters'?

### HeaderView

Expand Down Expand Up @@ -640,7 +645,7 @@
}
```

### datePattern

Check warning on line 648 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L648

Did you really mean 'datePattern'?

Custom format for message timestamps.

Expand Down Expand Up @@ -673,7 +678,7 @@

### textFormatters

Custom text formatters for message content.

Check warning on line 681 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L681

Did you really mean 'formatters'?

<Frame>
<img src="/images/e2732868-mentions_message_bubble-fccf9cbdd63a54c2f734803e4480418a.png" />
Expand Down Expand Up @@ -733,8 +738,8 @@
| `onReactionPress` | `(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void` | Called when a pill is tapped. |
| `onReactionLongPress` | `(reaction: CometChat.ReactionCount, messageObject: CometChat.BaseMessage) => void` | Called when a pill is long pressed — the list uses this to open `CometChatReactionList`. |
| `alignment` | `"left" \| "right" \| "center"` | Which edge the row hugs. Defaults to left. |
| `maxContentWidth` | `number` | Width budget in px. Without it the row shows at most 3 pills; with it, as many as fit. |

Check warning on line 741 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L741

Did you really mean 'px'?
| `style` | `DeepPartial<CometChatTheme["messageBubbleReactionStyles"]>` | **Not** merged over the theme: the component reads `style` directly, so without it the pills render unstyled. Pass the same styles the message list uses, `theme.messageListStyles.outgoingMessageBubbleStyles.reactionStyles` (or `incomingMessageBubbleStyles.reactionStyles`), spreading your overrides over it. The root `theme.messageBubbleReactionStyles` is not set by the default theme. |

Check warning on line 742 in ui-kit/react-native/message-list.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/message-list.mdx#L742

Did you really mean 'unstyled'?

```tsx lines
import { CometChat } from "@cometchat/chat-sdk-react-native";
Expand Down Expand Up @@ -1193,6 +1198,17 @@

---

### hideOfflineNotices

With [offline support](/ui-kit/react-native/offline-support) running, hides all the one-line offline notices, such as an unsent message was removed, the outbox is full, a file is too large to send offline, **Sending… try again in a moment**, **Available when online**, and the cache was rebuilt or unsent messages were lost. The **Not sent** rows, the offline states and **Connect to load more** still show. Has no effect with offline support off.

| | |
| --- | --- |
| Type | `boolean` |
| Default | `false` |

---

### hideMessageInfoOption

Hides the message info option.
Expand Down
39 changes: 39 additions & 0 deletions ui-kit/react-native/methods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
| Package | `@cometchat/chat-uikit-react-native` |
| Import | `import { CometChatUIKit, UIKitSettings } from "@cometchat/chat-uikit-react-native";` |
| Init | `CometChatUIKit.init(UIKitSettings)` |
| Offline (optional) | `offline: { enabled: true }` in `UIKitSettings` — see [Offline Support](/ui-kit/react-native/offline-support) |
| Login (dev) | `CometChatUIKit.login({ uid: "UID" })` |

Check warning on line 15 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L15

Did you really mean 'uid'?
| Login (prod) | `CometChatUIKit.login({ authToken: "AUTH_TOKEN" })` |
| Other methods | `CometChatUIKit.logout()`, `CometChatUIKit.createUser(user)`, `CometChatUIKit.updateUser(user)` |
| Send messages | `CometChatUIKit.sendTextMessage()`, `CometChatUIKit.sendMediaMessage()`, `CometChatUIKit.sendCustomMessage()` |
Expand Down Expand Up @@ -47,7 +48,7 @@
```js
import { CometChatUIKit, UIKitSettings } from "@cometchat/chat-uikit-react-native";

const uikitSettings = new UIKitSettings({

Check warning on line 51 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L51

Did you really mean 'uikitSettings'?
appId: "APP_ID", // Replace with your App ID
region: "REGION", // Replace with your App Region ("eu" or "us")
authKey: "AUTH_KEY", // Replace with your Auth Key (optional for Auth Token flow)
Expand All @@ -64,6 +65,35 @@
</Tab>
</Tabs>

#### Init with offline support

Add the `offline` setting to keep chats and messages available without a connection and to queue messages sent while offline. It is off by default. It needs UI Kit 5.6.0 and Chat SDK 4.2.0 or later, with `@op-engineering/op-sqlite` installed in your app. See [Offline Support](/ui-kit/react-native/offline-support) for the requirements and the full behavior.

<Tabs>
<Tab title="JavaScript">
```js
import { CometChatUIKit, UIKitSettings } from "@cometchat/chat-uikit-react-native";

const uikitSettings = new UIKitSettings({
appId: "APP_ID",
region: "REGION",
authKey: "AUTH_KEY",
offline: { enabled: true }, // or `true`, or a CometChat.OfflineConfig
});

CometChatUIKit.init(uikitSettings)
.then(() => {
console.log("Initialization completed successfully");
})
.catch((error) => {
console.log("Initialization failed with exception:", error);
});
```
</Tab>
</Tabs>

The UI Kit hands `offline` to the Chat SDK. Offline support runs only after a user logs in; check `CometChat.isOfflineEnabled()` to see whether it is running. If you initialize with `CometChatUIKit.initFromSettings(settings, offline?)`, pass the same value as the second argument or set `chatSDK.offline` in the settings.

---

### Login using Auth Key
Expand All @@ -75,7 +105,7 @@
```js
import { CometChatUIKit } from "@cometchat/chat-uikit-react-native";

const uid = "user_uid";

Check warning on line 108 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L108

Did you really mean 'user_uid'?

CometChatUIKit.login({ uid: uid })
.then((user) => {
Expand Down Expand Up @@ -132,6 +162,10 @@
</Tab>
</Tabs>

<Note>
With [offline support](/ui-kit/react-native/offline-support) running, logout also deletes the user's offline cache on the device: cached chats and messages, cached media and messages still waiting to be sent. The UI Kit clears its lists and composer trays. See [Logout and user switch](/ui-kit/react-native/offline-support#logout-and-user-switch).
</Note>

---

### Create User
Expand Down Expand Up @@ -196,6 +230,10 @@

## Sending Messages

<Note>
With [offline support](/ui-kit/react-native/offline-support) running, a message sent without a connection is queued on the device and sent when the connection returns. The promise returned by `sendTextMessage`, `sendMediaMessage` and `sendCustomMessage` resolves when the message reaches the server, also after it was queued, and never rejects just because the message was queued. If the user logs out or switches user before a queued message is sent, it rejects once with the error code `ERROR_OFFLINE_MESSAGE_DISCARDED`. A queued message that is later dropped (deleted by the user, evicted by an outbox overflow, removed with its conversation or lost in a cache reset the SDK can count) rejects with `DISCARDED`. See [Errors and Callbacks](/ui-kit/react-native/offline-support#errors-and-callbacks).
</Note>

### Text Message

Sends a text message in a 1:1 or group chat.
Expand Down Expand Up @@ -243,13 +281,13 @@
} from "@cometchat/chat-uikit-react-native";

const receiverID = "uid";
const messageType = CometChatUiKitConstants.MessageTypeConstants.file;

Check warning on line 284 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L284

Did you really mean 'messageType'?
const receiverType = CometChatUiKitConstants.ReceiverTypeConstants.user;

Check warning on line 285 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L285

Did you really mean 'receiverType'?
const mediaMessage = new CometChat.MediaMessage(

Check warning on line 286 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L286

Did you really mean 'mediaMessage'?
receiverID,
`INPUT FILE OBJECT`,
messageType,

Check warning on line 289 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L289

Did you really mean 'messageType'?
receiverType

Check warning on line 290 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L290

Did you really mean 'receiverType'?
);

CometChatUIKit.sendMediaMessage(mediaMessage)
Expand Down Expand Up @@ -315,22 +353,22 @@

const receiverID = "UID";

// Create an instance of APIAction

Check warning on line 356 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L356

Did you really mean 'APIAction'?
let apiAction = new APIAction("https://example.com/api", "POST");

// Create an instance of ButtonElement
let submitButton = new ButtonElement("1", apiAction, "Submit");

Check warning on line 360 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L360

Did you really mean 'submitButton'?

// Create an instance of TextInput
let nameInput = new TextInputElement("1", "Please enter your name");

Check warning on line 363 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L363

Did you really mean 'nameInput'?

// Create a new instance of FormMessage
let formMessage = new FormMessage(

Check warning on line 366 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L366

Did you really mean 'formMessage'?
receiverID,
CometChat.RECEIVER_TYPE.USER,
"Title",
[nameInput],

Check warning on line 370 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L370

Did you really mean 'nameInput'?
submitButton

Check warning on line 371 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L371

Did you really mean 'submitButton'?
);

CometChatUIKit.sendFormMessage(formMessage)
Expand All @@ -348,10 +386,10 @@
const receiverID = "GUID";

// Create an instance of APIAction
let apiAction = new APIAction("https://example.com/api", "POST");

Check warning on line 389 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L389

Did you really mean 'apiAction'?

// Create an instance of ButtonElement
let submitButton = new ButtonElement("1", apiAction, "Submit");

Check warning on line 392 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L392

Did you really mean 'apiAction'?

// Create an instance of TextInput
let nameInput = new TextInputElement("1", "Please enter your name");
Expand Down Expand Up @@ -389,18 +427,18 @@
const receiverID = "UID";

// Create instance of ButtonElement for card actions
let cardAction = new ButtonElement(

Check warning on line 430 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L430

Did you really mean 'cardAction'?
"1",
new APIAction("https://example.com/api", "POST"),
"Click Me"
);

// Create a new instance of CardMessage
let cardMessage = new CardMessage(

Check warning on line 437 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L437

Did you really mean 'cardMessage'?
receiverID,
CometChat.RECEIVER_TYPE.USER,
"This is a card",
[cardAction]

Check warning on line 441 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L441

Did you really mean 'cardAction'?
);

CometChatUIKit.sendCardMessage(cardMessage)
Expand Down Expand Up @@ -454,12 +492,12 @@
import { CometChatUIKit } from "@cometchat/chat-uikit-react-native";

const receiverID = "UID";
const customData = { /* your custom JSON data */ };

Check warning on line 495 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L495

Did you really mean 'customData'?

let customMessage = new CustomInteractiveMessage(

Check warning on line 497 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L497

Did you really mean 'customMessage'?
receiverID,
CometChat.RECEIVER_TYPE.USER,
customData

Check warning on line 500 in ui-kit/react-native/methods.mdx

View check run for this annotation

Mintlify / Mintlify Validation (cometchat-22654f5b) - vale-spellcheck

ui-kit/react-native/methods.mdx#L500

Did you really mean 'customData'?
);

CometChatUIKit.sendCustomInteractiveMessage(customMessage)
Expand Down Expand Up @@ -508,6 +546,7 @@
| `disableCalling` | `boolean` | Disable calling features |
| `overrideAdminHost` | `string` | Used to set the admin host |
| `overrideClientHost` | `string` | Used to set the client host |
| `offline` | `boolean \| UIKitOfflineSettings \| CometChat.OfflineConfig` | Turns on [offline support](/ui-kit/react-native/offline-support) (UI Kit 5.6.0 and Chat SDK 4.2.0 or later). Pass `true`, an options object with `enabled: true`, or a `CometChat.OfflineConfig`. Default: off. See [Init with offline support](#init-with-offline-support) |


---
Expand Down
Loading