@cometchat/skills 3.0.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -17
  3. package/bin/install.js +389 -43
  4. package/package.json +19 -9
  5. package/skills/cometchat/SKILL.md +1066 -265
  6. package/skills/cometchat-android-v5/SKILL.md +120 -0
  7. package/skills/cometchat-android-v5-components/SKILL.md +430 -0
  8. package/skills/cometchat-android-v5-core/SKILL.md +468 -0
  9. package/skills/cometchat-android-v5-customization/SKILL.md +305 -0
  10. package/skills/cometchat-android-v5-extensions/SKILL.md +124 -0
  11. package/skills/cometchat-android-v5-features/SKILL.md +130 -0
  12. package/skills/cometchat-android-v5-placement/SKILL.md +276 -0
  13. package/skills/cometchat-android-v5-production/SKILL.md +94 -0
  14. package/skills/cometchat-android-v5-push/SKILL.md +620 -0
  15. package/skills/cometchat-android-v5-testing/SKILL.md +187 -0
  16. package/skills/cometchat-android-v5-theming/SKILL.md +166 -0
  17. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +73 -0
  18. package/skills/cometchat-android-v6/SKILL.md +107 -0
  19. package/skills/cometchat-android-v6-builder-settings/SKILL.md +145 -0
  20. package/skills/cometchat-android-v6-compose-components/SKILL.md +202 -0
  21. package/skills/cometchat-android-v6-compose-customization/SKILL.md +280 -0
  22. package/skills/cometchat-android-v6-compose-placement/SKILL.md +213 -0
  23. package/skills/cometchat-android-v6-compose-theming/SKILL.md +224 -0
  24. package/skills/cometchat-android-v6-core/SKILL.md +354 -0
  25. package/skills/cometchat-android-v6-events/SKILL.md +212 -0
  26. package/skills/cometchat-android-v6-extensions/SKILL.md +191 -0
  27. package/skills/cometchat-android-v6-features/SKILL.md +130 -0
  28. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +197 -0
  29. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +268 -0
  30. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +248 -0
  31. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +202 -0
  32. package/skills/cometchat-android-v6-production/SKILL.md +187 -0
  33. package/skills/cometchat-android-v6-push/SKILL.md +274 -0
  34. package/skills/cometchat-android-v6-testing/SKILL.md +279 -0
  35. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +249 -0
  36. package/skills/cometchat-angular-components/SKILL.md +706 -0
  37. package/skills/cometchat-angular-core/SKILL.md +444 -0
  38. package/skills/cometchat-angular-customization/SKILL.md +424 -0
  39. package/skills/cometchat-angular-features/SKILL.md +447 -0
  40. package/skills/cometchat-angular-patterns/SKILL.md +447 -0
  41. package/skills/cometchat-angular-placement/SKILL.md +685 -0
  42. package/skills/cometchat-angular-production/SKILL.md +415 -0
  43. package/skills/cometchat-angular-theming/SKILL.md +365 -0
  44. package/skills/cometchat-angular-troubleshooting/SKILL.md +329 -0
  45. package/skills/cometchat-astro-patterns/SKILL.md +3 -3
  46. package/skills/cometchat-components/SKILL.md +11 -0
  47. package/skills/cometchat-core/SKILL.md +11 -6
  48. package/skills/cometchat-customization/references/component-catalog.md +1 -1
  49. package/skills/cometchat-features/SKILL.md +176 -108
  50. package/skills/cometchat-flutter-v5/SKILL.md +167 -0
  51. package/skills/cometchat-flutter-v5-calls/SKILL.md +192 -0
  52. package/skills/cometchat-flutter-v5-conversations/SKILL.md +117 -0
  53. package/skills/cometchat-flutter-v5-core/SKILL.md +221 -0
  54. package/skills/cometchat-flutter-v5-customization/SKILL.md +227 -0
  55. package/skills/cometchat-flutter-v5-events/SKILL.md +155 -0
  56. package/skills/cometchat-flutter-v5-messages/SKILL.md +258 -0
  57. package/skills/cometchat-flutter-v5-production/SKILL.md +207 -0
  58. package/skills/cometchat-flutter-v5-push/SKILL.md +284 -0
  59. package/skills/cometchat-flutter-v5-theming/SKILL.md +160 -0
  60. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +129 -0
  61. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +151 -0
  62. package/skills/cometchat-flutter-v6/SKILL.md +445 -0
  63. package/skills/cometchat-flutter-v6-calls/SKILL.md +333 -0
  64. package/skills/cometchat-flutter-v6-components/SKILL.md +365 -0
  65. package/skills/cometchat-flutter-v6-conversations/SKILL.md +210 -0
  66. package/skills/cometchat-flutter-v6-core/SKILL.md +305 -0
  67. package/skills/cometchat-flutter-v6-customization/SKILL.md +666 -0
  68. package/skills/cometchat-flutter-v6-events/SKILL.md +216 -0
  69. package/skills/cometchat-flutter-v6-features/SKILL.md +406 -0
  70. package/skills/cometchat-flutter-v6-messages/SKILL.md +333 -0
  71. package/skills/cometchat-flutter-v6-migration/SKILL.md +381 -0
  72. package/skills/cometchat-flutter-v6-placement/SKILL.md +398 -0
  73. package/skills/cometchat-flutter-v6-production/SKILL.md +632 -0
  74. package/skills/cometchat-flutter-v6-theming/SKILL.md +260 -0
  75. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +726 -0
  76. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +216 -0
  77. package/skills/cometchat-ios/SKILL.md +323 -0
  78. package/skills/cometchat-ios-components/SKILL.md +651 -0
  79. package/skills/cometchat-ios-core/SKILL.md +822 -0
  80. package/skills/cometchat-ios-customization/SKILL.md +825 -0
  81. package/skills/cometchat-ios-features/SKILL.md +725 -0
  82. package/skills/cometchat-ios-placement/SKILL.md +750 -0
  83. package/skills/cometchat-ios-production/SKILL.md +730 -0
  84. package/skills/cometchat-ios-push/SKILL.md +582 -0
  85. package/skills/cometchat-ios-theming/SKILL.md +631 -0
  86. package/skills/cometchat-ios-troubleshooting/SKILL.md +983 -0
  87. package/skills/cometchat-native-bare-patterns/SKILL.md +470 -0
  88. package/skills/cometchat-native-components/SKILL.md +594 -0
  89. package/skills/cometchat-native-core/SKILL.md +407 -0
  90. package/skills/cometchat-native-customization/SKILL.md +594 -0
  91. package/skills/cometchat-native-expo-patterns/SKILL.md +485 -0
  92. package/skills/cometchat-native-features/SKILL.md +608 -0
  93. package/skills/cometchat-native-placement/SKILL.md +500 -0
  94. package/skills/cometchat-native-production/SKILL.md +694 -0
  95. package/skills/cometchat-native-push/SKILL.md +593 -0
  96. package/skills/cometchat-native-testing/SKILL.md +583 -0
  97. package/skills/cometchat-native-theming/SKILL.md +656 -0
  98. package/skills/cometchat-native-troubleshooting/SKILL.md +433 -0
  99. package/skills/cometchat-nextjs-patterns/SKILL.md +5 -5
  100. package/skills/cometchat-production/SKILL.md +60 -0
  101. package/skills/cometchat-react-router-patterns/SKILL.md +23 -21
@@ -0,0 +1,594 @@
1
+ ---
2
+ name: cometchat-native-components
3
+ description: "Component catalog for the CometChat React Native UI Kit v5 — names, props, slot views, request builders, hide flags, style shape. Always loaded before writing CometChat* JSX."
4
+ license: "MIT"
5
+ compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
6
+ allowed-tools: "executeBash, readFile, fileSearch, listDirectory, AskUserQuestion"
7
+ metadata:
8
+ author: "CometChat"
9
+ version: "3.0.0"
10
+ tags: "cometchat react-native components catalog props"
11
+ ---
12
+
13
+ ## Purpose
14
+
15
+ Teaches Claude every component the React Native UI Kit exports, with the props, callback signatures, slot views, request builders, and style shapes that actually exist. This is the authoritative reference — never invent component names or props from memory; look them up here.
16
+
17
+ **Read this skill before writing any `<CometChat*>` JSX.**
18
+
19
+ Ground truth: `packages/ChatUiKit/src/index.ts` from the UI Kit source + `docs/ui-kit/react-native/components-overview.mdx` + per-component doc pages.
20
+
21
+ ---
22
+
23
+ ## How to use this catalog
24
+
25
+ The React Native UI Kit is a set of independent components that you compose into chat layouts. Three patterns cover almost every use case:
26
+
27
+ | Pattern | Components |
28
+ |---|---|
29
+ | **Two-pane** (inbox) | `CometChatConversations` + `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer` |
30
+ | **Single thread** (1-to-1) | `CometChatMessageHeader` + `CometChatMessageList` + `CometChatMessageComposer` (with a resolved `user` or `group`) |
31
+ | **Tab-based messenger** | `CometChatConversations` + `CometChatUsers` + `CometChatGroups` + `CometChatCallLogs` in a bottom-tab bar |
32
+
33
+ **Data flow** (identical across all 3): a list component emits a `CometChat.Conversation` / `User` / `Group` via `onItemPress`. Extract the entity (`conversation.getConversationWith()` for conversations) and pass it as a prop to the header / list / composer.
34
+
35
+ All components share the same API surface — see § Prop conventions.
36
+
37
+ ---
38
+
39
+ ## Prop conventions (applies to every `<CometChat*>` component)
40
+
41
+ Four prop families you'll see across the catalog:
42
+
43
+ | Family | Shape | Example |
44
+ |---|---|---|
45
+ | **Callback** | `on<Event>={(param) => void}` | `onItemPress={(conv) => ...}` • `onError={(err) => ...}` • `onSendButtonPress={(msg) => ...}` |
46
+ | **Request builder** | `<entity>RequestBuilder={new CometChat.<Entity>RequestBuilder()}` | `conversationsRequestBuilder={new CometChat.ConversationsRequestBuilder().setLimit(20)}` |
47
+ | **Hide / visibility toggle** | `hide<Feature>={boolean}` \| `<feature>Visibility={boolean}` | `hideReceipts={true}` • `hideReplyInThreadOption={true}` |
48
+ | **View slot (replace a section)** | `<Slot>View={(params) => JSX}` — **PascalCase**, returns JSX | `TitleView={(user, group) => <MyTitle />}` • `LeadingView={(u, g) => <MyAvatar />}` |
49
+ | **Style** | `style={{ containerStyle: {}, itemStyle: { ... } }}` | see § 13 Style shape |
50
+
51
+ **On-events take positional args, not an event object.** `onItemPress={(conversation) => ...}` receives the `CometChat.Conversation` directly — no `event.target`.
52
+
53
+ **Slot views are capitalized**: `TitleView`, `SubtitleView`, `LeadingView`, `TrailingView`, `EmptyStateView`, `ErrorStateView`, `LoadingStateView`, `AuxiliaryButtonView`. Each slot function gets the same props the default view would have (usually `user, group` or a single entity).
54
+
55
+ **Style is nested objects.** Top-level `style` accepts `containerStyle` (outermost wrapper) then component-specific keys. Each inner style is a regular React Native `StyleSheet` object.
56
+
57
+ ---
58
+
59
+ ## 1. Lists
60
+
61
+ All four list components take a request builder, an `onItemPress` callback, `on<List>LongPress` for long-press, and `style={}`.
62
+
63
+ ### CometChatConversations
64
+
65
+ Scrollable list of recent conversations (both user and group).
66
+
67
+ ```tsx
68
+ import { CometChatConversations } from "@cometchat/chat-uikit-react-native";
69
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
70
+
71
+ <CometChatConversations
72
+ conversationsRequestBuilder={
73
+ new CometChat.ConversationsRequestBuilder().setLimit(20)
74
+ }
75
+ onItemPress={(conversation) => {
76
+ const entity = conversation.getConversationWith(); // User | Group
77
+ const type = conversation.getConversationType(); // "user" | "group"
78
+ // navigate / open panel with `entity`
79
+ }}
80
+ onError={(err) => console.error(err)}
81
+ hideHeader={false}
82
+ hideReceipts={false}
83
+ style={{ containerStyle: { backgroundColor: "#fff" } }}
84
+ />
85
+ ```
86
+
87
+ Key props: `conversationsRequestBuilder`, `onItemPress`, `onItemLongPress`, `onError`, `onEmpty`, `hideReceipts`, `hideHeader`, `hideSearch`, `TitleView`, `SubtitleView`, `LeadingView`, `TrailingView`, `EmptyStateView`, `ErrorStateView`, `LoadingStateView`, `BackdropView`, `style`.
88
+
89
+ ### CometChatUsers
90
+
91
+ ```tsx
92
+ <CometChatUsers
93
+ usersRequestBuilder={new CometChat.UsersRequestBuilder().setLimit(30)}
94
+ onItemPress={(user) => openChatWith(user)}
95
+ searchKeyword=""
96
+ hideStatus={false}
97
+ />
98
+ ```
99
+
100
+ Key props: `usersRequestBuilder`, `onItemPress`, `onError`, `onEmpty`, `searchKeyword`, `hideStatus`, `hideSearch`, `LeadingView`, `TitleView`, `SubtitleView`, `EmptyStateView`, `ErrorStateView`, `LoadingStateView`, `style`.
101
+
102
+ ### CometChatGroups
103
+
104
+ ```tsx
105
+ <CometChatGroups
106
+ groupsRequestBuilder={
107
+ new CometChat.GroupsRequestBuilder().setLimit(30).joinedOnly(true)
108
+ }
109
+ onItemPress={(group) => openGroupChat(group)}
110
+ />
111
+ ```
112
+
113
+ Key props: same shape as Users, with `groupsRequestBuilder` instead.
114
+
115
+ ### CometChatGroupMembers
116
+
117
+ ```tsx
118
+ <CometChatGroupMembers
119
+ group={selectedGroup}
120
+ groupMemberRequestBuilder={
121
+ new CometChat.GroupMembersRequestBuilder(selectedGroup.getGuid()).setLimit(30)
122
+ }
123
+ onItemPress={(member) => openMemberDetails(member)}
124
+ hideKickMemberOption={false}
125
+ hideBanMemberOption={false}
126
+ />
127
+ ```
128
+
129
+ Key props: `group` (**required** — pass a `CometChat.Group` instance), `groupMemberRequestBuilder`, `onItemPress`, `onError`, `onBack`, `hideKickMemberOption`, `hideBanMemberOption`, `hideChangeScopeOption`, slot views for each row section, `style`.
130
+
131
+ ---
132
+
133
+ ## 2. Messages
134
+
135
+ ### CometChatMessageHeader
136
+
137
+ ```tsx
138
+ <CometChatMessageHeader
139
+ user={selectedUser} // OR group — never both
140
+ hideBackButton={false}
141
+ onBack={() => navigation.goBack()}
142
+ AuxiliaryButtonView={(user, group) => <CometChatCallButtons user={user} group={group} />}
143
+ TitleView={(user, group) => <CustomTitle />}
144
+ SubtitleView={(user, group) => <CustomSubtitle />}
145
+ />
146
+ ```
147
+
148
+ Key props: `user` OR `group` (one required), `hideBackButton`, `hideVideoCallButton`, `hideVoiceCallButton`, `onBack`, `TitleView`, `SubtitleView`, `LeadingView`, `TrailingView`, `AuxiliaryButtonView`, `BackButtonIconImageResource`, `style`.
149
+
150
+ ### CometChatMessageList
151
+
152
+ Scrollable message feed. Handles reactions, receipts, mentions, threads, and media out of the box.
153
+
154
+ ```tsx
155
+ <CometChatMessageList
156
+ user={selectedUser}
157
+ messageRequestBuilder={
158
+ new CometChat.MessagesRequestBuilder()
159
+ .setUID(selectedUser.getUid())
160
+ .setLimit(30)
161
+ }
162
+ hideReplyInThreadOption={true} // SEE HARD RULE § 11
163
+ hideReceipts={false}
164
+ onThreadRepliesPress={(message, bubbleView) => openThreadPanel(message)}
165
+ onError={(err) => console.error(err)}
166
+ EmptyStateView={() => <Text>No messages yet</Text>}
167
+ style={{ containerStyle: { backgroundColor: "#fff" } }}
168
+ />
169
+ ```
170
+
171
+ Key props: `user` OR `group`, `parentMessageId` (for thread replies), `messageRequestBuilder`, `goToMessageId` (scroll-to-message), `searchKeyword` (highlight in bubbles), `textFormatters`, `templates` (custom message type rendering — `CometChatMessageTemplate[]`), `hideReplyInThreadOption` **see hard rule § 11**, `hideReceipts`, `hideReactions`, `hideReplyOption`, `hideEditMessageOption`, `hideDeleteMessageOption`, `hideTranslateMessageOption`, `hideMessagePrivatelyOption`, `hideDateSeparator`, `onThreadRepliesPress`, `onMessageLongPress`, `onError`, all `*StateView` slots, `style`.
172
+
173
+ ### CometChatMessageComposer
174
+
175
+ Rich text input. Attachments, mentions, voice notes, sticker picker, reaction keyboard.
176
+
177
+ ```tsx
178
+ <CometChatMessageComposer
179
+ user={selectedUser}
180
+ placeholderText="Type a message..."
181
+ onSendButtonPress={(message) => console.log("sent", message)}
182
+ onError={(err) => console.error(err)}
183
+ disableMentions={false}
184
+ textFormatters={[
185
+ new CometChatMentionsFormatter(),
186
+ new CometChatUrlsFormatter(),
187
+ ]}
188
+ AuxiliaryButtonView={() => <CustomAuxButton />}
189
+ attachmentOptions={(user, group) => [ /* CometChatMessageComposerAction[] */ ]}
190
+ />
191
+ ```
192
+
193
+ Key props: `user` OR `group`, `parentMessageId` (for thread composer), `placeholderText`, `onSendButtonPress`, `onError`, `onTextChanged`, `disableMentions`, `disableSoundForMessages`, `textFormatters`, `attachmentOptions`, `AuxiliaryButtonView`, `HeaderView`, `SendButtonView`, `VoiceRecordingView`, `AttachmentIconView`, `EmojiIconView`, `style`.
194
+
195
+ ### CometChatCompactMessageComposer
196
+
197
+ Compact variant for small screens. Auto-expanding input, rich-text, attachments.
198
+
199
+ ```tsx
200
+ <CometChatCompactMessageComposer
201
+ user={selectedUser}
202
+ enableRichTextEditor={true}
203
+ onSendButtonPress={(message) => {}}
204
+ />
205
+ ```
206
+
207
+ Use this instead of `CometChatMessageComposer` in drawers, widgets, or embedded placements. Same prop family.
208
+
209
+ ### CometChatThreadHeader
210
+
211
+ Header for a threaded reply view — parent message + reply count + close.
212
+
213
+ ```tsx
214
+ <CometChatThreadHeader
215
+ parentMessage={threadParent}
216
+ onClose={() => setThreadMessage(null)}
217
+ hideReplyCount={false}
218
+ />
219
+ ```
220
+
221
+ **Threading composition:**
222
+
223
+ ```tsx
224
+ // In the main message list, capture a thread-open request
225
+ <CometChatMessageList
226
+ user={selectedUser}
227
+ onThreadRepliesPress={(message) => setThreadMessage(message)}
228
+ />
229
+
230
+ // When a thread is open, render the thread panel
231
+ {threadMessage && (
232
+ <>
233
+ <CometChatThreadHeader
234
+ parentMessage={threadMessage}
235
+ onClose={() => setThreadMessage(null)}
236
+ />
237
+ <CometChatMessageList
238
+ user={selectedUser}
239
+ parentMessageId={threadMessage.getId()}
240
+ />
241
+ <CometChatMessageComposer
242
+ user={selectedUser}
243
+ parentMessageId={threadMessage.getId()}
244
+ />
245
+ </>
246
+ )}
247
+ ```
248
+
249
+ ---
250
+
251
+ ## 3. Calling (separate SDK)
252
+
253
+ Call components live in `@cometchat/chat-uikit-react-native` but **require `@cometchat/calls-sdk-react-native` to be installed** to work. Don't import any of these if the calls SDK isn't in the project.
254
+
255
+ ### CometChatCallButtons
256
+
257
+ Voice + video call initiators. Drop into `AuxiliaryButtonView` on `CometChatMessageHeader` for phone + camera icons next to a user's name.
258
+
259
+ ```tsx
260
+ <CometChatCallButtons
261
+ user={selectedUser}
262
+ onVoiceCallPress={(session) => navigation.navigate("OngoingCall", { session })}
263
+ onVideoCallPress={(session) => navigation.navigate("OngoingCall", { session })}
264
+ hideVideoCallButton={false}
265
+ hideVoiceCallButton={false}
266
+ />
267
+ ```
268
+
269
+ ### CometChatIncomingCall
270
+
271
+ Incoming call notification. Render at the app root so it's visible on any screen.
272
+
273
+ ```tsx
274
+ <CometChatIncomingCall
275
+ call={incomingCall}
276
+ onAccept={(call) => {}}
277
+ onDecline={(call) => {}}
278
+ disableSoundForCalls={false}
279
+ />
280
+ ```
281
+
282
+ ### CometChatOutgoingCall
283
+
284
+ Ringing-while-calling screen after `CometChat.initiateCall(...)`.
285
+
286
+ ```tsx
287
+ <CometChatOutgoingCall
288
+ call={outgoingCall}
289
+ onClosePress={() => {}}
290
+ />
291
+ ```
292
+
293
+ ### CometChatOngoingCall
294
+
295
+ In-call UI — tiles, controls, mute, end-call.
296
+
297
+ ```tsx
298
+ <CometChatOngoingCall
299
+ sessionID={session.sessionId}
300
+ callType="audio" // or "video"
301
+ onCallEnded={() => navigation.goBack()}
302
+ />
303
+ ```
304
+
305
+ ### CometChatCallLogs
306
+
307
+ Scrollable call history.
308
+
309
+ ```tsx
310
+ <CometChatCallLogs
311
+ callLogsRequestBuilder={/* CallLogRequest builder from calls-sdk */}
312
+ onItemPress={(callLog) => openCallDetails(callLog)}
313
+ />
314
+ ```
315
+
316
+ ### CometChatMeetCallBubble
317
+
318
+ Call-event message bubble. Auto-picked up by the message list — you don't render it manually.
319
+
320
+ **Wiring**: requires `CallingExtension` to be initialized before `CometChatUIKit.init` (handled by the calls-sdk auto-init), and `<CometChatIncomingCall>` mounted at the app root. See `cometchat-native-features` § Calls.
321
+
322
+ ---
323
+
324
+ ## 4. AI
325
+
326
+ ### CometChatAIAssistantChatHistory
327
+
328
+ AI assistant conversation history UI.
329
+
330
+ ```tsx
331
+ <CometChatAIAssistantChatHistory
332
+ user={loggedInUser}
333
+ onMessageClicked={(message) => openChat(message)}
334
+ onNewChatButtonClick={() => startNewChat()}
335
+ />
336
+ ```
337
+
338
+ Separate dashboard setup required to enable AI agents. See `cometchat-native-features` § AI agent.
339
+
340
+ ---
341
+
342
+ ## 5. Search
343
+
344
+ ### CometChatSearch
345
+
346
+ Full-featured search across conversations + messages + users + groups. Scoped to a user/group when passed a target.
347
+
348
+ ```tsx
349
+ <CometChatSearch
350
+ uid={selectedUser?.getUid()} // optional — scope to one user's chat
351
+ guid={selectedGroup?.getGuid()} // optional — scope to one group
352
+ onBack={() => setShowSearch(false)}
353
+ onConversationPress={(conv) => openConversation(conv)}
354
+ onMessagePress={(msg) => scrollToMessage(msg)}
355
+ />
356
+ ```
357
+
358
+ Key props: `uid` / `guid` (scope), `searchKeyword`, `onBack`, `onConversationPress`, `onMessagePress`, `onUserPress`, `onGroupPress`, `hideConversations`, `hideMessages`, `hideUsers`, `hideGroups`, `style`.
359
+
360
+ Wire from `CometChatMessageHeader`'s `onSearchPress`.
361
+
362
+ > **Hard rule — never roll your own search.** Any request involving
363
+ > "search", "find messages", "search conversations", or "search across
364
+ > conversations" MUST use `<CometChatSearch>` (or `hideSearch={false}`
365
+ > on `CometChatConversations` for a basic name filter). Do NOT build
366
+ > custom `TextInput` search bars, hand-rolled result lists, or filter
367
+ > UIs — they bypass the SDK's pagination, highlighting, and dual-scope
368
+ > matching that ship with the built-in component.
369
+
370
+ ---
371
+
372
+ ## 6. Atoms (primitives for custom composition)
373
+
374
+ Building blocks the higher-level components use internally. Use inside `<Slot>View` overrides or custom screens.
375
+
376
+ | Component | Purpose |
377
+ |---|---|
378
+ | `CometChatAvatar` | Circular / rounded avatar. `image`, `name` (initials fallback), `backgroundColor`, `size` |
379
+ | `CometChatBadge` | Small pill badge — unread count, typing indicator, labels |
380
+ | `CometChatStatusIndicator` | Online/offline dot. `status`, `borderColor` |
381
+ | `CometChatListItem` | Standard row — leading view + title/subtitle + trailing view |
382
+ | `CometChatDate` | Relative-time date pill. `timestamp`, `pattern` |
383
+ | `CometChatBottomSheet` | Modal sheet from bottom. Imperative `show()` / `hide()` via ref |
384
+ | `CometChatActionSheet` | iOS-style action-sheet list |
385
+ | `CometChatConfirmDialog` | Standard confirm / cancel dialog |
386
+ | `CometChatReportDialog` | Report-user dialog |
387
+ | `CometChatEmojiKeyboard` | Full emoji picker |
388
+ | `CometChatMediaRecorder` | Voice-note recorder UI |
389
+ | `CometChatInlineAudioRecorder` | Inline variant used inside the composer |
390
+ | `CometChatReactions` | Reaction-bar UI |
391
+ | `CometChatReactionList` | Full reaction-list popup |
392
+ | `CometChatQuickReactions` | Quick reactions prompt (long-press) |
393
+ | `CometChatMessagePreview` | Reply-quote preview in the composer |
394
+
395
+ All atoms take `style={}` in the same nested-object shape.
396
+
397
+ ---
398
+
399
+ ## 7. Bubbles
400
+
401
+ The message list renders bubbles automatically based on message type. Use them directly only when you need a custom bubble template.
402
+
403
+ | Bubble | Renders |
404
+ |---|---|
405
+ | `CometChatTextBubble` | Text messages |
406
+ | `CometChatImageBubble` | Image messages |
407
+ | `CometChatAudioBubble` | Audio clip messages |
408
+ | `CometChatVideoBubble` | Video messages |
409
+ | `CometChatFileBubble` | File attachments |
410
+ | `CometChatMeetCallBubble` | Call event marker (auto) |
411
+
412
+ Extension-provided bubbles (only present if the extension is registered):
413
+
414
+ | Bubble | Extension |
415
+ |---|---|
416
+ | `CometChatStickerBubble` | Stickers |
417
+ | `LinkPreviewBubble` | Link previews |
418
+ | `MessageTranslationBubble` | Translation inline |
419
+ | `CometChatCollaborativeDocumentBubble` | Collab doc |
420
+ | `CometChatCollaborativeWhiteBoardBubble` | Collab whiteboard |
421
+
422
+ ---
423
+
424
+ ## 8. Formatters (custom text rendering)
425
+
426
+ Pass via `CometChatMessageList.textFormatters` or the composer's same prop.
427
+
428
+ | Formatter | Transforms |
429
+ |---|---|
430
+ | `CometChatMentionsFormatter` | `@uid` → linked mention bubble |
431
+ | `CometChatUrlsFormatter` | URLs → tappable links |
432
+ | `CometChatRichTextFormatter` | Markdown-ish `**bold**`, `*italic*`, `__underline__`, inline code |
433
+ | `CometChatTextFormatter` | Base class — extend for custom formatters |
434
+
435
+ ```tsx
436
+ <CometChatMessageList
437
+ user={selectedUser}
438
+ textFormatters={[
439
+ new CometChatMentionsFormatter(),
440
+ new CometChatUrlsFormatter(),
441
+ new CometChatRichTextFormatter(),
442
+ ]}
443
+ />
444
+ ```
445
+
446
+ See `cometchat-native-customization` for the `extends CometChatTextFormatter` recipe.
447
+
448
+ ---
449
+
450
+ ## 9. Infrastructure (static classes + event bus)
451
+
452
+ ### CometChatUIKit
453
+
454
+ Static class — init + login + logout + send.
455
+
456
+ | Method | Purpose |
457
+ |---|---|
458
+ | `CometChatUIKit.init(settings)` | Initialize. Must resolve before any component renders. |
459
+ | `CometChatUIKit.login({ uid })` | Log in (dev mode). **Takes an object**, not `login("...")`. |
460
+ | `CometChatUIKit.login({ authToken })` | Log in with a server-minted token (production). Same method as dev, different arg. |
461
+ | `CometChatUIKit.getLoggedInUser()` | Returns current `CometChat.User` or `null` (Promise). |
462
+ | `CometChatUIKit.logout()` | Log out + clear session. |
463
+ | `CometChatUIKit.sendCustomMessage(msg)` | Send custom message (used by calling, extensions). |
464
+ | `CometChatUIKit.uiKitSettings` | Read back the settings passed to `init()`. |
465
+
466
+ ### UIKitSettings (flat object passed to `init`)
467
+
468
+ The v5 RN UI Kit's `init()` takes a flat `UIKitSettings` object — there is **no** `UIKitSettingsBuilder` on RN (that's a web-kit pattern). See `cometchat-native-core` § 1.
469
+
470
+ ### CometChatUIEventHandler
471
+
472
+ Event bus. Subscribe to UI events emitted by components.
473
+
474
+ ```tsx
475
+ import { CometChatUIEventHandler } from "@cometchat/chat-uikit-react-native";
476
+
477
+ const listenerId = "MY_LISTENER_" + Date.now();
478
+
479
+ CometChatUIEventHandler.addMessageListener(listenerId, {
480
+ ccMessageSent: ({ message }) => { /* ... */ },
481
+ ccMessageEdited: ({ message }) => { /* ... */ },
482
+ ccMessageDeleted: ({ message }) => { /* ... */ },
483
+ });
484
+
485
+ // Cleanup:
486
+ CometChatUIEventHandler.removeMessageListener(listenerId);
487
+ ```
488
+
489
+ Also: `addConversationListener`, `addGroupListener`, `addUserListener`, `addCallListener` (all paired with `remove*Listener`).
490
+
491
+ ### CometChatMessageTemplate + CometChatMessageOption
492
+
493
+ - **`CometChatMessageTemplate`**: register a custom message type. Pass via `templates` prop on `CometChatMessageList`.
494
+ - **`CometChatMessageOption`**: override or extend long-press options on a message.
495
+
496
+ See `cometchat-native-customization` for recipes.
497
+
498
+ ### CometChatSoundManager
499
+
500
+ ```tsx
501
+ import { CometChatSoundManager, SoundOutput } from "@cometchat/chat-uikit-react-native";
502
+ CometChatSoundManager.play(SoundOutput.incomingMessage);
503
+ ```
504
+
505
+ ### DataSource / DataSourceDecorator / MessageDataSource / ExtensionsDataSource / ChatConfigurator
506
+
507
+ Lower-level extension points for deep customization. `cometchat-native-customization` § Tier 4 covers when to use these instead of props.
508
+
509
+ ---
510
+
511
+ ## 10. Extensions (opt-in)
512
+
513
+ Extensions add message types + features that are toggled on the app's backend (via `cometchat apply-feature <id>` for boolean extensions and AI features, or via the dashboard for third-party-key extensions like Giphy / Stipop). Each ships its own bubble + composer action. Register via the `extensions` field on `CometChatUIKit.init({ ... })`.
514
+
515
+ | Extension | Adds |
516
+ |---|---|
517
+ | `PollsExtension` | `CometChatCreatePoll` composer action + vote-tracking bubble |
518
+ | `StickersExtension` | Sticker picker + `CometChatStickerBubble` |
519
+ | `LinkPreviewExtension` | `LinkPreviewBubble` for rich link cards |
520
+ | `MessageTranslationExtension` | Per-message translate option |
521
+ | `CollaborativeDocumentExtension` | Shared-doc composer action + bubble |
522
+ | `CollaborativeWhiteboardExtension` | Shared-whiteboard composer action + bubble |
523
+ | `ThumbnailGenerationExtension` | Auto-thumbnails for image attachments |
524
+
525
+ See `cometchat-native-features` for the per-extension recipe — most are pure boolean (`cometchat apply-feature <id>`); the AI ones need `--openai-key sk-...`; Giphy / Stipop / Tenor / Chatwoot / Intercom need third-party config in the dashboard.
526
+
527
+ ---
528
+
529
+ ## 11. Hard rule — `hideReplyInThreadOption` is mandatory on every MessageList
530
+
531
+ **Every `<CometChatMessageList>` MUST include `hideReplyInThreadOption`** unless the integration also wires a full thread panel (`CometChatThreadHeader` + scoped `CometChatMessageList` with `parentMessageId` + scoped `CometChatMessageComposer` with `parentMessageId`).
532
+
533
+ The kit's default (`hideReplyInThreadOption: false`) puts a "Reply in Thread" entry in the message action menu that silently does nothing when no panel is wired. In drawer / widget / modal / stack-screen integrations without a thread panel, the option is a dead click.
534
+
535
+ Every example in this catalog includes the flag for a reason — keep it. The only place you can omit it is inside a full thread-panel composition (see § 2 Threading).
536
+
537
+ ---
538
+
539
+ ## 12. Common prop-finding recipe
540
+
541
+ When a user's request isn't obviously covered, check in this order before writing custom code:
542
+
543
+ 1. **Named component in this catalog fits?** ("show call history" → `CometChatCallLogs`).
544
+ 2. **A `hide*` / visibility prop?** ("hide receipts" → `hideReceipts={true}`, not custom bubbles).
545
+ 3. **A `<Slot>View` prop?** ("customize the header title" → `TitleView={(u, g) => <MyTitle />}`, not a wholesale header replacement).
546
+ 4. **A `*RequestBuilder`?** ("filter conversations" → `conversationsRequestBuilder` with `.setUserTags([...])`, not post-render filtering).
547
+ 5. **`textFormatters` + `templates`** for message-rendering customization.
548
+ 6. **`CometChatUIEventHandler`** for cross-component communication.
549
+ 7. **Only then** escalate to `cometchat-native-customization` § Tier 4 (DataSource decorators, ChatConfigurator).
550
+
551
+ Never hand-roll a bubble, a header, or a list when the kit ships one — you'll miss theming, reactions, typing indicators, receipts, and cross-framework behavior the built-ins handle.
552
+
553
+ ---
554
+
555
+ ## 13. Style shape reference
556
+
557
+ Every style prop follows a nested-object shape. Pass `style={}` for no customization; override only the keys you care about.
558
+
559
+ ```tsx
560
+ <CometChatMessageList
561
+ style={{
562
+ containerStyle: { backgroundColor: "#fff", flex: 1 },
563
+ headerStyle: { titleStyle: { color: "#000" } },
564
+ avatarStyle: { containerStyle: { borderRadius: 8 } },
565
+ dateStyle: { textStyle: { fontSize: 10 } },
566
+ }}
567
+ />
568
+ ```
569
+
570
+ Common style keys across components:
571
+
572
+ - `containerStyle` — outermost wrapper
573
+ - `itemStyle` — individual list rows
574
+ - `headerStyle`, `titleStyle`, `subtitleStyle`
575
+ - `avatarStyle`, `badgeStyle`, `statusIndicatorStyle`
576
+ - `bubbleStyle` (message list), `composerStyle` (composer)
577
+ - `emptyStateStyle`, `errorStateStyle`, `loadingStateStyle`
578
+
579
+ Theme-level tokens (`primary`, `textPrimary`, etc.) propagate via `CometChatThemeProvider` — prefer overriding theme tokens for app-wide changes and `style={}` only for per-component tweaks. See `cometchat-native-theming`.
580
+
581
+ ---
582
+
583
+ ## Skill routing reference
584
+
585
+ | Skill | When to route |
586
+ |---|---|
587
+ | `cometchat-native-core` | Always read first — init, login, provider chain |
588
+ | `cometchat-native-components` | This skill — any time you write `<CometChat*>` JSX |
589
+ | `cometchat-native-placement` | Deciding WHERE components go (stack / tabs / modal / sheet) |
590
+ | `cometchat-native-customization` | `textFormatters`, `templates`, custom slot views, event bus |
591
+ | `cometchat-native-features` | Adding calls, extensions, AI |
592
+ | `cometchat-native-theming` | `style={}` not enough — need app-wide color / typography changes |
593
+ | `cometchat-native-production` | `login({ authToken })` setup |
594
+ | `cometchat-native-troubleshooting` | `<CometChat*>` renders nothing or throws at runtime |