diff --git a/REST_API_DOCS_AUDIT_REPORT.md b/REST_API_DOCS_AUDIT_REPORT.md
deleted file mode 100644
index 85a96fd1c..000000000
--- a/REST_API_DOCS_AUDIT_REPORT.md
+++ /dev/null
@@ -1,148 +0,0 @@
-# CometChat REST API Documentation Audit Report
-
-**Date:** 2026-04-24
-**Branch:** `docs/restapi-chatapi-ENG-30061-ketan`
-**Preview URL:** https://cometchat-22654f5b-docs-restapi-chatapi-eng-30061-ketan.mintlify.app/
-**Pages Scanned:** 3,090 MDX files across 10 product directories
-**OAS Files Scanned:** 5 files with 345 total endpoints
-
----
-
-## Executive Summary
-
-| Dimension | Score |
-| ---------------------- | ---------- |
-| Enterprise Readiness | 7.5/10 |
-| AI-Agent Friendliness | 7.0/10 |
-| AEO Friendliness | 8.5/10 |
-| Link Hygiene | 8.0/10 |
-| Completeness | 7.5/10 |
-| Consistency | 7.0/10 |
-| **Overall (weighted)** | **7.5/10** |
-
-The REST API docs are well-structured with zero orphan pages, zero ghost nav entries, and 100% frontmatter description coverage. The main gaps are in the OAS response schemas (52 untyped `data: object` responses in chat-apis.json), 4 broken redirect destinations, and cross-product consistency in overview page structure.
-
----
-
-## Product Coverage
-
-| Product | OAS File | Endpoints | MDX Pages | Guide Pages | Status |
-| --------------------- | --------------------- | --------- | --------- | ------------------ | ------ |
-| Chat & Messaging | chat-apis.json | 130 | 404 | 26 (notifications) | Active |
-| Voice & Video Calling | calls.json | 2 | 207 | — | Active |
-| AI Agents | ai-agent-service.json | 68 | 86 | — | Active |
-| Moderation | management-apis.json | 141 | 12 | — | Active |
-| Data Import | data-import-apis.json | 4 | — | — | Active |
-
----
-
-## Score Breakdown
-
-### Enterprise Readiness: 7.5/10
-
-All 345 endpoints have operationIds and zero empty example values. Authentication is documented per-product (apikey for Chat, Basic Auth for Management). The main gap is 52 endpoints in chat-apis.json returning `data` as a generic untyped `object` — enterprise SDK codegen and type-safe clients can't infer response structure. 14 endpoints have completely empty response schemas.
-
-### AI-Agent Friendliness: 7.0/10
-
-100% operationId coverage is excellent for AI agent consumption. The `llms.txt` file is published and accessible. However, 35 list endpoints across 3 OAS files lack pagination metadata in response schemas, making it harder for agents to handle paginated results programmatically. The 52 untyped response objects in chat-apis.json are the biggest blocker for AI agent integration.
-
-### AEO Friendliness: 8.5/10
-
-Every REST API MDX file has a frontmatter `description`. The `llms.txt` is published with clear page descriptions. Heading hierarchy is clean across all scanned pages. Overview pages have structured endpoint tables (except AI Agents overview which uses prose instead). No debug markers in REST API pages.
-
-### Link Hygiene: 8.0/10
-
-Zero broken internal links in REST API pages. Zero legacy domain references. Zero orphan or ghost pages. However, 4 redirect destinations point to non-existent files (`/ai-chatbots/ai-bots/bots`, `/ai-chatbots/ai-bots/instructions`, `/widget/wordpress/legacy`, `/widget/html/legacy`). The `flutter-sdk-changes-review.md` file (286 ` ` tags fixed in this branch) and 13 files with invalid `mintlify` imports were cleaned up.
-
-### Completeness: 7.5/10
-
-REST API overview pages for Calls and Moderation are comprehensive with endpoint tables, property tables, error handling, and pagination examples. AI Agents overview is lighter — missing a structured endpoint table. The iOS APNs push notification page renders as code-only with no prose introduction. 11 TODO markers remain in iOS UI Kit and React Native notification pages (screenshots and code snippets needed).
-
-### Consistency: 7.0/10
-
-Overview page structure varies across products — Calls and Moderation have full endpoint tables while AI Agents uses prose. Pagination parameter naming varies across OAS files (`perPage`/`count`/`limit`) — this is an API-contract issue, not a docs issue. Code fence formatting was inconsistent (3 vs 4 backtick closings) across 10 JavaScript SDK files — fixed in this branch. Duplicate frontmatter keys were found in 2 files — fixed in this branch.
-
----
-
-## Issues Found
-
-### CRITICAL (P0)
-
-| # | Issue | File/Product | Dimension | Suggested Fix |
-| --- | ------------------------------------------------------ | -------------- | ------------------------------ | ------------------------------------------------------------ |
-| 1 | 52 endpoints return `data` as untyped generic `object` | chat-apis.json | Enterprise Readiness, AI-Agent | Add typed response schemas with properties for each endpoint |
-
-### HIGH (P1)
-
-| # | Issue | File/Product | Dimension | Suggested Fix |
-| --- | ---------------------------------------------------------------- | -------------------------------------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
-| 2 | 35 list endpoints missing pagination metadata in response schema | chat-apis.json, management-apis.json, ai-agent-service.json | AI-Agent Friendliness | Add `meta`/`pagination` object to list endpoint response schemas |
-| 3 | 23 endpoints with empty response schemas | chat-apis.json (14), calls.json (2), ai-agent-service.json (7) | Enterprise Readiness | Define response properties or document as 204 No Content |
-| 4 | 4 broken redirect destinations | docs.json redirects | Link Hygiene | Remove or update redirects for `/ai-chatbots/ai-bots/bots`, `/ai-chatbots/ai-bots/instructions`, `/widget/wordpress/legacy`, `/widget/html/legacy` |
-
-### MEDIUM (P2)
-
-| # | Issue | File/Product | Dimension | Suggested Fix |
-| --- | ------------------------------------------------------- | -------------------------------------------------- | ------------------------- | ------------------------------------------------------------ |
-| 5 | AI Agents API overview lacks structured endpoint table | rest-api/ai-agents-apis/overview | Completeness, Consistency | Add endpoint table matching Calls/Moderation overview format |
-| 6 | iOS APNs push notification page is code-only | notifications/ios-apns-push-notifications.mdx | Completeness | Add introductory prose, setup steps, and section headers |
-| 7 | 11 TODO markers in iOS UI Kit and RN notification pages | ui-kit/ios/_.mdx, notifications/react-native-_.mdx | Completeness | Add missing screenshots and code snippets |
-
-### LOW (P3)
-
-| # | Issue | File/Product | Dimension | Suggested Fix |
-| --- | -------------------------------------------------------------- | ------------ | -------------------- | ------------------------------------- |
-| 8 | `AWSCLIV2.pkg` in repo root (skipped by Mintlify as too large) | Root | Link Hygiene | Add to .gitignore or remove from repo |
-| 9 | Calls OAS has only 2 endpoints with empty 400 error schemas | calls.json | Enterprise Readiness | Add error response properties |
-
----
-
-## Fixes Applied in This Branch
-
-The following issues were discovered and fixed during this audit session:
-
-| Fix | Files | Change |
-| -------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
-| Duplicate redirect source | docs.json | Removed duplicate `/notifications/push-notification-extension-overview`, kept assets.cometchat.io destination |
-| ` ` → ` ` | flutter-sdk-changes-review.md | 286 self-closing HTML tags for MDX compatibility |
-| Mismatched code fences | 10 MDX files (ios-apns, ios-fcm, 8 JS SDK files) | Fixed ``````` closings to match ` `` ` openings |
-| Inline code fences | sdk/javascript/retrieve-users.mdx, send-message.mdx | Expanded single-line code fences to proper multi-line blocks |
-| Escaped comment syntax | sdk/javascript/send-message.mdx | Fixed `{/\*` → `{/*` and `\*/}` → `*/}` |
-| Duplicate frontmatter keys | sdk/android/changelog.mdx, sdk/flutter/ai-chatbots-overview.mdx | Removed duplicate `description` keys |
-| Invalid mintlify imports | 13 MDX files across calls, widget, ai-agents | Removed `import { ... } from 'mintlify'` (components are globally available) |
-
----
-
-## Prioritized Fix List
-
-### P0 — Must fix (blocks SDK codegen / AI agent consumption)
-
-1. Add typed response schemas to 52 chat-apis.json endpoints returning generic `data: object`
-
-### P1 — Should fix (degrades developer experience)
-
-1. Add pagination metadata to 35 list endpoint response schemas
-2. Define response properties for 23 empty response schemas
-3. Fix or remove 4 broken redirect destinations in docs.json
-
-### P2 — Nice to fix (polish)
-
-1. Add structured endpoint table to AI Agents API overview page
-2. Add prose introduction to iOS APNs push notification page
-3. Resolve 11 TODO markers (screenshots, code snippets)
-
-### P3 — Backlog
-
-1. Remove `AWSCLIV2.pkg` from repo
-2. Add error response schemas to calls.json
-
----
-
-## Appendix
-
-- **Total issues:** 9
-- **By severity:** 1 critical, 3 high, 3 medium, 2 low
-- **By product:** Chat 3, Calls 1, AI Agents 1, Cross-product 4
-- **Pages with zero issues:** 3,070+ of 3,090
-- **OAS files scanned:** chat-apis.json (130), calls.json (2), data-import-apis.json (4), management-apis.json (141), ai-agent-service.json (68)
-- **Branch fixes applied:** 3 commits fixing 27 files total
diff --git a/flutter-sdk-changes-review.md b/flutter-sdk-changes-review.md
deleted file mode 100644
index 93fd6ab90..000000000
--- a/flutter-sdk-changes-review.md
+++ /dev/null
@@ -1,134 +0,0 @@
-# Flutter SDK (`sdk/flutter/`) Changes Review
-
-> **Base:** commit `5e4976de` (state before the improvements branch)
-> **Target:** commit `9feb900b` (tip of `docs/flutter-sdk-improvments`)
-> **Scope:** `sdk/flutter/*.mdx` only, `sdk/flutter/3.0/` excluded
-> **Total:** 62 files modified (+8,176 lines, −16 lines)
-> **Commits:**
-> - `659f8839` — "feat: made docs more agentic and developer friendly" (added Quick Reference `` blocks, `description` frontmatter, `` blocks, `` blocks, and Next Steps `` navigation to all files)
-> - `beb0cc1c` — "docs(flutter): add response and error accordions to SDK docs" (added `` and `` sections after every SDK method call across all files except presenter-mode)
-> - `9feb900b` — "docs(flutter): add response and error accordions to presenter mode" (added response/error accordions to the final remaining file)
-
----
-
-## What Changed Across All Files — Pattern Summary
-
-Every file received some combination of these five additions:
-
-### 1. `description` frontmatter (all 62 files)
-A one-line SEO description was added to the YAML frontmatter of every file. Example:
-```yaml
-description: "Get started with the CometChat Flutter SDK to add real-time chat and calling features to your Flutter application."
-```
-
-### 2. AI Agent Quick Reference `` blocks (all 62 files)
-A hidden comment `{/* TL;DR for Agents and Quick Reference */}` followed by an `` block containing copy-paste-ready Dart/YAML code snippets was added at the top of every page, right after the frontmatter. These blocks are designed for both AI agents and developers to quickly understand the page's core functionality without reading the full content. Example from `overview.mdx`:
-```dart
-// Initialize (run once at app start)
-AppSettings appSettings = (AppSettingsBuilder()
- ..subscriptionType = CometChatSubscriptionType.allUsers
- ..region = "REGION"
- ..autoEstablishSocketConnection = true
-).build();
-
-CometChat.init("APP_ID", appSettings,
- onSuccess: (msg) => debugPrint("Init success"),
- onError: (e) => debugPrint("Init failed: ${e.message}"),
-);
-```
-
-### 3. Response/Error Accordions (most files — wherever SDK methods exist)
-After every SDK method call on the page, two expandable `` sections were added:
-- **``** — Documents the success callback return type with a table of fields including Parameter, Type, Description, and Sample Value. For complex objects (User, Group, BaseMessage, Call), every field is listed with realistic sample values.
-- **``** — Documents the error callback with `code`, `message`, and `details` fields and sample error values.
-
-Example Response table fields for `sendMessage()`:
-`id`, `metadata`, `receiver`, `editedBy`, `conversationId`, `sentAt`, `receiverUid`, `type`, `readAt`, `deletedBy`, `deliveredAt`, `deletedAt`, `replyCount`, `sender`, `receiverType`, `editedAt`, `parentMessageId`, `readByMeAt`, `category`, `deliveredToMeAt`, `updatedAt`, `text`, `tags`, `unreadRepliesCount`, `mentionedUsers`, `hasMentionedMe`, `reactions`, `moderationStatus`, `quotedMessageId` — plus nested Sender and Receiver User object tables.
-
-Example Error table:
-| Parameter | Type | Description | Sample Value |
-|-----------|------|-------------|--------------|
-| `code` | string | Error code identifier | `"ERR_CHAT_API_FAILURE"` |
-| `message` | string | Human-readable error message | `"SDK initialization failed."` |
-| `details` | string | Additional technical details | `"Please verify your App ID and region, then try again."` |
-
-### 4. `` blocks (select files — where common pitfalls exist)
-Warning callouts were added for critical developer pitfalls. Examples:
-- `overview.mdx` / `setup.mdx`: *"`CometChat.init()` must be called before any other SDK method. Calling `login()`, `sendMessage()`, or registering listeners before `init()` will fail."*
-- `authentication-overview.mdx`: *"Auth Key is for development/testing only. In production, generate Auth Tokens server-side."*
-- `delete-message.mdx` / `delete-conversation.mdx` / `delete-group.mdx`: Warnings about permanent/irreversible deletion
-- `default-call.mdx`: *"Generate a call token before starting a session"*
-- `ai-agents.mdx`: *"Always remove AI Assistant listeners when they're no longer needed (e.g., on widget dispose or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling."*
-- `receive-messages.mdx`: Warning about removing message listeners on dispose
-
-### 5. Next Steps `` navigation (all 62 files)
-A `---` horizontal rule followed by a `## Next Steps` heading and a `` with 2–4 `` links was added at the bottom of every page. Each card has a title, icon, href, and description pointing to logically related pages.
-
----
-
-## Detailed File-by-File Changes
-
-| File Name | Changes List | Description |
-|-----------|-------------|-------------|
-| `overview.mdx` | 1. Added `description: "Get started with the CometChat Flutter SDK to add real-time chat and calling features to your Flutter application."` 2. Added Quick Reference `` block containing: `cometchat_sdk: ^4.0.33` install yaml, `CometChat.init()` with `AppSettingsBuilder` code, `CometChat.login()` with Auth Key code, commented `loginWithAuthToken()` alternative, credential source note pointing to Dashboard 3. Added ``: "CometChat.init() must be called before any other SDK method. Calling login(), sendMessage(), or registering listeners before init() will fail." 4. Added Response accordion after `CometChat.init()` — success returns a `String` message: `"Initialization completed successfully"` 5. Added Error accordion after `CometChat.init()` — error fields: `code` (`"ERR_CHAT_API_FAILURE"`), `message` (`"SDK initialization failed."`), `details` (`"Please verify your App ID and region, then try again."`) 6. Added Response accordion after `CometChat.createUser()` — returns a `User` object with 12 fields: `uid`, `name`, `link`, `avatar`, `metadata`, `status` (`"offline"`), `role` (`"default"`), `statusMessage`, `tags`, `hasBlockedMe`, `blockedByMe`, `lastActiveAt` 7. Added Error accordion after `CometChat.createUser()` — error fields: `code` (`"ERR_UID_NOT_FOUND"`), `message`, `details` 8. Added Response accordion after `CometChat.login()` — returns a `User` object with same 12 fields, sample `status` is `"online"`, sample `lastActiveAt` is `1745554700` 9. Added Error accordion after `CometChat.login()` — same error structure 10. Added Next Steps CardGroup with 4 cards: "Setup SDK" (icon: gear, href: `/sdk/flutter/setup`), "Key Concepts" (icon: lightbulb, href: `/sdk/flutter/key-concepts`), "Authentication" (icon: key, href: `/sdk/flutter/authentication-overview`), "Send Messages" (icon: paper-plane, href: `/sdk/flutter/send-message`) | This is the main entry point for the Flutter SDK docs. The Quick Reference block gives developers the complete install → init → login flow in one glance. The `` prevents the #1 integration mistake (calling SDK methods before init). Response accordions document the exact shape of `User` objects returned by `createUser()` and `login()`, including all 12 fields with realistic sample values. Error accordions show the standard `CometChatException` structure (`code`/`message`/`details`) that is consistent across all SDK methods. The Next Steps cards create a guided learning path from overview → setup → auth → messaging. |
-| `setup.mdx` | 1. Added `description: "Install and initialize the CometChat Flutter SDK in your application"` 2. Added Quick Reference `` block — same install + init + login code as overview, plus credential source note 3. Added ``: same init-before-other-methods warning 4. Added Response accordion after `CometChat.init()` — `String` success message 5. Added Error accordion after `CometChat.init()` — `code`/`message`/`details` 6. Added Next Steps CardGroup with 2 cards: "Authentication" (icon: key), "Send Messages" (icon: paper-plane) | The setup page is the detailed installation guide (pubspec.yaml, podfile, minSdkVersion, etc.). The Quick Reference duplicates the overview's code block intentionally — developers may land on either page first. Response/Error accordions document what `init()` returns on success/failure so developers know what to expect in their callbacks. |
-| `authentication-overview.mdx` | 1. Added `description: "Learn how to authenticate users in your Flutter app using CometChat SDK with Auth Key for development or Auth Token for production."` 2. Added Quick Reference `` block with: `CometChat.login(UID, authKey)` code, `CometChat.loginWithAuthToken(authToken)` code, `CometChat.logout()` code, note about `getLoggedInUser()` to check existing session 3. Added ``: "Auth Key is intended for development/testing only. For production, generate Auth Tokens server-side via the REST API and use loginWithAuthToken()." 4. Added Response accordion after `login()` with Auth Key — `User` object with 12 fields (uid, name, avatar, status=`"online"`, role=`"default"`, lastActiveAt, etc.) 5. Added Error accordion after `login()` with Auth Key — `code` (`"ERR_UID_NOT_FOUND"`), `message`, `details` 6. Added Response accordion after `loginWithAuthToken()` — same `User` object structure 7. Added Error accordion after `loginWithAuthToken()` — same error structure 8. Added Response accordion after `logout()` — `String` success message: `"User logged out successfully"` 9. Added Error accordion after `logout()` — `code`/`message`/`details` 10. Added Next Steps CardGroup with 4 cards: "Send Messages", "Receive Messages", "Key Concepts", "Users" | The auth page now clearly distinguishes between Auth Key (dev) and Auth Token (prod) flows. The `` is a critical security note — shipping Auth Keys in production client code is a common mistake. Each of the three auth methods (login with key, login with token, logout) has its own response/error accordion so developers can see exactly what each returns. |
-| `key-concepts.mdx` | 1. Added `description: "Understand the core concepts of CometChat including Dashboard, API keys, users, groups, messages, and conversations."` 2. Added Quick Reference `` block summarizing: CometChat Dashboard purpose, Auth Key vs REST API Key differences (Auth Key = client-side dev, REST API Key = server-side), Users/UID/Auth Token concepts, Groups (GUID, public/private/password types), Messages (text/media/custom/interactive), Conversations (user/group) 3. Added Next Steps CardGroup with 4 cards: "Setup", "Authentication", "Send Messages", "Groups" | The Quick Reference block condenses the entire key-concepts page into a scannable summary. This is especially useful for AI agents that need to understand CometChat's data model quickly. No response/error accordions here since this is a conceptual page with no SDK method calls. |
-| `send-message.mdx` | 1. Added `description: "Learn how to send text, media, and custom messages to users and groups using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.sendMessage(textMessage)` code, `CometChat.sendMediaMessage(mediaMessage)` code, `CometChat.sendCustomMessage(customMessage)` code 3. Added ``: "Available via: SDK \| REST API \| UI Kits \| Dashboard" 4. Added ``: "CometChat.init() and CometChat.login() must complete before sending messages." 5. Added Response accordion after `sendMessage()` for text — `BaseMessage` object with 28 fields: `id` (401), `metadata`, `receiver` (nested User object), `editedBy`, `conversationId` (`"cometchat-uid-1_user_cometchat-uid-2"`), `sentAt` (epoch), `receiverUid`, `type` (`"text"`), `readAt`, `deletedBy`, `deliveredAt`, `deletedAt`, `replyCount`, `sender` (nested User object with uid/name/avatar/status/role/tags/etc.), `receiverType` (`"user"`), `editedAt`, `parentMessageId`, `readByMeAt`, `category` (`"message"`), `deliveredToMeAt`, `updatedAt`, `text` (`"messageText"`), `tags`, `unreadRepliesCount`, `mentionedUsers`, `hasMentionedMe`, `reactions`, `moderationStatus`, `quotedMessageId` — plus full nested Sender User object (12 fields) and Receiver User object (12 fields) 6. Added Error accordion after `sendMessage()` for text 7. Added Response accordion after `sendMediaMessage()` — similar `BaseMessage` structure with additional `attachment` field containing `url`, `extension`, `size`, `mimeType` 8. Added Error accordion after `sendMediaMessage()` 9. Added Response accordion after `sendCustomMessage()` — `BaseMessage` with `customData` map field 10. Added Error accordion after `sendCustomMessage()` 11. Added Next Steps CardGroup with 4 cards: "Receive Messages", "Edit Message", "Delete Message", "Threaded Messages" | This is one of the most heavily documented files (+559 lines). The `BaseMessage` response table is the most comprehensive object documentation in the entire SDK docs — 28 top-level fields plus two nested User objects (Sender and Receiver) each with 12 fields. This gives developers complete visibility into what the `onSuccess` callback returns. The nested object tables use anchor links (`#send-text-sender-object`, `#send-text-receiver-object`) for easy navigation. Media message response adds attachment metadata. Custom message response shows the `customData` map structure. |
-| `receive-messages.mdx` | 1. Added `description: "Learn how to receive real-time messages and fetch message history using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.addMessageListener()` code showing `onTextMessageReceived`, `onMediaMessageReceived`, `onCustomMessageReceived` callbacks; `MessagesRequestBuilder` with `fetchPrevious()`/`fetchNext()` code; `CometChat.removeMessageListener()` cleanup code 3. Added ``: "Always remove message listeners when they're no longer needed (e.g., on widget dispose). Failing to remove listeners can cause memory leaks and duplicate event handling." 4. Added Response accordion after `fetchPrevious()` — `List` with full BaseMessage object table (28 fields per message, same structure as send-message) 5. Added Error accordion after `fetchPrevious()` 6. Added Response accordion after `fetchNext()` — same `List` structure 7. Added Error accordion after `fetchNext()` 8. Added Response accordions for each real-time listener callback: `onTextMessageReceived` (TextMessage object), `onMediaMessageReceived` (MediaMessage with attachment), `onCustomMessageReceived` (CustomMessage with customData), `onTypingStarted`, `onTypingEnded`, `onMessagesDelivered`, `onMessagesRead`, `onMessageEdited`, `onMessageDeleted` 9. Added Error accordions for listener callbacks 10. Added Next Steps CardGroup with 4 cards: "Send Messages", "Threaded Messages", "Message Filtering", "Delivery Receipts" | The largest change after `default-call.mdx` (+767 lines). Every real-time listener callback now has its own Response accordion documenting the exact object shape that arrives in the callback. This is critical for developers building custom UIs — they need to know exactly which fields are available on `TextMessage` vs `MediaMessage` vs `CustomMessage`. The memory leak warning about removing listeners is a common Flutter pitfall. |
-| `edit-message.mdx` | 1. Added `description: "Learn how to edit sent messages in your Flutter app using the CometChat SDK."` 2. Added Quick Reference `` block with: `CometChat.editMessage(textMessage)` code for text, `CometChat.editMessage(mediaMessage)` code for media 3. Added Response accordion after `editMessage()` for text — `BaseMessage` object with `editedAt` populated (non-zero epoch), `editedBy` populated with editor's UID 4. Added Error accordion after `editMessage()` for text 5. Added Response accordion after `editMessage()` for media — same structure with attachment metadata 6. Added Error accordion after `editMessage()` for media 7. Added Next Steps CardGroup with 3 cards: "Delete Message", "Send Messages", "Threaded Messages" | The response accordions specifically highlight the `editedAt` and `editedBy` fields that change when a message is edited — this helps developers understand which fields to check in their UI to show "edited" indicators. |
-| `delete-message.mdx` | 1. Added `description: "Learn how to delete messages and handle real-time deletion events in your Flutter app using CometChat SDK."` 2. Added Quick Reference `` block with: `CometChat.deleteMessage(messageId)` code, `onMessageDeleted` listener callback code 3. Added ``: "Deleting a message is permanent and cannot be undone. The message will be removed for all participants in the conversation." 4. Added Response accordion after `deleteMessage()` — `BaseMessage` object with `deletedAt` populated (non-zero epoch), `deletedBy` populated with deleter's UID 5. Added Error accordion after `deleteMessage()` 6. Added Next Steps CardGroup with 3 cards: "Edit Message", "Send Messages", "Receive Messages" | The permanence warning is important — unlike some chat platforms, CometChat's delete is not soft-delete by default. Response accordion highlights `deletedAt` and `deletedBy` fields. |
-| `delivery-read-receipts.mdx` | 1. Added `description: "Learn how to implement message delivery and read receipts in your Flutter app using CometChat SDK."` 2. Added Quick Reference `` block with: `CometChat.markAsDelivered(message)` code, `CometChat.markAsRead(message)` code, `CometChat.markAsUnread(message)` code, listener callbacks for `onMessagesDelivered`/`onMessagesRead` 3. Added Response accordion after `markAsDelivered()` — void success (no return value) 4. Added Error accordion after `markAsDelivered()` 5. Added Response accordion after `markAsRead()` — void success 6. Added Error accordion after `markAsRead()` 7. Added Response accordion after `markAsUnread()` — void success 8. Added Error accordion after `markAsUnread()` 9. Added Next Steps CardGroup with 3 cards: "Receive Messages", "Send Messages", "Typing Indicators" | Receipt methods return void on success (no object), so the Response accordions simply confirm "void — no return value". The Error accordions still document the `CometChatException` structure. |
-| `typing-indicators.mdx` | 1. Added `description: "Learn how to send and receive typing indicators in your Flutter app using CometChat SDK."` 2. Added Quick Reference `` block with: `CometChat.startTyping(typingIndicator)` code, `CometChat.endTyping(typingIndicator)` code, `onTypingStarted`/`onTypingEnded` listener callbacks 3. Added Next Steps CardGroup with 3 cards: "Send Messages", "Receive Messages", "Delivery Receipts" | No response/error accordions — typing indicator methods are fire-and-forget with no success/error callbacks. Quick reference shows both sending and receiving sides. |
-| `threaded-messages.mdx` | 1. Added `description: "Learn how to send, receive, and fetch messages within a thread attached to a parent message in CometChat Flutter SDK."` 2. Added Quick Reference `` block with: send-in-thread code (`textMessage.parentMessageId = 103`), fetch-thread code (`MessagesRequestBuilder()..parentMessageId = 103`), hide-replies code (`..hideReplies = true`) 3. Added Response accordion after `sendMessage()` in thread — `BaseMessage` with `parentMessageId` populated (103) 4. Added Error accordion after `sendMessage()` in thread 5. Added Response accordion after `fetchPrevious()` for thread — `List` with `parentMessageId` on each message 6. Added Error accordion after `fetchPrevious()` 7. Added Response accordion after `fetchNext()` for thread — same structure 8. Added Error accordion after `fetchNext()` 9. Added Next Steps CardGroup with 3 cards: "Send Messages", "Receive Messages", "Message Filtering" | The Quick Reference block shows the three key thread operations in one place: sending into a thread, fetching a thread's messages, and excluding thread replies from the main conversation. Response accordions highlight the `parentMessageId` field that links messages to their thread. |
-| `mentions.mdx` | 1. Added `description: "Learn how to mention users in messages and fetch mentioned messages using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: mention in text message code (setting `mentionedUsers` on `TextMessage`), fetch mentioned messages code (`MessagesRequestBuilder()..mentionsWithType`) 3. Added Response accordion after sending message with mentions — `BaseMessage` with `mentionedUsers` array populated, `hasMentionedMe` boolean 4. Added Error accordion 5. Added Response accordion after fetching mentioned messages — `List` with mention metadata 6. Added Error accordion 7. Added Next Steps CardGroup with 3 cards: "Send Messages", "Receive Messages", "Message Filtering" | Response accordions specifically show how `mentionedUsers` array and `hasMentionedMe` boolean appear in the response — developers need this to render @mention UI elements. |
-| `reactions.mdx` | 1. Added `description: "Learn how to add, remove, and fetch reactions on messages using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.addReaction(messageId, emoji)` code, `CometChat.removeReaction(messageId, emoji)` code, `CometChat.fetchMessageReactions(messageId)` code 3. Added Response accordion after `addReaction()` — `BaseMessage` with `reactions` array populated 4. Added Error accordion after `addReaction()` 5. Added Response accordion after `removeReaction()` — `BaseMessage` with updated `reactions` array 6. Added Error accordion after `removeReaction()` 7. Added Response accordion after `fetchMessageReactions()` — `List` with fields: `reaction` (emoji string), `count` (number), `reactedByMe` (boolean) 8. Added Error accordion after `fetchMessageReactions()` 9. Added Next Steps CardGroup with 3 cards: "Send Messages", "Receive Messages", "Interactive Messages" | The `fetchMessageReactions()` response introduces a new object type (`ReactionCount`) not seen in other pages — it has `reaction`, `count`, and `reactedByMe` fields. |
-| `interactive-messages.mdx` | 1. Added `description: "Learn how to send interactive messages (Form, Card, Scheduler) using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `FormMessage` construction code, `CardMessage` construction code, `SchedulerMessage` construction code 3. Added Response accordion after sending `FormMessage` — `BaseMessage` with `interactiveData` map containing form fields 4. Added Error accordion 5. Added Response accordion after sending `CardMessage` — `BaseMessage` with `interactiveData` containing card layout 6. Added Error accordion 7. Added Next Steps CardGroup with 3 cards: "Send Messages", "Reactions", "Message Filtering" | Interactive messages have a unique `interactiveData` field in the response that contains the form/card/scheduler structure. |
-| `transient-messages.mdx` | 1. Added `description: "Learn how to send and receive transient (ephemeral) messages that are not stored in CometChat's database."` 2. Added Quick Reference `` block with: `CometChat.sendTransientMessage(transientMessage)` code, `onTransientMessageReceived` listener callback 3. Added Next Steps CardGroup with 3 cards: "Send Messages", "Typing Indicators", "Real-Time Listeners" | No response/error accordions — transient messages are fire-and-forget. The Quick Reference clarifies that these messages are not persisted. |
-| `flag-message.mdx` | 1. Added `description: "Learn how to flag or report messages for moderation in your Flutter app using CometChat SDK."` 2. Added Quick Reference `` block with: `CometChat.flagMessage(message)` code 3. Added Response accordion after `flagMessage()` — success confirmation 4. Added Error accordion after `flagMessage()` 5. Added Next Steps CardGroup with 3 cards: "Delete Message", "AI Moderation", "Extensions" | Flag message is a simple method with a straightforward response. |
-| `additional-message-filtering.mdx` | 1. Added `description: "Learn how to use MessagesRequestBuilder to filter and fetch messages with various parameters including pagination, categories, types, tags, and advanced search options in Flutter."` 2. Added Quick Reference `` block with: `MessagesRequestBuilder` examples showing filters by `..categories`, `..types`, `..tags`, `..uid`, `..guid`, `..limit`, `..searchKeyword`, `..hideReplies`, `..hideDeletedMessages` 3. Added Next Steps CardGroup with 4 cards: "Receive Messages", "Send Messages", "Threaded Messages", "Message Structure" | No response/error accordions — this page documents the request builder configuration, not the fetch methods themselves (those are on `receive-messages.mdx`). The Quick Reference is a comprehensive filter cheat sheet. |
-| `message-structure-and-hierarchy.mdx` | 1. Added `description: "Understand the message class hierarchy in CometChat Flutter SDK — BaseMessage, TextMessage, MediaMessage, CustomMessage, and InteractiveMessage."` 2. Added Quick Reference `` block summarizing the class hierarchy: `BaseMessage` (parent) → `TextMessage`, `MediaMessage`, `CustomMessage`, `InteractiveMessage` (children), with key fields for each 3. Added Next Steps CardGroup with 4 cards: "Send Messages", "Receive Messages", "Interactive Messages", "Message Filtering" | Conceptual page — no SDK method calls, so no response/error accordions. The Quick Reference gives a class hierarchy overview. |
-| `messaging-overview.mdx` | 1. Added `description: "Overview of CometChat's messaging capabilities for Flutter including text, media, custom, and interactive messages."` 2. Added Quick Reference `` block listing all messaging features with links: Send Messages, Receive Messages, Edit/Delete, Threaded Messages, Typing Indicators, Delivery/Read Receipts, Mentions, Reactions, Interactive Messages, Transient Messages, Flag Message 3. Added Next Steps CardGroup with 4 cards: "Send Messages", "Receive Messages", "Threaded Messages", "Reactions" | Index page — the Quick Reference serves as a complete table of contents for the messaging section. |
-| `retrieve-conversations.mdx` | 1. Added `description: "Learn how to fetch and paginate through conversations using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `ConversationsRequestBuilder` code showing `..limit`, `..conversationType`, `..withTags`, `..tags` filters; `fetchNext()`/`fetchPrevious()` pagination code 3. Added Response accordion after `fetchNext()` — `List` with fields: `conversationId`, `conversationType` (`"user"`/`"group"`), `lastMessage` (nested BaseMessage), `conversationWith` (nested User or Group object), `unreadMessageCount`, `updatedAt`, `tags`, `lastReadMessageId` 4. Added Error accordion after `fetchNext()` 5. Added Response accordion after `fetchPrevious()` — same structure 6. Added Error accordion after `fetchPrevious()` 7. Added Next Steps CardGroup with 4 cards: "Delete Conversation", "Send Messages", "Retrieve Users", "Retrieve Groups" | The `Conversation` object is a complex nested type — it contains a `lastMessage` (full BaseMessage) and a `conversationWith` (User or Group depending on type). The response tables document all these nested structures. |
-| `delete-conversation.mdx` | 1. Added `description: "Learn how to delete user and group conversations from the logged-in user's conversation list using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.deleteConversation(conversationWith, conversationType)` code 3. Added ``: "Deleting a conversation removes it only from the logged-in user's list. The other participant's conversation is not affected. This action cannot be undone." 4. Added Response accordion after `deleteConversation()` — `String` success message 5. Added Error accordion after `deleteConversation()` 6. Added Next Steps CardGroup with 2 cards: "Retrieve Conversations", "Send Messages" | The warning clarifies that conversation deletion is one-sided (only affects the current user) and irreversible. |
-| `retrieve-users.mdx` | 1. Added `description: "Learn how to fetch and paginate through users using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `UsersRequestBuilder` code showing `..limit`, `..searchKeyword`, `..status`, `..hideBlockedUsers`, `..roles`, `..tags`, `..uids` filters; `fetchNext()` pagination code 3. Added Response accordion after `fetchNext()` — `List` with 12 fields per user: `uid`, `name`, `link`, `avatar`, `metadata`, `status`, `role`, `statusMessage`, `tags`, `hasBlockedMe`, `blockedByMe`, `lastActiveAt` 4. Added Error accordion after `fetchNext()` 5. Added Next Steps CardGroup with 3 cards: "Block Users", "User Presence", "User Management" | The User object table is reused across many pages (login, send-message, etc.) but this is the canonical reference for the full User object shape. |
-| `user-management.mdx` | 1. Added `description: "Learn how to create and update users using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.createUser(user, authKey)` code, `CometChat.updateUser(user)` code 3. Added Response accordion after `createUser()` — `User` object (12 fields) 4. Added Error accordion after `createUser()` 5. Added Response accordion after `updateUser()` — `User` object (12 fields) 6. Added Error accordion after `updateUser()` 7. Added Next Steps CardGroup with 3 cards: "Retrieve Users", "Block Users", "User Presence" | Both user management methods return the full User object on success. |
-| `user-presence.mdx` | 1. Added `description: "Learn how to track user online/offline status in real-time using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.addUserListener()` code showing `onUserOnline`/`onUserOffline` callbacks 3. Added Next Steps CardGroup with 3 cards: "Retrieve Users", "User Management", "Real-Time Listeners" | No response/error accordions — presence is received via listeners, not method calls. |
-| `users-overview.mdx` | 1. Added `description: "Overview of CometChat's user management capabilities for Flutter."` 2. Added Quick Reference `` block listing: Retrieve Users, User Management, Block Users, User Presence with links 3. Added Next Steps CardGroup with 4 cards | Index page for the Users section. |
-| `block-users.mdx` | 1. Added `description: "Learn how to block and unblock users in your Flutter app using the CometChat SDK to manage user interactions and privacy."` 2. Added Quick Reference `` block with: `CometChat.blockUsers(uids)` code, `CometChat.unblockUsers(uids)` code, `BlockedUsersRequestBuilder` with `fetchNext()` code 3. Added Response accordion after `blockUsers()` — `Map` showing success/failure per UID 4. Added Error accordion after `blockUsers()` 5. Added Response accordion after `unblockUsers()` — same Map structure 6. Added Error accordion after `unblockUsers()` 7. Added Response accordion after `fetchNext()` for blocked users — `List` (12 fields per user) 8. Added Error accordion after `fetchNext()` 9. Added Next Steps CardGroup with 3 cards: "Retrieve Users", "User Management", "User Presence" | The `blockUsers()`/`unblockUsers()` methods return a `Map` (not a simple success string) — the response accordion documents this unique return type. |
-| `create-group.mdx` | 1. Added `description: "Learn how to create public, private, and password-protected groups using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `Group` constructor code for public/private/password types, `CometChat.createGroup(group)` code 3. Added Response accordion after `createGroup()` — `Group` object with 15+ fields: `guid`, `name`, `type` (`"public"`/`"private"`/`"password"`), `icon`, `description`, `owner`, `metadata`, `tags`, `membersCount`, `createdAt`, `updatedAt`, `hasJoined`, `scope`, `joinedAt`, `conversationId` 4. Added Error accordion after `createGroup()` 5. Added Next Steps CardGroup with 3 cards: "Join Group", "Retrieve Groups", "Group Members" | The Group object table is the canonical reference for group data — 15+ fields including `membersCount`, `hasJoined`, `scope`, and `conversationId`. |
-| `join-group.mdx` | 1. Added `description: "Learn how to join public and password-protected groups using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.joinGroup(guid, groupType, password)` code 3. Added Response accordion after `joinGroup()` — `Group` object (same 15+ fields) 4. Added Error accordion after `joinGroup()` 5. Added Next Steps CardGroup with 3 cards: "Leave Group", "Retrieve Group Members", "Create Group" | Response shows the Group object with `hasJoined` now `true` and `scope` set to `"participant"`. |
-| `leave-group.mdx` | 1. Added `description: "Learn how to leave a group using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.leaveGroup(guid)` code 3. Added Response accordion after `leaveGroup()` — `String` success message 4. Added Error accordion after `leaveGroup()` 5. Added Next Steps CardGroup with 3 cards: "Join Group", "Delete Group", "Retrieve Groups" | Simple method — returns success string on leave. |
-| `delete-group.mdx` | 1. Added `description: "Learn how to permanently delete a group in CometChat using the Flutter SDK. Only group admins can delete groups."` 2. Added Quick Reference `` block with: `CometChat.deleteGroup(guid)` code 3. Added ``: "Only the group admin can delete a group. Deleting a group is permanent and removes all messages and members." 4. Added Response accordion after `deleteGroup()` — `String` success message 5. Added Error accordion after `deleteGroup()` 6. Added Next Steps CardGroup with 3 cards: "Create Group", "Retrieve Groups", "Leave Group" | The admin-only + permanent deletion warning is critical context for developers. |
-| `update-group.mdx` | 1. Added `description: "Learn how to update group details using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.updateGroup(group)` code 3. Added Response accordion after `updateGroup()` — `Group` object (15+ fields) with updated values 4. Added Error accordion after `updateGroup()` 5. Added Next Steps CardGroup with 3 cards: "Create Group", "Retrieve Groups", "Group Members" | Response shows the updated Group object. |
-| `transfer-group-ownership.mdx` | 1. Added `description: "Learn how to transfer group ownership to another member using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.transferOwnership(guid, uid)` code 3. Added Response accordion after `transferOwnership()` — `String` success message 4. Added Error accordion after `transferOwnership()` 5. Added Next Steps CardGroup with 3 cards: "Group Members", "Update Group", "Change Member Scope" | Simple method — returns success string. |
-| `retrieve-groups.mdx` | 1. Added `description: "Learn how to fetch and paginate through groups using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `GroupsRequestBuilder` code showing `..limit`, `..searchKeyword`, `..joinedOnly`, `..tags`, `..withTags` filters; `fetchNext()` code 3. Added Response accordion after `fetchNext()` — `List` (15+ fields per group) 4. Added Error accordion after `fetchNext()` 5. Added Next Steps CardGroup with 3 cards: "Create Group", "Join Group", "Group Members" | Group retrieval response documents the full Group object for each item in the list. |
-| `retrieve-group-members.mdx` | 1. Added `description: "Learn how to fetch and paginate through group members using the CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `GroupMembersRequestBuilder("GROUP_ID")` code showing `..limit`, `..scopes` (admin/moderator/participant) filters; `fetchNext()` code 3. Added ``: "Available via: SDK \| REST API \| UI Kits" 4. Simplified intro paragraph — removed redundant sentence about `GroupMembersRequestBuilder` 5. Added Response accordion after `fetchNext()` — `List` with 14 fields: all 12 User fields plus `scope` (`"admin"`/`"moderator"`/`"participant"`) and `joinedAt` (epoch timestamp) 6. Added Error accordion after `fetchNext()` 7. Added Next Steps CardGroup with 3 cards: "Add Members", "Kick Member", "Change Scope" | `GroupMember` extends `User` with two additional fields (`scope` and `joinedAt`) — the response table documents all 14 fields. |
-| `group-add-members.mdx` | 1. Added `description: "Learn how to add members to a group using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.addMembersToGroup(guid, members, bannedMembers)` code 3. Added Response accordion after `addMembersToGroup()` — `Map` showing success/failure per member UID 4. Added Error accordion 5. Added Next Steps CardGroup with 3 cards: "Retrieve Group Members", "Kick Member", "Change Scope" | The Map response type is unique — it maps each member UID to a success/failure status string. |
-| `group-change-member-scope.mdx` | 1. Added `description: "Learn how to change a group member's scope (role) using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.changeMemberScope(guid, uid, scope)` code showing scope values: `CometChatMemberScope.admin`, `.moderator`, `.participant` 3. Added Response accordion — `String` success message 4. Added Error accordion 5. Added Next Steps CardGroup with 3 cards: "Retrieve Group Members", "Add Members", "Transfer Ownership" | Quick Reference shows all three scope enum values. |
-| `group-kick-member.mdx` | 1. Added `description: "Learn how to kick, ban, and unban group members using CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.kickGroupMember(guid, uid)` code, `CometChat.banGroupMember(guid, uid)` code, `CometChat.unbanGroupMember(guid, uid)` code 3. Added Response accordion after `kickGroupMember()` — `String` success message 4. Added Error accordion after `kickGroupMember()` 5. Added Response accordion after `banGroupMember()` — `String` success message 6. Added Error accordion after `banGroupMember()` 7. Added Response accordion after `unbanGroupMember()` — `String` success message 8. Added Error accordion after `unbanGroupMember()` 9. Added Next Steps CardGroup with 3 cards: "Retrieve Group Members", "Add Members", "Change Scope" | All three member moderation methods documented with response/error. |
-| `groups-overview.mdx` | 1. Added `description: "Overview of CometChat's group management capabilities for Flutter."` 2. Added Quick Reference `` block listing: Create Group, Join Group, Leave Group, Delete Group, Update Group, Transfer Ownership, Retrieve Groups, Retrieve Group Members, Add Members, Change Scope, Kick/Ban Members with links 3. Added Next Steps CardGroup with 4 cards | Index page for the Groups section. |
-| `default-call.mdx` | 1. Added `description: "Implement complete calling workflow with ringing functionality including incoming/outgoing call UI, call acceptance, rejection, and cancellation in your Flutter app."` 2. Added Quick Reference `` block with: `CometChat.initiateCall(call)` code, `CometChat.acceptCall(sessionId)` code, `CometChat.rejectCall(sessionId, status)` code with `CometChatCallStatus.rejected`/`.cancelled`/`.busy`, `CometChat.endCall(sessionId)` code 3. Added ``: "You must generate a call token using `CometChatCalls.generateToken()` before starting a call session with `CometChatCalls.startSession()`." 4. Added Response accordion after `initiateCall()` — `Call` object with 28+ fields: all BaseMessage fields (id, metadata, receiver, sender, conversationId, sentAt, type, category, etc.) PLUS call-specific fields: `sessionId` (`"v1.us.1.xxxxxxxx"`), `callStatus` (`"initiated"`), `action` (`"initiated"`), `callInitiator` (nested User object), `callReceiver` (nested User object), `initiatedAt` (epoch), `joinedAt` (epoch) — plus nested Sender, Receiver, CallInitiator, and CallReceiver User object tables (12 fields each) 5. Added Error accordion after `initiateCall()` 6. Added Response accordion after `acceptCall()` — `Call` object with `callStatus` = `"ongoing"`, `action` = `"accepted"` 7. Added Error accordion after `acceptCall()` 8. Added Response accordion after `rejectCall()` (rejected) — `Call` object with `callStatus` = `"rejected"`, `action` = `"rejected"` 9. Added Error accordion after `rejectCall()` (rejected) 10. Added Response accordion after `rejectCall()` (cancelled by initiator) — `Call` object with `callStatus` = `"cancelled"`, `action` = `"cancelled"` 11. Added Error accordion after `rejectCall()` (cancelled) 12. Added Response accordion after `endCall()` — `Call` object with `callStatus` = `"ended"`, `action` = `"ended"` 13. Added Error accordion after `endCall()` 14. Added Response accordion after `CometChatCalls.startSession()` — `Widget?` representing the call UI to embed in your screen 15. Added Error accordion after `startSession()` 16. Added Next Steps CardGroup with 3 cards: "Direct Call", "Standalone Calling", "Call Logs" | This is the single largest file change (+876 lines). The `Call` object extends `BaseMessage` with 7 additional call-specific fields (`sessionId`, `callStatus`, `action`, `callInitiator`, `callReceiver`, `initiatedAt`, `joinedAt`). Each call lifecycle state (initiated, ongoing, rejected, cancelled, ended) has its own Response accordion showing the exact `callStatus` and `action` values for that state — this is critical for developers building custom call UIs who need to know which status values to check. The `startSession()` response is unique — it returns a Flutter `Widget?` that developers embed in their screen to show the call interface. |
-| `direct-call.mdx` | 1. Added `description: "Implement direct calling without ringing functionality — generate a token and start a call session directly."` 2. Added Quick Reference `` block with: `CometChatCalls.generateToken(sessionId, userAuthToken)` code, `CometChatCalls.startSession(callToken, callSettings)` code with `CallSettingsBuilder` showing `..enableDefaultLayout`, `..listener` 3. Added Response accordion after `generateToken()` — `String` call token 4. Added Error accordion after `generateToken()` 5. Added Response accordion after `startSession()` — `Widget?` call UI widget 6. Added Error accordion after `startSession()` 7. Added Next Steps CardGroup with 3 cards: "Default Call", "Standalone Calling", "Recording" | Direct calling skips the ringing flow — the Quick Reference shows the simplified two-step process (generate token → start session). |
-| `standalone-calling.mdx` | 1. Added `description: "Implement standalone calling that works independently of CometChat's messaging infrastructure."` 2. Added Quick Reference `` block with: standalone `CometChatCalls.init()` code, `generateToken()` code, `startSession()` code 3. Added Response accordion after `generateToken()` — `String` call token 4. Added Error accordion 5. Added Response accordion after `startSession()` — `Widget?` call UI widget 6. Added Error accordion 7. Added Next Steps CardGroup with 3 cards: "Default Call", "Direct Call", "Call Logs" | Standalone calling is for apps that only need calling (no chat). The Quick Reference shows the independent init flow. |
-| `calling-setup.mdx` | 1. Added `description: "Learn how to install and initialize the CometChat Calls SDK for Flutter to enable voice and video calling in your application."` 2. Added Quick Reference `` block with: `cometchat_calls_sdk: ^4.0.x` install yaml, `CometChatCalls.init(callAppSettings)` code with `CallAppSettingsBuilder` showing `..appId`, `..region` 3. Added Response accordion after `CometChatCalls.init()` — `String` success message: `"CometChat Calls SDK initialized successfully"` 4. Added Error accordion after `CometChatCalls.init()` 5. Added Next Steps CardGroup with 3 cards: "Default Call", "Direct Call", "Standalone Calling" | The Calls SDK has its own separate init method (`CometChatCalls.init()`) distinct from the main SDK's `CometChat.init()`. |
-| `calling-overview.mdx` | 1. Added `description: "Implement voice and video calling in your Flutter application with CometChat's calling SDK, supporting ringing calls, direct calls, and standalone calling."` 2. Added Quick Reference `` block summarizing three calling modes: Default Calling (with ringing, requires chat SDK), Direct Calling (no ringing, requires chat SDK), Standalone Calling (independent, no chat SDK needed) — with use-case guidance for each 3. Added Next Steps CardGroup with 4 cards: "Calling Setup", "Default Call", "Direct Call", "Standalone Calling" | The Quick Reference is a decision guide — helps developers choose between the three calling modes based on their use case. |
-| `call-logs.mdx` | 1. Added `description: "Learn how to fetch and manage call logs in your Flutter application using CometChat's Call SDK, including filtering by call type, status, and direction."` 2. Added Quick Reference `` block with: `CallLogRequestBuilder` code showing `..limit`, `..callType`, `..callStatus`, `..callDirection` filters; `fetchNext()`/`fetchPrevious()` code; `CometChatCalls.getCallDetails(sessionId)` code 3. Added Response accordion after `fetchNext()` — `List` with 10+ fields: `sessionId`, `callType` (`"audio"`/`"video"`), `callStatus` (`"initiated"`/`"ongoing"`/`"ended"`/`"cancelled"`/`"rejected"`/`"busy"`/`"unanswered"`), `callDirection` (`"incoming"`/`"outgoing"`), `initiator` (User object), `receiver` (User object), `initiatedAt`, `endedAt`, `duration`, `participants` 4. Added Error accordion after `fetchNext()` 5. Added Response accordion after `fetchPrevious()` — same structure 6. Added Error accordion after `fetchPrevious()` 7. Added Response accordion after `getCallDetails()` — `List` for a specific session 8. Added Error accordion after `getCallDetails()` 9. Added Next Steps CardGroup with 3 cards: "Default Call", "Recording", "Presenter Mode" | The `CallLog` object is distinct from the `Call` object — it's a historical record with `duration`, `endedAt`, and `participants` fields not present on the real-time `Call` object. |
-| `recording.mdx` | 1. Added `description: "Learn how to enable and manage call recording in your Flutter app using CometChat's Calls SDK."` 2. Added Quick Reference `` block with: recording configuration in `CallSettingsBuilder` (`..enableRecording`), fetch recordings code 3. Added Response accordion after fetching recordings — recording object with `recordingUrl`, `recordingDuration`, `startedAt`, `endedAt` 4. Added Error accordion 5. Added Next Steps CardGroup with 3 cards: "Call Logs", "Default Call", "Presenter Mode" | Recording response includes the `recordingUrl` for playback/download. |
-| `presenter-mode.mdx` | 1. Added `description: "Learn how to implement presenter mode in your Flutter app for webinars, online classes, and broadcast-style calling experiences with CometChat."` 2. Added Quick Reference `` block with: `PresentationSettingsBuilder` code showing `..enableDefaultLayout`, `..isPresenter = true` (presenter) and `..isPresenter = false` (viewer); `CometChatCalls.joinPresentation(callToken, settings)` code for both roles 3. Added Response accordion after `joinPresentation()` — `Widget?` representing the presentation UI, documented as: "A Flutter widget containing the presentation UI. Display this widget in your screen to show the presentation interface." 4. Added Error accordion after `joinPresentation()` — `code` (`"ERR_CHAT_API_FAILURE"`), `message` (`"Failed to start the presentation session."`), `details` (`"The call token provided is invalid or expired."`) 5. Added Next Steps CardGroup with 3 cards: "Default Call", "Recording", "Video View Customisation" | This was the final file updated (commit `9feb900b`). The Quick Reference shows both presenter and viewer code side-by-side so developers can see the `isPresenter` flag difference. |
-| `video-view-customisation.mdx` | 1. Added `description: "Learn how to customize the video view in CometChat calls for Flutter."` 2. Added Quick Reference `` block with: video view customization code 3. Added Next Steps CardGroup with 3 cards: "Presenter Mode", "Default Call", "Recording" | No response/error accordions — this page covers UI customization, not SDK method calls. |
-| `real-time-listeners.mdx` | 1. Added `description: "Complete reference for all real-time event listeners in the CometChat Flutter SDK."` 2. Added Quick Reference `` block listing all 5 listener types with their key callbacks: `MessageListener` (onTextMessageReceived, onMediaMessageReceived, onCustomMessageReceived, onMessageEdited, onMessageDeleted, onMessagesDelivered, onMessagesRead, onTypingStarted, onTypingEnded, onTransientMessageReceived), `UserListener` (onUserOnline, onUserOffline), `GroupListener` (onGroupMemberJoined, onGroupMemberLeft, onGroupMemberKicked, onGroupMemberBanned, onGroupMemberUnbanned, onGroupMemberScopeChanged, onMemberAddedToGroup), `CallListener` (onIncomingCallReceived, onOutgoingCallAccepted, onOutgoingCallRejected, onIncomingCallCancelled), `ConnectionListener` (onConnected, onConnecting, onDisconnected, onFeatureThrottled) 3. Added Next Steps CardGroup with 3 cards: "Receive Messages", "Connection Status", "Login Listeners" | The Quick Reference is a comprehensive callback catalog — developers can scan all available listener callbacks in one place without reading the full page. |
-| `login-listeners.mdx` | 1. Added `description: "Learn how to handle login and logout state changes using LoginListener in CometChat Flutter SDK."` 2. Added Quick Reference `` block with: `CometChat.addLoginListener()` code showing `onLoginSuccess`, `onLoginFailure`, `onLogoutSuccess`, `onLogoutFailure` callbacks 3. Added Next Steps CardGroup with 3 cards: "Authentication", "Real-Time Listeners", "Connection Status" | Login listeners help developers react to auth state changes (e.g., auto-redirect on logout). |
-| `connection-status.mdx` | 1. Added `description: "Monitor real-time WebSocket connection status with CometChat SDK using ConnectionListener callbacks and getConnectionStatus method."` 2. Added Quick Reference `` block with: `CometChat.addConnectionListener()` code showing `onConnected`, `onConnecting`, `onDisconnected`, `onFeatureThrottled` callbacks; `CometChat.getConnectionStatus()` code returning `CometChatConnectionStatus.connected`/`.connecting`/`.disconnected` 3. Added Next Steps CardGroup with 3 cards: "Connection Behaviour", "Real-Time Listeners", "Login Listeners" | The Quick Reference shows both the listener approach (reactive) and the `getConnectionStatus()` approach (polling) for monitoring connection state. |
-| `connection-behaviour.mdx` | 1. Added `description: "Understand how CometChat SDK manages WebSocket connections in auto and manual modes, including background behavior and reconnection handling."` 2. Added Quick Reference `` block comparing Auto Mode (default — SDK manages connections automatically) vs Manual Mode (`autoEstablishSocketConnection = false` — developer controls `connect()`/`disconnect()`/`ping()`) 3. Added Response accordion after `CometChat.connect()` — `String` success message 4. Added Error accordion after `CometChat.connect()` 5. Added Response accordion after `CometChat.disconnect()` — `String` success message 6. Added Error accordion after `CometChat.disconnect()` 7. Added Response accordion after `CometChat.ping()` — `String` success message 8. Added Error accordion after `CometChat.ping()` 9. Added Next Steps CardGroup with 3 cards: "Connection Status", "Real-Time Listeners", "Setup" | The auto vs manual mode comparison in the Quick Reference is a key decision point for developers — most should use auto mode, but apps with specific background requirements may need manual mode. |
-| `session-timeout.mdx` | 1. Added `description: "Learn how to configure session timeout behavior in CometChat Flutter SDK."` 2. Added Quick Reference `` block with: session timeout configuration code 3. Added Next Steps CardGroup with 3 cards: "Authentication", "Connection Behaviour", "Login Listeners" | No response/error accordions — session timeout is a configuration, not a method call. |
-| `rate-limits.mdx` | 1. Added `description: "Understand the API rate limits for CometChat Flutter SDK operations."` 2. Added Quick Reference `` block summarizing rate limit categories and their values (messages per second, API calls per minute, etc.) 3. Added Next Steps CardGroup with 3 cards: "Send Messages", "Retrieve Conversations", "Setup" | The Quick Reference gives developers a quick view of rate limits without reading the full table. |
-| `advanced-overview.mdx` | 1. Added `description: "Advanced SDK features including connection management, real-time listeners, and login state handling for Flutter applications."` 2. Added Quick Reference `` block listing 4 advanced features with one-line descriptions and links: Connection Status (monitor SDK connection state), Connection Behaviour (understand connection lifecycle), Login Listeners (handle login state changes), Real-Time Listeners (all event listeners reference) 3. Added Next Steps CardGroup with 4 cards: "Connection Status", "Real-Time Listeners", "Login Listeners", "Connection Behaviour" | Index page for the Advanced section. |
-| `resources-overview.mdx` | 1. Added `description` frontmatter 2. Added Quick Reference `` block listing resource topics 3. Added Next Steps CardGroup | Index page for the Resources section. |
-| `flutter-overview.mdx` | 1. Added `description` frontmatter 2. Added Quick Reference `` block with high-level SDK capabilities: real-time messaging, voice/video calling, user/group management, typing indicators, read receipts, file sharing, reactions, mentions, interactive messages, AI features 3. Added Next Steps CardGroup with 4 cards: "Overview/Setup", "Key Concepts", "Authentication", "Send Messages" | Top-level Flutter SDK overview — the Quick Reference gives a feature checklist. |
-| `upgrading-from-v3-guide.mdx` | 1. Added `description: "Guide for migrating your Flutter app from CometChat SDK v3 to v4."` 2. Added Quick Reference `` block summarizing key v3→v4 breaking changes and migration steps 3. Added Next Steps CardGroup with 3 cards: "Setup", "Authentication", "Key Concepts" | The Quick Reference gives a scannable migration checklist. |
-| `ai-agents.mdx` | 1. Added `description: "Learn how to integrate AI Agents in your Flutter app to enable intelligent, automated interactions that process user messages, trigger tools, and respond with contextually relevant information."` 2. Added Quick Reference `` block with: `CometChat.addAIAssistantListener("LISTENER_ID", AIAssistantListener(onAIAssistantEventReceived: (event) {}))` code, `CometChat.addMessageListener("LISTENER_ID", MessageListener(onAIAssistantMessageReceived: (msg) {}, onAIToolResultReceived: (result) {}))` code, `CometChat.removeAIAssistantListener("LISTENER_ID")` cleanup code 3. Added ``: "Available via: SDK \| REST API \| UI Kits \| Dashboard" 4. Added ``: "Always remove AI Assistant listeners when they're no longer needed (e.g., on widget dispose or page navigation). Failing to remove listeners can cause memory leaks and duplicate event handling." 5. Added Next Steps CardGroup with 3 cards: "AI Moderation", "AI Chatbots", "Extensions" | The Quick Reference shows both the AI-specific listener (`AIAssistantListener`) and the message listener callbacks for AI events (`onAIAssistantMessageReceived`, `onAIToolResultReceived`). The memory leak warning is especially important for AI listeners since they may be added in multiple screens. |
-| `ai-moderation.mdx` | 1. Added `description: "Learn how to implement AI-powered content moderation in your Flutter app using CometChat SDK to automatically review messages for inappropriate content."` 2. Added Quick Reference `` block with: moderation check code showing `message.metadata["@injected"]["extensions"]["ai-moderation"]` path, status values (`"approved"`, `"pending"`, `"rejected"`), real-time listener for moderation status updates 3. Added Response accordion after sending a moderated message — `BaseMessage` with `metadata` containing nested `@injected.extensions.ai-moderation` object with fields: `status` (`"pending"`), `confidence` (number), `categories` (array of flagged categories) 4. Added Error accordion 5. Added Response accordion for real-time moderation status update — same metadata structure with `status` changed to `"approved"` or `"rejected"` 6. Added Error accordion 7. Added Next Steps CardGroup with 4 cards: "AI Agents", "AI Chatbots", "Send Messages", "Extensions" | The moderation metadata path (`@injected.extensions.ai-moderation`) is deeply nested — the Response accordion documents the exact path developers need to access moderation results. The two Response accordions show the initial "pending" state and the final "approved"/"rejected" state. |
-| `ai-chatbots-overview.mdx` | 1. Added `description: "Configure AI-powered chatbots to provide automated assistance and maintain conversational momentum in your Flutter app."` 2. Added Quick Reference `` block summarizing: chatbot configuration via Dashboard, chatbot types (rule-based, AI-powered), integration with messaging flow 3. Added Next Steps CardGroup with 4 cards: "AI Agents", "AI Moderation", "AI User Copilot", "Extensions" | Index page for AI chatbots — no SDK method calls, so no response/error accordions. |
-| `extensions-overview.mdx` | 1. Added `description: "Explore CometChat extensions that add enhanced functionality to your Flutter chat application"` 2. Added Quick Reference `` block listing all extension categories: User Experience (Pin message, Link preview, Thumbnails, Voice transcription), User Engagement (Polls, Reactions, Mentions, Message translation, Stickers), Collaboration (Whiteboard, Collaborative documents), Notifications (Push, Email, SMS), Moderation (Content filtering, Profanity detection), Security (Disappearing messages, End-to-end encryption) — with link to full Extensions Overview 3. Added ``: "Available via: SDK \| REST API \| UI Kits" 4. Added Next Steps CardGroup with 3 cards: "AI Features", "Webhooks", "Setup" | The Quick Reference is a comprehensive extension catalog organized by category — developers can quickly find which extension they need. |
-| `webhooks-overview.mdx` | 1. Added `description: "Configure server-side webhooks to receive real-time notifications for messages, users, groups, calls, and moderation events in your Flutter application."` 2. Added Quick Reference `` block with: setup requirements (HTTPS endpoint, publicly accessible URL, POST method with `application/json`, return HTTP 200 OK), event categories (Messages: `message_sent`/`message_edited`/`message_deleted`/`message_read_receipt`; Users: `user_blocked`/`user_unblocked`/`user_connection_status_changed`; Groups: `group_created`/`group_member_added`/`group_member_left`; Calls: `call_initiated`/`call_started`/`call_ended`/`recording_generated`; Moderation: `moderation_engine_approved`/`moderation_engine_blocked`), configuration link to Dashboard 3. Added ``: "Webhooks are configured at the application level through the CometChat Dashboard, not within the Flutter SDK. The SDK handles real-time events via listeners, while webhooks deliver events to your backend server." 4. Added Next Steps CardGroup with 3 cards: "Extensions", "Real-Time Listeners", "AI Agents" | The Quick Reference lists all webhook event names — this is valuable for backend developers who need to know which events to listen for. The `` clarifies the SDK vs webhook distinction (SDK = client-side listeners, webhooks = server-side HTTP callbacks). |
diff --git a/sdk/javascript/leave-group.mdx b/sdk/javascript/leave-group.mdx
index d3a9c32a1..9ec256558 100644
--- a/sdk/javascript/leave-group.mdx
+++ b/sdk/javascript/leave-group.mdx
@@ -49,6 +49,10 @@ Once a group is left, the user will no longer receive any updates or messages pe
On success, the method resolves with `true` (boolean).
+
+The group **owner cannot leave** the group directly — `leaveGroup()` rejects for the owner. Transfer ownership to another member with [`transferGroupOwnership()`](/sdk/javascript/transfer-group-ownership) first, then call `leaveGroup()`.
+
+
## Real-time Group Member Left Events
Register a `GroupListener` to receive events when members leave.
diff --git a/ui-kit/react/astro-tab-based-chat.mdx b/ui-kit/react/astro-tab-based-chat.mdx
index 3d6b45ee0..4d5d92e65 100644
--- a/ui-kit/react/astro-tab-based-chat.mdx
+++ b/ui-kit/react/astro-tab-based-chat.mdx
@@ -53,6 +53,7 @@ import {
CometChatConversations,
CometChatUsers,
CometChatCallLogs,
+ CometChatGroupMembers,
CometChatMessageHeader,
CometChatMessageList,
CometChatMessageComposer,
@@ -65,6 +66,8 @@ export default function TabbedChat() {
const [activeTab, setActiveTab] = useState("chat");
const [selectedUser, setSelectedUser] = useState(undefined);
const [selectedGroup, setSelectedGroup] = useState(undefined);
+ const [selectedConversation, setSelectedConversation] = useState(undefined);
+ const [showDetails, setShowDetails] = useState(false);
useEffect(() => {
const settings = new UIKitSettingsBuilder()
@@ -83,6 +86,7 @@ export default function TabbedChat() {
if (!ready) return
Loading chat...
;
const handleConversationClick = (conversation: CometChat.Conversation) => {
+ setSelectedConversation(conversation); // highlights the open row in the Conversations list
const entity = conversation.getConversationWith();
if (conversation.getConversationType() === "user") {
setSelectedUser(entity as CometChat.User);
@@ -182,20 +186,27 @@ export default function TabbedChat() {
@@ -212,6 +223,23 @@ export default function TabbedChat() {
Select a conversation to start chatting
)}
+
+ {/* Details / members side panel — opened from the header, closed via onBack */}
+ {showDetails && selectedGroup && (
+
+ setShowDetails(false)}
+ />
+
+ )}
);
@@ -245,6 +273,8 @@ import TabbedChat from '../components/TabbedChat.tsx';
4. **Conditional rendering** — only the active tab's component mounts. Switching tabs unmounts the previous list and mounts the new one.
5. **Unified selection** — all three tabs feed into the same `selectedUser` / `selectedGroup` state. Clicking any item (conversation, call log, or user) updates the message panel.
6. **Call log handling** — when a call log is clicked, the receiver (user or group) is extracted and passed to the message components.
+7. **Active highlight** — the current selection is passed back to each list as `activeConversation` / `activeUser` (and `activeGroup` on a Groups tab), so the open row stays highlighted while its chat is on screen.
+8. **Details panel round-trip** — clicking the message header opens a group details / members side panel (`CometChatGroupMembers`). Its `onBack` sets `showDetails` back to `false`, closing the panel — the full open→close cycle, not just opening it.
---
@@ -283,6 +313,7 @@ type Tab = "chat" | "calls" | "users" | "groups";
setSelectedGroup(group);
setSelectedUser(undefined);
}}
+ activeGroup={selectedGroup}
/>
)}
```
diff --git a/ui-kit/react/campaigns.mdx b/ui-kit/react/campaigns.mdx
index c8ac622c1..42ed7ca36 100644
--- a/ui-kit/react/campaigns.mdx
+++ b/ui-kit/react/campaigns.mdx
@@ -55,6 +55,10 @@ The Cards library is a **pure renderer**:
It does not execute actions, manage message state, or call any SDK methods. When users click interactive elements (buttons, links), the library emits the action to your callback. You decide what happens — open a URL, navigate to a chat, make an API call, etc.
+
+When wiring the `onAction` callback, handle each action type (`openUrl`, `chatWithUser`, `chatWithGroup`, `sendMessage`, and the rest) explicitly in your own code. For the recommended pattern of turning card actions into app behavior, see [Event System — Card Actions](/ui-kit/react/event-system#card-actions).
+
+
### Card Schema JSON Example
```json
@@ -151,6 +155,10 @@ You don't need to interact with the Cards library directly when using `CometChat
## Handling Push Notifications for Campaigns
+
+**Prerequisite: Push Notifications must be configured first.** The tracking calls below only apply once you have set up a push provider (**FCM** or **Web Push**) and are receiving campaign pushes. Start with [Web Push Notifications setup](/notifications/web-push-notifications), and see the [Push Notifications overview](/notifications/push-overview) for provider options and the delivery pipeline.
+
+
When a campaign push notification arrives via Web Push or FCM, you should:
1. **Report delivery** — Call `CometChat.markPushNotificationDelivered()` when the notification is received
diff --git a/ui-kit/react/components/ai-assistant-chat.mdx b/ui-kit/react/components/ai-assistant-chat.mdx
index ed52d939e..eff675a3a 100644
--- a/ui-kit/react/components/ai-assistant-chat.mdx
+++ b/ui-kit/react/components/ai-assistant-chat.mdx
@@ -4,95 +4,32 @@ description: "AI agent chat interface with streaming responses, suggested messag
---
-```json
-{
- "component": "CometChatAIAssistantChat",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatAIAssistantChat } from \"@cometchat/chat-uikit-react\";",
- "description": "AI agent chat interface with streaming responses, suggested messages, tool calling, and conversation history.",
- "cssRootClass": ".cometchat-ai-assistant-chat",
- "primaryOutput": {
- "prop": "onSendButtonClick",
- "type": "(message: CometChat.BaseMessage) => void"
- },
- "props": {
- "data": {
- "user": {
- "type": "CometChat.User",
- "default": "REQUIRED",
- "note": "The AI assistant user entity"
- },
- "streamingSpeed": {
- "type": "number",
- "default": 30,
- "note": "Milliseconds between text chunks during streaming"
- },
- "aiAssistantTools": {
- "type": "CometChatAIAssistantTools",
- "default": "undefined",
- "note": "Tool handlers for AI function calls"
- },
- "loadLastAgentConversation": {
- "type": "boolean",
- "default": false
- },
- "suggestedMessages": {
- "type": "string[]",
- "default": "[] (falls back to user metadata)"
- },
- "parentMessageId": {
- "type": "number",
- "default": "undefined",
- "note": "Load a specific conversation thread"
- }
- },
- "callbacks": {
- "onSendButtonClick": "(message: CometChat.BaseMessage) => void",
- "onBackButtonClicked": "() => void",
- "onCloseButtonClicked": "() => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "visibility": {
- "hideSuggestedMessages": { "type": "boolean", "default": false },
- "hideChatHistory": { "type": "boolean", "default": false },
- "hideNewChat": { "type": "boolean", "default": false },
- "showBackButton": { "type": "boolean", "default": false },
- "showCloseButton": { "type": "boolean", "default": false }
- },
- "viewSlots": {
- "emptyChatImageView": "ReactNode",
- "emptyChatGreetingView": "ReactNode",
- "emptyChatIntroMessageView": "ReactNode",
- "emptyView": "ReactNode",
- "loadingView": "ReactNode",
- "errorView": "ReactNode",
- "headerItemView": "ReactNode",
- "headerTitleView": "ReactNode",
- "headerSubtitleView": "ReactNode",
- "headerLeadingView": "ReactNode",
- "headerTrailingView": "ReactNode",
- "headerAuxiliaryButtonView": "ReactNode"
- }
- },
- "events": [
- {
- "name": "ui:compose/text",
- "payload": "{ text }",
- "description": "Suggestion pill clicked (sets text in composer)"
- }
- ],
- "sdkListeners": [],
- "types": {
- "CometChatAIAssistantTools": "Class — maps tool function names to handler functions via constructor(actions: Record) => void>)"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatAIAssistantChat` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatAIAssistantChat } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-ai-assistant-chat` |
+| Primary output | `onSendButtonClick: (message: CometChat.BaseMessage) => void` — emits the sent user message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus an [AI Agent](/ai-agents/agent-builder/overview) configured in the Dashboard (passed as the `user` prop) |
+| Stitching | Pass the AI Agent's `user` entity; the component streams replies and handles tool calls internally |
+| Events emitted | `ui:compose/text` — sets text in the composer when a suggestion pill is clicked — see the [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | None directly; internally uses the message list's SDK listeners for message updates, plus an AI assistant listener for streaming replies |
+| Full props | See [Props](#props) |
+
## Overview
`CometChatAIAssistantChat` is an AI agent chat interface. It renders a full chat experience with streaming responses, suggested message pills, tool calling support, and a conversation history sidebar. Pass a `CometChat.User` representing the AI assistant and the component handles the rest — message threading, streaming display, and composer integration.
+
+**Prerequisite: an AI Agent must be configured in the CometChat Dashboard.** This component renders nothing useful without one. `CometChatAIAssistantChat` requires an **AI Agent set up in the Dashboard as a `CometChat.User`**, and the `user` prop must be that agent's user entity. The agent's replies, tool execution, and metadata — including `suggestedMessages`, `greetingMessage`, `introductoryMessage`, and tool configuration — are defined when you create the agent.
+
+Set up the agent with the [AI Agent Builder](/ai-agents/agent-builder/overview).
+
+
**1:1 and group conversations.** AI Agents work in both one-on-one and group conversations. In a 1:1 chat, the end user talks directly with the agent user. In a group, the agent participates as a member — its messages (including cards) are delivered and attributed like any other member's message. If the group contains only one user and one agent, the agent responds automatically. In groups with more than two members, the agent only responds when @mentioned.
diff --git a/ui-kit/react/components/audio-bubble.mdx b/ui-kit/react/components/audio-bubble.mdx
index 0c2a1e774..18d981e4b 100644
--- a/ui-kit/react/components/audio-bubble.mdx
+++ b/ui-kit/react/components/audio-bubble.mdx
@@ -5,25 +5,18 @@ description: "A batch-aware bubble that renders one or more audio file attachmen
---
-```json
-{
- "component": "CometChatAudiosBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatAudiosBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Batch-aware audio bubble for attached audio files. Renders stacked audio cards with play/pause, seekable slider, duration, and download. NOT used for voice notes — see CometChatVoiceNoteBubble.",
- "cssRootClass": ".cometchat-audios-bubble",
- "selfExtracting": true,
- "multiAttachment": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of audio attachments and caption." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatAudiosBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatAudiosBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-audios-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/call-action-bubble.mdx b/ui-kit/react/components/call-action-bubble.mdx
index 16032d5a1..c6dc8dfa6 100644
--- a/ui-kit/react/components/call-action-bubble.mdx
+++ b/ui-kit/react/components/call-action-bubble.mdx
@@ -5,24 +5,18 @@ description: "A self-extracting bubble that renders call status system messages
---
-```json
-{
- "component": "CometChatCallActionBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCallActionBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting bubble for call status system messages. Derives the status text, icon, and error color from the SDK call message and the logged-in user.",
- "cssRootClass": ".cometchat-action-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true, "note": "The call message (audio/video) in the 'call' category. Drives all extraction." },
- "className": { "type": "string", "default": "undefined", "note": "Additional CSS class for the root element" }
- }
- },
- "rendersThrough": "CometChatActionBubble (base primitive)",
- "usedBy": ["CometChatCallActionPlugin"]
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCallActionBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCallActionBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-action-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/call-bubble.mdx b/ui-kit/react/components/call-bubble.mdx
index 8a5bd8541..c4e6b8eae 100644
--- a/ui-kit/react/components/call-bubble.mdx
+++ b/ui-kit/react/components/call-bubble.mdx
@@ -5,24 +5,18 @@ description: "A self-extracting bubble for direct-call / meeting messages, with
---
-```json
-{
- "component": "CometChatCallBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCallBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting call bubble for meeting / direct-call custom messages. Derives the call type, session ID, title, icon, and timestamp from the message.",
- "cssRootClass": ".cometchat-call-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true, "note": "The meeting/direct-call message; drives extraction." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "onJoinClick": { "type": "(sessionId: string) => void" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCallBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCallBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-call-bubble` |
+| Primary output | Self-extracting call bubble; `onJoinClick: (sessionId: string) => void` starts the call on Join |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; see [Calling Integration](/ui-kit/react/calling-integration) to start/join a call session |
+| Stitching | Wire `onJoinClick` to start the call (see [Calling Integration](/ui-kit/react/calling-integration)) |
+| Full props | See [Props](#props) |
+
## Overview
@@ -92,7 +86,11 @@ Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.
### onJoinClick
-Callback when the Join button is clicked. Receives the session ID.
+Callback when the Join button is clicked. Receives the session ID. Empty by default — you must start or join the call session yourself.
+
+
+See [Calling Integration](/ui-kit/react/calling-integration) for how to start or join a call session.
+
| | |
| --- | --- |
diff --git a/ui-kit/react/components/call-buttons.mdx b/ui-kit/react/components/call-buttons.mdx
index 33e323647..50de83487 100644
--- a/ui-kit/react/components/call-buttons.mdx
+++ b/ui-kit/react/components/call-buttons.mdx
@@ -4,85 +4,21 @@ description: "Voice and video call buttons for user or group conversations, with
---
-```json
-{
- "component": "CometChatCallButtons",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCallButtons } from \"@cometchat/chat-uikit-react\";",
- "description": "Voice and video call initiation buttons for user or group conversations. Manages the full call lifecycle (outgoing + ongoing) internally.",
- "cssRootClass": ".cometchat-call-buttons",
- "primaryOutput": {
- "description": "Initiates calls via the SDK and renders the outgoing/ongoing call screens"
- },
- "props": {
- "data": {
- "user": {
- "type": "CometChat.User",
- "default": "undefined",
- "note": "Pass either user or group, not both"
- },
- "group": {
- "type": "CometChat.Group",
- "default": "undefined",
- "note": "Pass either user or group, not both"
- }
- },
- "callbacks": {
- "onVoiceCallClick": "(entity: CometChat.User | CometChat.Group) => void",
- "onVideoCallClick": "(entity: CometChat.User | CometChat.Group) => void",
- "onCallEnded": "() => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "visibility": {
- "hideVoiceCallButton": { "type": "boolean", "default": false },
- "hideVideoCallButton": { "type": "boolean", "default": false }
- },
- "viewSlots": {
- "voiceCallButtonView": "ReactNode",
- "videoCallButtonView": "ReactNode"
- },
- "configuration": {
- "callSettingsBuilder": "(isAudioOnlyCall: boolean, user?: CometChat.User, group?: CometChat.Group) => CallSettingsBuilder",
- "className": "string"
- }
- },
- "eventsEmitted": [
- {
- "name": "ui:call/outgoing",
- "payload": "{ call }",
- "description": "User initiates a 1-on-1 voice/video call"
- },
- {
- "name": "ui:message/sent",
- "payload": "{ message, status }",
- "description": "Group call meeting message sent"
- }
- ],
- "eventsReceived": [
- {
- "name": "ui:call/rejected",
- "payload": "{ call }",
- "description": "Re-enables call buttons after the call is rejected"
- },
- {
- "name": "ui:call/ended",
- "payload": "{}",
- "description": "Resets all call state when the call ends"
- }
- ],
- "sdkListeners": [
- "onIncomingCallReceived",
- "onIncomingCallCancelled",
- "onOutgoingCallAccepted",
- "onOutgoingCallRejected"
- ],
- "compositionExample": {
- "description": "Standalone call buttons or embedded in the MessageHeader auxiliary view",
- "components": ["CometChatCallButtons", "CometChatOutgoingCall", "CometChatOngoingCall"],
- "flow": "user/group prop -> click button -> SDK initiateCall -> CometChatOutgoingCall overlay -> onOutgoingCallAccepted -> CometChatOngoingCall"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCallButtons` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCallButtons } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-call-buttons` |
+| Primary output | Initiates voice/video calls via the SDK and renders the outgoing/ongoing call screens; `onVoiceCallClick` / `onVideoCallClick` override the default initiation |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the Calls SDK installed and calling enabled — see [Calling Integration](/ui-kit/react/calling-integration) |
+| Stitching | Pass `user` or `group`; the buttons manage the outgoing/ongoing call lifecycle internally (see [Calling Integration](/ui-kit/react/calling-integration)) |
+| Events emitted | `ui:call/outgoing`, `ui:message/sent` — see [Event System](/ui-kit/react/event-system) |
+| Events received | `ui:call/rejected`, `ui:call/ended` — see [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Incoming call events (received/cancelled) and outgoing call events (accepted/rejected) to sync button state and screen transitions |
+| Full props | See [Props](#props) |
+
## Where It Fits
@@ -417,7 +353,7 @@ All props are optional. Sorted alphabetically.
### callSettingsBuilder
-Builder function for customizing the ongoing call settings.
+Builder function for customizing the ongoing call settings, built via `callSettings`. See [Calling Integration](/ui-kit/react/calling-integration) for call-settings setup.
| | |
| --- | --- |
diff --git a/ui-kit/react/components/call-logs.mdx b/ui-kit/react/components/call-logs.mdx
index 5f30f2500..a06ef9c68 100644
--- a/ui-kit/react/components/call-logs.mdx
+++ b/ui-kit/react/components/call-logs.mdx
@@ -4,85 +4,19 @@ description: "Scrollable list of call history with call details, duration, and t
---
-```json
-{
- "component": "CometChatCallLogs",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCallLogs } from \"@cometchat/chat-uikit-react\";",
- "description": "Scrollable list of call history with call details, duration, and the ability to initiate new calls.",
- "cssRootClass": ".cometchat-call-logs",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(call: any) => void"
- },
- "props": {
- "data": {
- "activeCall": {
- "type": "any",
- "default": "undefined",
- "note": "Object representing the active/selected call log"
- },
- "callLogRequestBuilder": {
- "type": "any",
- "default": "limit 30, category \"call\"",
- "note": "Custom request builder for filtering call logs"
- },
- "callInitiatedDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "hh:mm A today, Yesterday, dddd last week, DD/MM/YYYY older"
- }
- },
- "callbacks": {
- "onItemClick": "(call: any) => void",
- "onCallButtonClicked": "(call: any) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "configuration": {
- "callSettingsBuilder": {
- "type": "any",
- "default": "undefined",
- "note": "Custom call settings builder for ongoing call sessions initiated from call logs"
- }
- },
- "visibility": {
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "viewSlots": {
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "itemView": "(call: any) => ReactNode",
- "leadingView": "(call: any) => ReactNode",
- "titleView": "(call: any) => ReactNode",
- "subtitleView": "(call: any) => ReactNode",
- "trailingView": "(call: any) => ReactNode"
- }
- },
- "events": [],
- "eventsReceived": [
- {
- "name": "ui:call/ended",
- "payload": "{}",
- "description": "Resets ongoing call state (hides call screen)"
- }
- ],
- "sdkListeners": [],
- "types": {
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCallLogs` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCallLogs } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-call-logs` |
+| Primary output | `onItemClick: (call: any) => void` — emits the selected call log |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Wire `onItemClick` / `onCallButtonClicked` to open details or start a call |
+| Events received | `ui:call/ended` — see [Event System](/ui-kit/react/event-system) |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/card-bubble.mdx b/ui-kit/react/components/card-bubble.mdx
index e65e879cd..c1a34976d 100644
--- a/ui-kit/react/components/card-bubble.mdx
+++ b/ui-kit/react/components/card-bubble.mdx
@@ -5,24 +5,18 @@ description: "A render-only bubble that draws developer-defined card messages (c
---
-```json
-{
- "component": "CometChatCardBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCardBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Render-only bubble for developer card messages (category \"card\"). Stringifies the raw payload from message.getCard() and hands it to the prebuilt CometChatCardView renderer, then forwards user actions back to the app. It never parses, mutates, or acts on the card itself.",
- "cssRootClass": ".cometchat-card-bubble",
- "renderOnly": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.CardMessage", "required": true, "note": "The developer card message (category \"card\"). Drives message.getCard()." },
- "themeMode": { "type": "CometChatCardThemeMode", "default": "\"auto\"", "note": "Theme mode forwarded to CometChatCardView." },
- "themeOverride": { "type": "CometChatCardThemeOverride", "note": "Optional theme overrides forwarded to the renderer." },
- "onCardAction": { "type": "(message: CometChat.BaseMessage, action: CometChatCardAction) => void", "note": "Direct callback for card actions, fired in addition to the ui:card/action event." }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCardBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCardBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-card-bubble` |
+| Primary output | `onCardAction: (message: CometChat.BaseMessage, action: CometChatCardAction) => void` — forwards the user's card action |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/collaborative-document-bubble.mdx b/ui-kit/react/components/collaborative-document-bubble.mdx
index daeeef335..4bc808e9d 100644
--- a/ui-kit/react/components/collaborative-document-bubble.mdx
+++ b/ui-kit/react/components/collaborative-document-bubble.mdx
@@ -5,31 +5,28 @@ description: "A self-extracting bubble that renders a collaborative document car
---
-```json
-{
- "component": "CometChatCollaborativeDocumentBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCollaborativeDocumentBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting collaborative document bubble. Extracts the document URL from the message metadata and opens it on click.",
- "cssRootClass": ".cometchat-collaborative-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true, "note": "Drives extraction of the document URL." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "onButtonClick": { "type": "(url: string) => void", "note": "Defaults to window.open." },
- "disabled": { "type": "boolean", "default": false },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCollaborativeDocumentBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCollaborativeDocumentBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-collaborative-bubble` |
+| Primary output | `onButtonClick: (url: string) => void` — opens the document URL (defaults to `window.open`) |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the [Collaborative Document extension](/fundamentals/collaborative-document) enabled in the Dashboard |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
`CometChatCollaborativeDocumentBubble` renders a collaborative document card — a banner image, a title, a subtitle, and an "Open Document" button. It is **self-extracting**: pass the SDK `message` and the bubble reads the document URL from the message's extension metadata (`@injected.extensions.document.document_url`), so it works standalone. Clicking the button opens the document (by default in a new window).
+
+**Requires the Collaborative Document extension enabled in the [CometChat Dashboard](/fundamentals/collaborative-document).** Document messages (`extension_document`) — and the injected `document_url` this bubble reads — are only produced once the extension is turned on for your app. Without it the composer cannot create documents and this bubble never renders. See the [Collaborative Document guide](/fundamentals/collaborative-document) to enable it, and the [Plugins overview](/ui-kit/react/plugins/overview#built-in-plugins) for how the UI Kit auto-routes document messages to this bubble.
+
+
**Live Preview** — interact with the collaborative document bubble.
@@ -137,6 +134,9 @@ Additional CSS class applied to the root element.
Plugin behavior, context menu, and conversation preview
+
+ Turn on the extension that produces these messages
+
Render collaborative whiteboard messages
diff --git a/ui-kit/react/components/collaborative-whiteboard-bubble.mdx b/ui-kit/react/components/collaborative-whiteboard-bubble.mdx
index 7ad4dd731..8b0cb0741 100644
--- a/ui-kit/react/components/collaborative-whiteboard-bubble.mdx
+++ b/ui-kit/react/components/collaborative-whiteboard-bubble.mdx
@@ -5,31 +5,28 @@ description: "A self-extracting bubble that renders a collaborative whiteboard c
---
-```json
-{
- "component": "CometChatCollaborativeWhiteboardBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatCollaborativeWhiteboardBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting collaborative whiteboard bubble. Extracts the board URL from the message metadata and opens it on click.",
- "cssRootClass": ".cometchat-collaborative-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true, "note": "Drives extraction of the board URL." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "onButtonClick": { "type": "(url: string) => void", "note": "Defaults to window.open." },
- "disabled": { "type": "boolean", "default": false },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatCollaborativeWhiteboardBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatCollaborativeWhiteboardBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-collaborative-bubble` |
+| Primary output | Self-extracting; primary callback `onButtonClick: (url: string) => void` opens the whiteboard URL (defaults to `window.open`). |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the [Collaborative Whiteboard extension](/fundamentals/collaborative-whiteboard) enabled in the Dashboard. |
+| Stitching | None — self-extracting from the SDK message. |
+| Full props | See [Props](#props). |
+
## Overview
`CometChatCollaborativeWhiteboardBubble` renders a collaborative whiteboard card — a banner image, a title, a subtitle, and an "Open Whiteboard" button. It is **self-extracting**: pass the SDK `message` and the bubble reads the board URL from the message's extension metadata (`@injected.extensions.whiteboard.board_url`), so it works standalone. Clicking the button opens the whiteboard (by default in a new window).
+
+**Requires the Collaborative Whiteboard extension enabled in the [CometChat Dashboard](/fundamentals/collaborative-whiteboard).** Whiteboard messages (`extension_whiteboard`) — and the injected `board_url` this bubble reads — are only produced once the extension is turned on for your app. Without it the composer cannot create whiteboards and this bubble never renders. See the [Collaborative Whiteboard guide](/fundamentals/collaborative-whiteboard) to enable it, and the [Plugins overview](/ui-kit/react/plugins/overview#built-in-plugins) for how the UI Kit auto-routes whiteboard messages to this bubble.
+
+
**Live Preview** — interact with the collaborative whiteboard bubble.
@@ -137,6 +134,9 @@ Additional CSS class applied to the root element.
Plugin behavior, context menu, and conversation preview
+
+ Turn on the extension that produces these messages
+
Render collaborative document messages
diff --git a/ui-kit/react/components/conversations.mdx b/ui-kit/react/components/conversations.mdx
index a40324853..524c4d23f 100644
--- a/ui-kit/react/components/conversations.mdx
+++ b/ui-kit/react/components/conversations.mdx
@@ -4,129 +4,22 @@ description: "Scrollable list of recent one-on-one and group conversations for t
---
-```json
-{
- "component": "CometChatConversations",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatConversations } from \"@cometchat/chat-uikit-react\";",
- "description": "Scrollable list of recent one-on-one and group conversations for the logged-in user with real-time updates.",
- "cssRootClass": ".cometchat-conversations",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(conversation: CometChat.Conversation) => void"
- },
- "props": {
- "data": {
- "conversationsRequestBuilder": {
- "type": "CometChat.ConversationsRequestBuilder",
- "default": "SDK default (30 per page)",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "searchRequestBuilder": {
- "type": "CometChat.ConversationsRequestBuilder",
- "default": "undefined"
- },
- "searchKeyword": {
- "type": "string",
- "default": "undefined"
- },
- "activeConversation": {
- "type": "CometChat.Conversation",
- "default": "undefined"
- },
- "lastMessageDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "hh:mm A today, Yesterday, dddd last week, DD/MM/YYYY older"
- }
- },
- "callbacks": {
- "onItemClick": "(conversation: CometChat.Conversation) => void",
- "onSelect": "(conversation: CometChat.Conversation, selected: boolean) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null",
- "onEmpty": "() => void",
- "onSearchBarClicked": "() => void"
- },
- "visibility": {
- "hideReceipts": { "type": "boolean", "default": false },
- "hideUserStatus": { "type": "boolean", "default": false },
- "hideGroupType": { "type": "boolean", "default": false },
- "hideUnreadCount": { "type": "boolean", "default": false },
- "hideDeleteConversation": { "type": "boolean", "default": false },
- "showSearchBar": { "type": "boolean", "default": true },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "sound": {
- "disableSoundForMessages": { "type": "boolean", "default": false },
- "customSoundForMessages": { "type": "string", "default": "built-in" }
- },
- "selection": {
- "selectionMode": {
- "type": "CometChatConversationsSelectionMode",
- "values": ["'none'", "'single'", "'multiple'"],
- "default": "'none'"
- }
- },
- "viewSlots": {
- "itemView": "(conversation: CometChat.Conversation) => ReactNode",
- "leadingView": "(conversation: CometChat.Conversation) => ReactNode",
- "titleView": "(conversation: CometChat.Conversation) => ReactNode",
- "subtitleView": "(conversation: CometChat.Conversation) => ReactNode",
- "trailingView": "(conversation: CometChat.Conversation) => ReactNode",
- "headerView": "ReactNode",
- "searchView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "options": "(conversation: CometChat.Conversation) => CometChatConversationOption[]"
- }
- },
- "events": [
- {
- "name": "ui:conversation/deleted",
- "payload": "{ conversation: CometChat.Conversation }",
- "description": "Conversation deleted from list"
- }
- ],
- "sdkListeners": [
- "onTextMessageReceived",
- "onMediaMessageReceived",
- "onCustomMessageReceived",
- "onInteractiveMessageReceived",
- "onTypingStarted",
- "onTypingEnded",
- "onMessagesDelivered",
- "onMessagesRead",
- "onUserOnline",
- "onUserOffline",
- "onGroupMemberJoined",
- "onGroupMemberLeft",
- "onGroupMemberKicked",
- "onGroupMemberBanned",
- "onMemberAddedToGroup"
- ],
- "types": {
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- },
- "CometChatConversationOption": {
- "id": "string",
- "title": "string",
- "iconURL": "string | undefined",
- "onClick": "(conversation: CometChat.Conversation) => void"
- },
- "CometChatConversationsSelectionMode": "'none' | 'single' | 'multiple'"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatConversations` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatConversations } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-conversations` |
+| Primary output | `onItemClick: (conversation: CometChat.Conversation) => void` — emits the selected conversation to open |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Wire `onItemClick` → derive the user/group with `conversation.getConversationWith()` → mount `CometChatMessageHeader` / `CometChatMessageList` / `CometChatMessageComposer` (see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation)). Full search needs `onSearchBarClicked` → [`CometChatSearch`](/ui-kit/react/components/search) (see the [Search Messages guide](/ui-kit/react/guide-search-messages)) |
+| Events emitted | `ui:conversation/deleted` — see the [Event System](/ui-kit/react/event-system) |
+| Events received | Subscribes to `ui:message/*`, `ui:conversation/*`, and `ui:group/*` events published by other components — see the [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Messages, typing, receipts, presence, and group membership are handled internally — no wiring needed |
+| Active highlight | Pass the selected conversation back as `activeConversation` to highlight the open row — see [activeConversation](#activeconversation) |
+| Full props | See [Props](#props) |
+
## Overview
@@ -200,6 +93,8 @@ function Sidebar() {
### Full Layout Example
+`onItemClick` is where you derive the selected user or group from the conversation and mount the `MessageHeader` / `MessageList` / `MessageComposer` panel — see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation) for the full two-panel wiring.
+
```tsx
import { useState } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
@@ -213,8 +108,10 @@ import {
function ChatApp() {
const [user, setUser] = useState();
const [group, setGroup] = useState();
+ const [activeConversation, setActiveConversation] = useState();
const handleConversationClick = (conversation: CometChat.Conversation) => {
+ setActiveConversation(conversation); // highlights the open row in the list
const entity = conversation.getConversationWith();
if (conversation.getConversationType() === "user") {
setUser(entity as CometChat.User);
@@ -228,7 +125,10 @@ function ChatApp() {
return (
-
+
@@ -276,6 +176,8 @@ To use the search bar as a trigger for a custom search UI (like `CometChatSearch
/>
```
+See the [Search Messages guide](/ui-kit/react/guide-search-messages) for wiring a full search experience across conversations and messages.
+
### Filter Recipes
| Recipe | Code |
@@ -309,7 +211,7 @@ UI events this component publishes:
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components). These flow through the shared UI event bus — see the [Event System](/ui-kit/react/event-system) for how components publish and subscribe.
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -863,6 +765,10 @@ function CustomOptionsConversations() {
return ;
}
```
+
+
+The `onClick` handlers above are placeholders — the component only renders the menu items; you must implement the actual behavior (delete, mute, pin, mark-unread, block). For the Block option, wire it to the SDK and refresh UI state as shown in the [Block/Unblock User guide](/ui-kit/react/guide-block-unblock-user).
+
```css
@@ -1048,6 +954,10 @@ Whether to show the search bar. Set to `false` to hide it entirely.
| Type | `boolean` |
| Default | `true` |
+
+Showing the bar is not the same as enabling search. To power a full **conversation + message search** experience you need two more things: (1) enable **Conversation & Advanced Search** for your app in the [CometChat Dashboard](https://app.cometchat.com), and (2) wire the bar as a trigger — pass [`onSearchBarClicked`](#onsearchbarclicked) to open a [`CometChatSearch`](/ui-kit/react/components/search) panel and switch views. See the [Search Messages guide](/ui-kit/react/guide-search-messages) for the full wiring across conversations and messages.
+
+
---
### showScrollbar
diff --git a/ui-kit/react/components/delete-bubble.mdx b/ui-kit/react/components/delete-bubble.mdx
index 87511df46..fb0812883 100644
--- a/ui-kit/react/components/delete-bubble.mdx
+++ b/ui-kit/react/components/delete-bubble.mdx
@@ -5,22 +5,18 @@ description: "A presentational bubble that renders a 'This message was deleted'
---
-```json
-{
- "component": "CometChatDeleteBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatDeleteBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Presentational placeholder bubble for deleted messages.",
- "cssRootClass": ".cometchat-delete-bubble",
- "props": {
- "data": {
- "isSentByMe": { "type": "boolean", "note": "Affects sent vs received styling." },
- "text": { "type": "string", "note": "Defaults to localized \"This message was deleted\"." },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatDeleteBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatDeleteBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-delete-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/file-bubble.mdx b/ui-kit/react/components/file-bubble.mdx
index f5d4e97a8..51d037af9 100644
--- a/ui-kit/react/components/file-bubble.mdx
+++ b/ui-kit/react/components/file-bubble.mdx
@@ -5,25 +5,18 @@ description: "A batch-aware bubble that renders one or more generic file attachm
---
-```json
-{
- "component": "CometChatFilesBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatFilesBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Batch-aware file bubble. Extracts file attachments and caption from a MediaMessage; renders stacked file cards with type icons, name, size, extension, and download. Collapses to 3 cards with '+N more' expander.",
- "cssRootClass": ".cometchat-files-bubble",
- "selfExtracting": true,
- "multiAttachment": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of file attachments and caption." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatFilesBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatFilesBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-files-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/flag-message-dialog.mdx b/ui-kit/react/components/flag-message-dialog.mdx
index b5d5ef220..6d5336dbf 100644
--- a/ui-kit/react/components/flag-message-dialog.mdx
+++ b/ui-kit/react/components/flag-message-dialog.mdx
@@ -5,42 +5,18 @@ description: "A dialog for reporting inappropriate messages with reason selectio
---
-```json
-{
- "component": "CometChatFlagMessageDialog",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatFlagMessageDialog } from \"@cometchat/chat-uikit-react\";",
- "description": "Dialog for reporting/flagging an inappropriate message. Fetches flag reasons from the SDK, captures an optional remark, and submits the report.",
- "cssRootClass": ".cometchat-flag-message-dialog",
- "primaryOutput": {
- "prop": "onSubmit",
- "type": "(messageId: string, reasonId: string, remark?: string) => Promise"
- },
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "note": "Required. The message being flagged." },
- "isOpen": { "type": "boolean", "note": "When provided, the dialog is controlled." }
- },
- "callbacks": {
- "onSubmit": { "type": "(messageId: string, reasonId: string, remark?: string) => Promise", "note": "Return true to close, false to keep open and show an error." },
- "onClose": { "type": "() => void" },
- "onError": { "type": "((error: CometChat.CometChatException) => void) | null" }
- },
- "config": {
- "closeOnOutsideClick": { "type": "boolean", "default": true },
- "className": { "type": "string" }
- }
- },
- "types": {
- "CometChatFlagMessageDialogRootProps": "Root overlay props",
- "CometChatFlagMessageDialogHeaderProps": "Header sub-component props",
- "CometChatFlagMessageDialogReasonsProps": "Reasons list sub-component props",
- "CometChatFlagMessageDialogRemarkProps": "Remark input sub-component props",
- "CometChatFlagMessageDialogActionsProps": "Actions (cancel/submit) sub-component props",
- "CometChatFlagMessageDialogContextValue": "Full context value"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatFlagMessageDialog` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatFlagMessageDialog } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-flag-message-dialog` |
+| Primary output | `onSubmit: (messageId: string, reasonId: string, remark?: string) => Promise` — submits the flag report |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the target `message`; implement `onSubmit` (return `true` to close) and `onClose` to dismiss |
+| Full props | See [Props](#props) |
+
## Where It Fits
@@ -226,6 +202,10 @@ Called when an SDK error occurs (e.g., while fetching reasons or during submissi
On open, the dialog calls `CometChat.getFlagReasons()` and renders the result as a single-select list. While loading, a loading state is shown. If the call fails, `onError` is invoked.
+
+Report reasons come from your CometChat **Moderation / Report Message** configuration in the Dashboard, fetched via `CometChat.getFlagReasons()`. Configure custom reasons and review flagged messages in [Moderation](/moderation/overview). The parent component must implement `onSubmit` to submit the report.
+
+
### Remark
The remark is optional. It is trimmed before submission, and an empty remark is passed as `undefined` to `onSubmit`. A character counter enforces `maxLength` (default 500).
diff --git a/ui-kit/react/components/group-action-bubble.mdx b/ui-kit/react/components/group-action-bubble.mdx
index 64b9882e5..190edd8fb 100644
--- a/ui-kit/react/components/group-action-bubble.mdx
+++ b/ui-kit/react/components/group-action-bubble.mdx
@@ -5,24 +5,18 @@ description: "A self-extracting bubble that renders group action system messages
---
-```json
-{
- "component": "CometChatGroupActionBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatGroupActionBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting bubble for group membership system messages. Derives the localized action text from the SDK group-action message.",
- "cssRootClass": ".cometchat-action-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true, "note": "The group-action message (member joined/left/added/kicked/banned/scope change). Drives all extraction." },
- "className": { "type": "string", "default": "undefined", "note": "Additional CSS class for the root element" }
- }
- },
- "rendersThrough": "CometChatActionBubble (base primitive)",
- "usedBy": ["CometChatGroupActionPlugin"]
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatGroupActionBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatGroupActionBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-action-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/group-members.mdx b/ui-kit/react/components/group-members.mdx
index f70cd3a55..0da173864 100644
--- a/ui-kit/react/components/group-members.mdx
+++ b/ui-kit/react/components/group-members.mdx
@@ -4,120 +4,20 @@ description: "Scrollable list of members for a specific group with role-based ac
---
-```json
-{
- "component": "CometChatGroupMembers",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatGroupMembers } from \"@cometchat/chat-uikit-react\";",
- "description": "Scrollable list of members for a specific group with role-based actions like kick, ban, and scope change.",
- "cssRootClass": ".cometchat-group-members",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(member: CometChat.GroupMember) => void"
- },
- "props": {
- "data": {
- "group": {
- "type": "CometChat.Group",
- "default": "none (required)",
- "note": "The group whose members to display"
- },
- "groupMemberRequestBuilder": {
- "type": "CometChat.GroupMembersRequestBuilder",
- "default": "SDK default (30 per page)",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "searchRequestBuilder": {
- "type": "CometChat.GroupMembersRequestBuilder",
- "default": "undefined"
- },
- "searchKeyword": {
- "type": "string",
- "default": "undefined"
- }
- },
- "callbacks": {
- "onItemClick": "(member: CometChat.GroupMember) => void",
- "onSelect": "(member: CometChat.GroupMember, selected: boolean) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null",
- "onEmpty": "() => void",
- "onBack": "() => void"
- },
- "visibility": {
- "hideUserStatus": { "type": "boolean", "default": false },
- "hideSearch": { "type": "boolean", "default": false },
- "hideKickMemberOption": { "type": "boolean", "default": false },
- "hideBanMemberOption": { "type": "boolean", "default": false },
- "hideScopeChangeOption": { "type": "boolean", "default": false },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "selection": {
- "selectionMode": {
- "type": "CometChatGroupMembersSelectionMode",
- "values": ["'none'", "'single'", "'multiple'"],
- "default": "'none'"
- }
- },
- "viewSlots": {
- "itemView": "(member: CometChat.GroupMember) => ReactNode",
- "leadingView": "(member: CometChat.GroupMember) => ReactNode",
- "titleView": "(member: CometChat.GroupMember) => ReactNode",
- "subtitleView": "(member: CometChat.GroupMember) => ReactNode",
- "trailingView": "(member: CometChat.GroupMember) => ReactNode",
- "headerView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "options": "(member: CometChat.GroupMember) => CometChatGroupMemberOption[]"
- }
- },
- "events": [],
- "eventsReceived": [
- {
- "name": "ui:group/member-added",
- "payload": "{ group: CometChat.Group, members: CometChat.User[], messages: CometChat.BaseMessage[] }",
- "description": "Adds new members to the list"
- },
- {
- "name": "ui:group/member-kicked",
- "payload": "{ group: CometChat.Group, user: CometChat.User, message: CometChat.BaseMessage }",
- "description": "Removes the kicked member from the list"
- },
- {
- "name": "ui:group/member-banned",
- "payload": "{ group: CometChat.Group, user: CometChat.User, message: CometChat.BaseMessage }",
- "description": "Removes the banned member from the list"
- },
- {
- "name": "ui:group/member-scope-changed",
- "payload": "{ group: CometChat.Group, user: CometChat.User, newScope: string }",
- "description": "Updates the member's scope/role display"
- },
- {
- "name": "ui:group/ownership-changed",
- "payload": "{ group: CometChat.Group, newOwner: CometChat.User, previousOwnerUid: string }",
- "description": "Updates new owner's scope to owner and demotes previous owner to admin"
- }
- ],
- "sdkListeners": [
- "onGroupMemberJoined",
- "onGroupMemberLeft",
- "onGroupMemberKicked",
- "onGroupMemberBanned",
- "onGroupMemberScopeChanged",
- "onMemberAddedToGroup"
- ],
- "types": {
- "CometChatGroupMemberOption": {
- "id": "string",
- "title": "string",
- "iconURL": "string | undefined",
- "onClick": "(member: CometChat.GroupMember) => void"
- },
- "CometChatGroupMembersSelectionMode": "'none' | 'single' | 'multiple'"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatGroupMembers` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatGroupMembers } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-group-members` |
+| Primary output | `onItemClick: (member: CometChat.GroupMember) => void` — emits the selected group member |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the target `group`; wire `onItemClick` (or `onSelect` in selection mode) to act on a member |
+| Events received | `ui:group/member-added`, `ui:group/member-kicked`, `ui:group/member-banned`, `ui:group/member-scope-changed`, `ui:group/ownership-changed` — keeps the member list in sync — see the [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Group membership changes (joins, leaves, kicks, bans, scope changes) — handled internally |
+| Full props | See [Props](#props) |
+
## Overview
@@ -281,7 +181,7 @@ This component does not emit any UI events directly. Kick, ban, and scope change
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components). These flow through the shared UI event bus — see [Event System → User & Group Actions](/ui-kit/react/event-system#user--group-actions) for how these `ui:group/member-*` and `ui:group/ownership-changed` events are published.
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -694,6 +594,10 @@ View slot props (`headerView`, `loadingView`, `emptyView`, `errorView`, `itemVie
| Type | `CometChat.Group` |
| Default | — |
+
+`group` is required — the component renders nothing without it. Obtain the `CometChat.Group` from the selected item in `CometChatGroups` (`onItemClick`), from `CometChat.getGroup(guid)`, or from your own state, then pass it in. See the [Group Chat Setup guide](/ui-kit/react/guide-group-chat-setup) for how the group flows from selection into the members panel.
+
+
---
### groupMemberRequestBuilder
@@ -835,6 +739,10 @@ Function that returns context menu options for each member item (shown on hover/
/>
```
+
+These `onClick` handlers are placeholders — the component only renders the menu items; you must implement the behavior. For the "Message Privately" option, open a one-on-one chat with the selected member as shown in the [Message Privately guide](/ui-kit/react/guide-message-privately). Kick, ban, and scope-change actions are handled by the component's built-in options unless you override them here.
+
+
---
### onItemClick
@@ -890,6 +798,10 @@ Callback when the back button in the header is clicked.
| Type | `() => void` |
| Default | `undefined` |
+
+`onBack` is a placeholder — the component only renders the back button and invokes this callback. Navigation and layout wiring (closing the panel, returning to the group chat, updating your router) are your app's responsibility. The [Group Chat Setup guide](/ui-kit/react/guide-group-chat-setup) shows how the members panel is wired into the surrounding layout.
+
+
---
## CSS Selectors
diff --git a/ui-kit/react/components/groups.mdx b/ui-kit/react/components/groups.mdx
index c9595f707..cc2b6dd51 100644
--- a/ui-kit/react/components/groups.mdx
+++ b/ui-kit/react/components/groups.mdx
@@ -4,134 +4,21 @@ description: "Searchable, scrollable list of groups with selection support and r
---
-```json
-{
- "component": "CometChatGroups",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatGroups } from \"@cometchat/chat-uikit-react\";",
- "description": "Searchable, scrollable list of groups with selection support and real-time membership updates.",
- "cssRootClass": ".cometchat-groups",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(group: CometChat.Group) => void"
- },
- "props": {
- "data": {
- "groupsRequestBuilder": {
- "type": "CometChat.GroupsRequestBuilder",
- "default": "SDK default (30 per page)",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "searchRequestBuilder": {
- "type": "CometChat.GroupsRequestBuilder",
- "default": "undefined"
- },
- "searchKeyword": {
- "type": "string",
- "default": "undefined"
- },
- "activeGroup": {
- "type": "CometChat.Group",
- "default": "undefined"
- }
- },
- "callbacks": {
- "onItemClick": "(group: CometChat.Group) => void",
- "onSelect": "(group: CometChat.Group, selected: boolean) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null",
- "onEmpty": "() => void"
- },
- "visibility": {
- "hideGroupType": { "type": "boolean", "default": false },
- "hideSearch": { "type": "boolean", "default": false },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "selection": {
- "selectionMode": {
- "type": "CometChatGroupsSelectionMode",
- "values": ["'none'", "'single'", "'multiple'"],
- "default": "'none'"
- }
- },
- "viewSlots": {
- "itemView": "(group: CometChat.Group) => ReactNode",
- "leadingView": "(group: CometChat.Group) => ReactNode",
- "titleView": "(group: CometChat.Group) => ReactNode",
- "subtitleView": "(group: CometChat.Group) => ReactNode",
- "trailingView": "(group: CometChat.Group) => ReactNode",
- "headerView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "options": "(group: CometChat.Group) => CometChatGroupOption[]"
- }
- },
- "events": [],
- "eventsReceived": [
- {
- "name": "ui:group/created",
- "payload": "{ group: CometChat.Group }",
- "description": "Adds the new group to the list"
- },
- {
- "name": "ui:group/deleted",
- "payload": "{ group: CometChat.Group }",
- "description": "Removes the group from the list"
- },
- {
- "name": "ui:group/left",
- "payload": "{ group: CometChat.Group }",
- "description": "Removes (private) or updates (public) the group"
- },
- {
- "name": "ui:group/member-joined",
- "payload": "{ joinedGroup: CometChat.Group }",
- "description": "Updates the group (member count)"
- },
- {
- "name": "ui:group/member-added",
- "payload": "{ group: CometChat.Group, members: CometChat.User[], messages: CometChat.BaseMessage[] }",
- "description": "Updates the group"
- },
- {
- "name": "ui:group/member-kicked",
- "payload": "{ group: CometChat.Group, user: CometChat.User, message: CometChat.BaseMessage }",
- "description": "Updates the group"
- },
- {
- "name": "ui:group/member-banned",
- "payload": "{ group: CometChat.Group, user: CometChat.User, message: CometChat.BaseMessage }",
- "description": "Updates the group"
- },
- {
- "name": "ui:group/member-scope-changed",
- "payload": "{ group: CometChat.Group, user: CometChat.User, newScope: string }",
- "description": "Updates the group"
- },
- {
- "name": "ui:group/ownership-changed",
- "payload": "{ group: CometChat.Group, newOwner: CometChat.User, previousOwnerUid: string }",
- "description": "Updates the group"
- }
- ],
- "sdkListeners": [
- "onGroupMemberJoined",
- "onGroupMemberLeft",
- "onGroupMemberKicked",
- "onGroupMemberBanned",
- "onMemberAddedToGroup"
- ],
- "types": {
- "CometChatGroupOption": {
- "id": "string",
- "title": "string",
- "iconURL": "string | undefined",
- "onClick": "(group: CometChat.Group) => void"
- },
- "CometChatGroupsSelectionMode": "'none' | 'single' | 'multiple'"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatGroups` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatGroups } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-groups` |
+| Primary output | `onItemClick: (group: CometChat.Group) => void` — emits the selected group to open |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Emits the selected group; wire `onItemClick` to open it (mount MessageHeader/List/Composer) — see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation) |
+| Events received | `ui:group/created`, `ui:group/deleted`, `ui:group/left`, and `ui:group/member-*` / `ui:group/ownership-changed` — keeps the list in sync — see the [Event System](/ui-kit/react/event-system#user--group-actions) |
+| SDK listeners (automatic) | Group membership changes — handled internally |
+| Active highlight | Pass the selected group back as `activeGroup` to highlight the open row — see [activeGroup](#activegroup) |
+| Full props | See [Props](#props) |
+
## Overview
@@ -202,6 +89,8 @@ function GroupList() {
### Full Layout Example
+`onItemClick` is where you capture the selected group and mount the chat panel to open the group chat — see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation) for the two-panel wiring and the [Group Chat Setup guide](/ui-kit/react/guide-group-chat-setup) for join/details flows.
+
```tsx
import { useState } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
@@ -289,7 +178,7 @@ This component does not emit any UI events.
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components). These flow through the shared UI event bus — see [Event System → User & Group Actions](/ui-kit/react/event-system#user--group-actions) for how these `ui:group/*` events are published.
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -715,6 +604,10 @@ Function that returns context menu options for each group item (shown on hover/s
/>
```
+
+The `onClick` handlers above (`leaveGroup`, `openGroupDetails`) are placeholders — the component only renders the menu items; you must implement the actual behavior. The [Group Chat Setup guide](/ui-kit/react/guide-group-chat-setup) shows the join, member-management, and leave / ownership-transfer flows end to end. Note that wiring **Leave Group** directly to `leaveGroup()` throws for the group **owner** — the owner must [transfer ownership](/sdk/javascript/transfer-group-ownership) first.
+
+
---
### onItemClick
diff --git a/ui-kit/react/components/image-bubble.mdx b/ui-kit/react/components/image-bubble.mdx
index 1a2508976..d9772d202 100644
--- a/ui-kit/react/components/image-bubble.mdx
+++ b/ui-kit/react/components/image-bubble.mdx
@@ -5,27 +5,18 @@ description: "A batch-aware bubble that renders one or more image attachments wi
---
-```json
-{
- "component": "CometChatImagesBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatImagesBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Batch-aware image bubble. Extracts image attachments and caption from a MediaMessage; renders adaptive grid layouts (single, 2-col, 2x2, overflow) and opens a fullscreen gallery viewer.",
- "cssRootClass": ".cometchat-images-bubble",
- "selfExtracting": true,
- "multiAttachment": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of attachments and caption." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "placeholderImage": { "type": "string" },
- "onImageClicked": { "type": "(attachment, index) => void" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatImagesBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatImagesBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-images-bubble` |
+| Primary output | `onImageClicked(attachment, index)` — opens the fullscreen gallery |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/incoming-call.mdx b/ui-kit/react/components/incoming-call.mdx
index 31ae55f5d..af4260f57 100644
--- a/ui-kit/react/components/incoming-call.mdx
+++ b/ui-kit/react/components/incoming-call.mdx
@@ -4,71 +4,20 @@ description: "Displays an incoming call notification with caller info, accept/de
---
-```json
-{
- "component": "CometChatIncomingCall",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatIncomingCall } from \"@cometchat/chat-uikit-react\";",
- "description": "Displays an incoming call notification with caller info, accept/decline buttons, and transitions to the ongoing call screen.",
- "cssRootClass": ".cometchat-incoming-call",
- "primaryOutput": {
- "prop": "onAccept",
- "type": "(call: CometChat.Call) => void"
- },
- "props": {
- "callbacks": {
- "onAccept": "(call: CometChat.Call) => void",
- "onDecline": "(call: CometChat.Call) => void",
- "onCallEnded": "() => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "sound": {
- "disableSoundForCalls": { "type": "boolean", "default": false },
- "customSoundForCalls": { "type": "string", "default": "built-in" }
- },
- "configuration": {
- "callSettingsBuilder": {
- "type": "(call: CometChat.Call) => any",
- "default": "undefined",
- "note": "Custom call settings for the ongoing call session after accepting"
- }
- },
- "viewSlots": {
- "itemView": "(call: CometChat.Call) => ReactNode",
- "leadingView": "(call: CometChat.Call) => ReactNode",
- "titleView": "(call: CometChat.Call) => ReactNode",
- "subtitleView": "(call: CometChat.Call) => ReactNode",
- "trailingView": "(call: CometChat.Call) => ReactNode"
- }
- },
- "events": [
- {
- "name": "ui:call/rejected",
- "payload": "{ call }",
- "description": "Call declined by user"
- },
- {
- "name": "ui:call/ended",
- "payload": "{}",
- "description": "Ongoing call ended"
- }
- ],
- "sdkListeners": [
- "onIncomingCallReceived",
- "onIncomingCallCancelled",
- "onOutgoingCallAccepted",
- "onOutgoingCallRejected"
- ],
- "types": {
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined"
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatIncomingCall` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatIncomingCall } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-incoming-call` |
+| Primary output | `onAccept: (call: CometChat.Call) => void` — fires when the call is accepted |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Mount at the app root to catch incoming calls; wire `onAccept` / `onDecline` |
+| Events emitted | `ui:call/rejected`, `ui:call/ended` — see [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Incoming and outgoing call lifecycle — handled internally |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/message-bubble.mdx b/ui-kit/react/components/message-bubble.mdx
index ff35e8223..ca0346a44 100644
--- a/ui-kit/react/components/message-bubble.mdx
+++ b/ui-kit/react/components/message-bubble.mdx
@@ -4,61 +4,18 @@ description: "A shared wrapper component that renders all message types with com
---
-```json
-{
- "component": "CometChatMessageBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatMessageBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Layout shell that wraps plugin-rendered bubble content with shared chrome — avatar, sender name, bubble background, timestamp, receipts, thread replies, reactions, and context menu.",
- "cssRootClass": ".cometchat-message-bubble",
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "required": true },
- "alignment": { "type": "'left' | 'right' | 'center'", "required": true },
- "contentView": { "type": "ReactNode", "required": true, "note": "Inner content from the plugin's renderBubble()." },
- "group": { "type": "CometChat.Group" },
- "options": { "type": "CometChatMessageOption[]" },
- "quickOptionsCount": { "type": "number", "default": 2 }
- },
- "visibility": {
- "hideAvatar": { "type": "boolean", "default": false },
- "forceShowAvatar": { "type": "boolean", "default": false },
- "hideSenderName": { "type": "boolean", "default": false },
- "hideTimestamp": { "type": "boolean", "default": false },
- "hideThreadView": { "type": "boolean", "default": false },
- "hideReceipts": { "type": "boolean", "note": "Reads from GlobalConfig if not set." },
- "showError": { "type": "boolean", "default": false },
- "disableInteraction": { "type": "boolean", "default": false }
- },
- "config": {
- "messageSentAtDateTimeFormat": { "type": "CometChatDateFormatConfig" },
- "isSelected": { "type": "boolean" },
- "ariaPosinset": { "type": "number" },
- "ariaSetsize": { "type": "number" },
- "className": { "type": "string" },
- "setRef": { "type": "Ref" },
- "includeBottomViewHeight": { "type": "boolean", "default": false },
- "toggleOptionsVisibility": { "type": "boolean" }
- },
- "viewSlots": {
- "leadingView": "((message) => ReactNode) | null",
- "headerView": "((message) => ReactNode) | null",
- "statusInfoView": "((message) => ReactNode) | null",
- "footerView": "((message) => ReactNode) | null",
- "threadView": "((message) => ReactNode) | null",
- "replyView": "ReactNode | null",
- "bottomView": "((message) => ReactNode) | null"
- },
- "callbacks": {
- "onAvatarClick": "(user: CometChat.User) => void",
- "onThreadRepliesClick": "(message: CometChat.BaseMessage) => void",
- "onOptionClick": "(option: CometChatMessageOption, message: CometChat.BaseMessage) => void",
- "onReactionChipClick": "(messageId: number, emoji: string) => void",
- "onReactorClick": "(reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void"
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatMessageBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatMessageBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-message-bubble` |
+| Primary output | None — renders from the SDK message (it renders provided content; there is no single primary callback). |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user. |
+| Stitching | Feed `message`, `alignment`, and a plugin-rendered `contentView`; it supplies the surrounding chrome. |
+| Full props | See [Props](#props) |
+
## Where It Fits
diff --git a/ui-kit/react/components/message-composer.mdx b/ui-kit/react/components/message-composer.mdx
index 6cb59d304..67f436ceb 100644
--- a/ui-kit/react/components/message-composer.mdx
+++ b/ui-kit/react/components/message-composer.mdx
@@ -4,133 +4,21 @@ description: "Rich text input with attachments, emoji, voice recording, mentions
---
-```json
-{
- "component": "CometChatMessageComposer",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatMessageComposer } from \"@cometchat/chat-uikit-react\";",
- "description": "Rich text input with attachments, emoji, voice recording, mentions, and formatting for sending messages.",
- "cssRootClass": ".cometchat-message-composer",
- "primaryOutput": {
- "prop": "onSendButtonClick",
- "type": "(message: CometChat.BaseMessage, mode?: 'send' | 'edit') => void"
- },
- "props": {
- "entity": {
- "user": { "type": "CometChat.User", "default": "undefined" },
- "group": { "type": "CometChat.Group", "default": "undefined" },
- "parentMessageId": { "type": "number", "default": "undefined" }
- },
- "layout": {
- "layout": {
- "type": "CometChatMessageComposerLayout",
- "values": ["'compact'", "'multiline'"],
- "default": "'compact'"
- }
- },
- "textInput": {
- "initialText": { "type": "string", "default": "undefined" },
- "text": { "type": "string", "default": "undefined", "note": "Controlled mode — consumer owns state" },
- "placeholder": { "type": "string", "default": "'Type a message...'" },
- "enterKeyBehavior": {
- "type": "'send' | 'newline' | 'none'",
- "default": "'send'"
- },
- "maxInputHeight": { "type": "number", "default": "200" }
- },
- "richText": {
- "enableRichTextEditor": { "type": "boolean", "default": false },
- "hideRichTextFormattingOptions": { "type": "boolean", "default": false },
- "showBubbleMenuOnSelection": { "type": "boolean", "default": false }
- },
- "editReply": {
- "messageToEdit": { "type": "CometChat.TextMessage | null", "default": "null" },
- "messageToReply": { "type": "CometChat.BaseMessage | null", "default": "null" }
- },
- "attachments": {
- "attachmentOptions": { "type": "CometChatComposerAttachmentOption[]", "default": "undefined" },
- "hideAttachmentOptions": { "type": "CometChatAttachmentHideOptions", "default": "undefined" },
- "showAttachmentPreview": { "type": "boolean", "default": true },
- "enableMultipleAttachments": { "type": "boolean", "default": true, "note": "Enable multi-attachment staging tray and batch send. Set false for legacy single-select behavior." },
- "disableDragAndDrop": { "type": "boolean", "default": false, "note": "Disable drag-and-drop file upload." },
- "allowedFileTypes": { "type": "string[]", "default": "undefined" }
- },
- "hideButtons": {
- "hideAttachmentButton": { "type": "boolean", "default": false },
- "hideEmojiKeyboardButton": { "type": "boolean", "default": false },
- "hideVoiceRecordingButton": { "type": "boolean", "default": false },
- "hideStickersButton": { "type": "boolean", "default": false },
- "hideAIButton": { "type": "boolean", "default": true },
- "hideLiveReaction": { "type": "boolean", "default": false },
- "hideSendButton": { "type": "boolean", "default": false },
- "hideError": { "type": "boolean", "default": false }
- },
- "mentions": {
- "textFormatters": { "type": "CometChatTextFormatter[]", "default": "undefined" },
- "disableMentions": { "type": "boolean", "default": false },
- "disableMentionAll": { "type": "boolean", "default": false },
- "mentionAllLabel": { "type": "string", "default": "'all'" },
- "mentionsUsersRequestBuilder": { "type": "CometChat.UsersRequestBuilder", "default": "undefined" },
- "mentionsGroupMembersRequestBuilder": { "type": "CometChat.GroupMembersRequestBuilder", "default": "undefined" }
- },
- "sound": {
- "disableTypingEvents": { "type": "boolean", "default": false },
- "disableSoundForMessage": { "type": "boolean", "default": false },
- "customSoundForMessage": { "type": "string", "default": "undefined" }
- },
- "misc": {
- "disableAutoFocusOnMobile": { "type": "boolean", "default": true },
- "liveReactionIcon": { "type": "string", "default": "undefined" },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "customViews": {
- "attachmentButtonIconView": "ReactNode",
- "voiceRecordingButtonIconView": "ReactNode",
- "emojiButtonIconView": "ReactNode",
- "sendButtonView": "ReactNode",
- "auxiliaryButtonView": "ReactNode",
- "headerView": "ReactNode"
- },
- "callbacks": {
- "onTextChange": "(text: string) => void",
- "onSendButtonClick": "(message: CometChat.BaseMessage, mode?: 'send' | 'edit') => void",
- "sendTextMessageOverride": "(text: string, richTextHtml?: string) => string",
- "onError": "(error: unknown) => void",
- "onClosePreview": "() => void",
- "onAttachmentAdded": "(file: File) => void",
- "onAttachmentRemoved": "(file: File) => void",
- "onMentionSelected": "(user: CometChat.User | CometChat.GroupMember) => void"
- }
- },
- "events": {
- "emitted": [
- { "name": "ui:message/sent", "payload": "{ message, status }", "description": "Message sent (inprogress → success/error)" },
- { "name": "ui:compose/edit", "payload": "{ message, status }", "description": "Message edit (inprogress → success/error/cancelled)" },
- { "name": "ui:compose/reply", "payload": "{ message, status }", "description": "Reply context set/cleared" },
- { "name": "ui:compose/recording-started", "payload": "{ composerInstanceId }", "description": "Voice recording started (stops other instances)" }
- ],
- "received": [
- { "name": "ui:compose/edit", "payload": "{ message, status: 'inprogress' }", "description": "Enters edit mode for the message" },
- { "name": "ui:compose/reply", "payload": "{ message, status: 'inprogress' }", "description": "Sets reply-to message" },
- { "name": "ui:compose/text", "payload": "{ text }", "description": "Sets the composer text programmatically" },
- { "name": "ui:compose/recording-started", "payload": "{ composerInstanceId }", "description": "Stops own recording if another instance started" }
- ]
- },
- "sdkListeners": [],
- "types": {
- "CometChatMessageComposerLayout": "'compact' | 'multiline'",
- "CometChatAttachmentHideOptions": {
- "image": "boolean | undefined",
- "video": "boolean | undefined",
- "audio": "boolean | undefined",
- "file": "boolean | undefined",
- "polls": "boolean | undefined",
- "collaborativeDocument": "boolean | undefined",
- "collaborativeWhiteboard": "boolean | undefined"
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatMessageComposer` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatMessageComposer } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-message-composer` |
+| Primary output | `onSendButtonClick: (message: CometChat.BaseMessage, mode?: 'send' \| 'edit') => void` — emits the sent/edited message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; the AI-assist button requires [AI features](/ui-kit/react/ai-features) enabled in the Dashboard |
+| Stitching | Pass `user`, `group`, or `parentMessageId`; the composer sends via the SDK and emits `onSendButtonClick` |
+| Events emitted | `ui:message/sent`, `ui:compose/edit`, `ui:compose/reply`, `ui:compose/recording-started` — see [Event System](/ui-kit/react/event-system) |
+| Events received | `ui:compose/edit`, `ui:compose/reply`, `ui:compose/text`, `ui:compose/recording-started` (drives edit/reply/text mode) |
+| SDK listeners (automatic) | None; emits typing-indicator events via the SDK when `disableTypingEvents` is `false` |
+| Full props | See [Props](#props) |
+
## Overview
@@ -293,6 +181,10 @@ This mirrors the underlying SDK upload semantics: **failed** uploads are transie
- **Count** — a single batch can hold up to a configurable 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 validation banner is shown. The composer does **not** partially accept a subset of files to fill the remaining slots.
- **Per-file size** — a file larger than the allowed size (`file.size.max`) is rejected as an individual tile.
+
+These limits are **Dashboard/app-level settings**, not UI Kit props. The maximum file **count** (`file.count.max`) and **size** (`file.size.max`) are read from your CometChat app settings at runtime, and permitted file **types** are governed by your app's role-based file-type permissions (RBAC/SBAC). If an attachment is rejected unexpectedly, verify these settings for your app and role in the CometChat Dashboard — they are not overridable from the composer.
+
+
### Why a file is rejected
A rejected tile explains itself on hover via a tooltip:
@@ -343,7 +235,7 @@ UI events this component publishes:
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components) — part of the UI Kit's [Event System](/ui-kit/react/event-system#composer-commands). Publishing `ui:compose/edit` or `ui:compose/reply` (e.g. from the [Message List](/ui-kit/react/components/message-list) edit/reply actions) is how another component drives this composer into edit/reply mode without prop drilling:
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -410,6 +302,10 @@ function ComposerCustomAttachments({ chatUser }: { chatUser: CometChat.User }) {
}
```
+
+Each custom option's `onClick` is a handler **you** implement — the composer only renders the menu. To send a message from a custom option, use the CometChat SDK or the UI Kit's [Event System](/ui-kit/react/event-system) (e.g. optimistic-send flows). Custom attachment options can also be provided by a [plugin](/ui-kit/react/plugins/overview); `sendTextMessageOverride` similarly lets you intercept the outgoing text before send.
+
+
#### auxiliaryButtonView
Replace the auxiliary button area.
@@ -520,6 +416,10 @@ View slot props (`headerView`, `sendButtonView`, `auxiliaryButtonView`, `attachm
### Entity
+
+The composer requires exactly one entity — a `user` (1:1) or a `group` — to know where to send messages. Without either prop it has no conversation to post to. For how to derive the active entity from a conversation/user/group selection and mount the composer, see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation).
+
+
---
#### user
@@ -694,6 +594,10 @@ Message to reply to (triggers reply mode with preview).
### Attachments
+
+**Extension-backed attachment options require a Dashboard extension.** The default attachment menu auto-integrates the **Polls**, **Collaborative Document**, **Collaborative Whiteboard**, and **Sticker** options — but each only appears once its extension is enabled in the [CometChat Dashboard](/ui-kit/react/extensions). If an option is missing, enable the extension: [Polls](/fundamentals/polls), [Collaborative Document](/fundamentals/collaborative-document), [Collaborative Whiteboard](/fundamentals/collaborative-whiteboard), [Stickers](/fundamentals/stickers). See [Extensions](/ui-kit/react/extensions) for the full list of extensions the composer auto-integrates. `hideAttachmentOptions` and `hideStickersButton` only control visibility of options that are already enabled.
+
+
---
#### attachmentOptions
@@ -817,27 +721,6 @@ Hide the stickers button.
---
-#### hideAIButton
-
-Hide the AI button.
-
-| | |
-| --- | --- |
-| Type | `boolean` |
-| Default | `true` |
-
----
-
-#### hideLiveReaction
-
-Hide the live reaction button.
-
-| | |
-| --- | --- |
-| Type | `boolean` |
-| Default | `false` |
-
----
#### hideSendButton
diff --git a/ui-kit/react/components/message-header.mdx b/ui-kit/react/components/message-header.mdx
index 5a507f97f..9488ca871 100644
--- a/ui-kit/react/components/message-header.mdx
+++ b/ui-kit/react/components/message-header.mdx
@@ -4,158 +4,20 @@ description: "Toolbar displaying conversation details with avatar, name, presenc
---
-```json
-{
- "component": "CometChatMessageHeader",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatMessageHeader } from \"@cometchat/chat-uikit-react\";",
- "description": "Toolbar displaying conversation details with avatar, name, presence status, typing indicator, and call buttons.",
- "cssRootClass": ".cometchat-message-header",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(entity: CometChat.User | CometChat.Group) => void"
- },
- "props": {
- "data": {
- "user": {
- "type": "CometChat.User",
- "default": "undefined",
- "note": "For 1-on-1 conversations. Mutually exclusive with group."
- },
- "group": {
- "type": "CometChat.Group",
- "default": "undefined",
- "note": "For group conversations. Mutually exclusive with user."
- },
- "callSettingsBuilder": {
- "type": "any",
- "default": "GlobalConfig.callSettingsBuilder or built-in default",
- "note": "Custom call settings builder for ongoing call sessions."
- },
- "lastActiveAtDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "relative time format"
- },
- "summaryGenerationMessageCount": {
- "type": "number",
- "default": 1000
- }
- },
- "callbacks": {
- "onBack": "() => void",
- "onItemClick": "(entity: CometChat.User | CometChat.Group) => void",
- "onSearchOptionClicked": "() => void",
- "onSummaryClick": "() => void",
- "onVoiceCallClick": "(entity: CometChat.User | CometChat.Group) => void",
- "onVideoCallClick": "(entity: CometChat.User | CometChat.Group) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "visibility": {
- "hideUserStatus": { "type": "boolean", "default": false },
- "hideBackButton": { "type": "boolean", "default": false },
- "showSearchOption": { "type": "boolean", "default": true },
- "showConversationSummaryButton": { "type": "boolean", "default": false },
- "enableAutoSummaryGeneration": { "type": "boolean", "default": false },
- "hideVoiceCallButton": { "type": "boolean", "default": false },
- "hideVideoCallButton": { "type": "boolean", "default": false }
- },
- "viewSlots": {
- "leadingView": "ReactNode",
- "titleView": "ReactNode",
- "subtitleView": "ReactNode",
- "trailingView": "ReactNode",
- "auxiliaryButtonView": "ReactNode"
- }
- },
- "eventsEmitted": [],
- "eventsReceived": [
- {
- "name": "ui:call/rejected",
- "payload": "{ call }",
- "description": "Re-enables call buttons after incoming call rejection"
- },
- {
- "name": "ui:call/ended",
- "payload": "{}",
- "description": "Resets all call state (re-enables buttons, hides call screens)"
- },
- {
- "name": "ui:call/join",
- "payload": "{ sessionId, isAudioOnly, group }",
- "description": "Starts a direct call (user clicked Join on meeting bubble)"
- },
- {
- "name": "ui:active-chat/changed",
- "payload": "{ unreadCount, ... }",
- "description": "Auto-triggers summary when unread >= 15 (if enabled)"
- },
- {
- "name": "ui:group/member-added",
- "payload": "{ group, members, messages }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/member-kicked",
- "payload": "{ group, user, message }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/member-banned",
- "payload": "{ group, user, message }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/left",
- "payload": "{ group }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/member-joined",
- "payload": "{ joinedGroup }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/ownership-changed",
- "payload": "{ group: CometChat.Group, newOwner: CometChat.User, previousOwnerUid: string }",
- "description": "Updates group member count"
- },
- {
- "name": "ui:group/member-scope-changed",
- "payload": "{ group, user, newScope }",
- "description": "Updates group member count"
- }
- ],
- "sdkListeners": [
- "onUserOnline",
- "onUserOffline",
- "onTypingStarted",
- "onTypingEnded",
- "onGroupMemberJoined",
- "onGroupMemberLeft",
- "onGroupMemberKicked",
- "onGroupMemberBanned",
- "onMemberAddedToGroup",
- "onIncomingCallReceived",
- "onOutgoingCallAccepted",
- "onOutgoingCallRejected",
- "onIncomingCallCancelled"
- ],
- "types": {
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatMessageHeader` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatMessageHeader } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-message-header` |
+| Primary output | `onItemClick`: `(entity: CometChat.User \| CometChat.Group) => void` — opens the chat entity's details |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; the summary button requires the [Conversation Summary AI feature](/ui-kit/react/ai-features#conversation-summary) enabled in the Dashboard |
+| Stitching | Pass `user` or `group`; wire `onItemClick` (and call/summary callbacks) as needed |
+| Events received | `ui:call/*`, `ui:active-chat/changed`, and `ui:group/*` events keep the header in sync — see the [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Presence, typing, group membership, and call listeners attached internally |
+| Full props | See [Props](#props) |
+
## Overview
@@ -302,13 +164,17 @@ function ChatApp() {
| `onVideoCallClick` | `(entity: CometChat.User \| CometChat.Group) => void` | User clicks the video call button |
| `onError` | `((error: CometChat.CometChatException) => void) \| null` | SDK error occurs |
+
+These navigation callbacks are placeholders you wire to your app's layout. `onSearchOptionClicked` should open in-conversation search (mount `CometChatSearch` → jump to a result via `goToMessageId`) — see the [Search Messages guide](/ui-kit/react/guide-search-messages). `onItemClick` typically opens a details/info panel, and `onBack` returns to the conversation list; both are handled by your own routing/layout state.
+
+
### Events Emitted
This component does not emit any UI events directly. Call initiation publishes call events internally via the SDK.
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components) — part of the UI Kit's [Event System](/ui-kit/react/event-system):
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -625,6 +491,10 @@ Whether to show the search button in the header toolbar.
Whether to show the AI conversation summary button.
+
+The Conversation Summary button (`showConversationSummaryButton`, `enableAutoSummaryGeneration`, `onSummaryClick`) requires the **Conversation Summary AI feature to be enabled** for your app in the CometChat Dashboard. When the feature is disabled or not configured, the button will not surface. See [AI Features (Smart Chat)](/ui-kit/react/ai-features#conversation-summary) and [AI User Copilot](/fundamentals/ai-user-copilot/overview).
+
+
| | |
| --- | --- |
| Type | `boolean` |
diff --git a/ui-kit/react/components/message-information.mdx b/ui-kit/react/components/message-information.mdx
index 13aafd2e0..23787fc40 100644
--- a/ui-kit/react/components/message-information.mdx
+++ b/ui-kit/react/components/message-information.mdx
@@ -4,44 +4,18 @@ description: "Displays detailed message information including delivery and read
---
-```json
-{
- "component": "CometChatMessageInformation",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatMessageInformation } from \"@cometchat/chat-uikit-react\";",
- "description": "Displays detailed message information including delivery and read receipts for 1-on-1 and group conversations.",
- "cssRootClass": ".cometchat-message-information",
- "primaryOutput": {
- "prop": "onClose",
- "type": "() => void"
- },
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "note": "Required. The message to show information for." },
- "messageInfoDateTimeFormat": { "type": "CometChatMessageInformationCalendarObject", "note": "Custom date format for receipt timestamps (read/delivered)." },
- "messageSentAtDateTimeFormat": { "type": "CometChatMessageInformationCalendarObject", "note": "Format for the sent-at timestamp on the message bubble preview." },
- "textFormatters": { "type": "CometChatTextFormatter[]", "note": "Text formatters for the message bubble preview." },
- "showScrollbar": { "type": "boolean", "default": false, "note": "Whether to show the scrollbar in the content area." },
- "className": { "type": "string", "note": "Optional custom className for the root element." }
- },
- "callbacks": {
- "onClose": { "type": "() => void", "note": "Called when the panel close button is clicked." },
- "onError": { "type": "(error: unknown) => void", "note": "Called when an SDK error occurs." }
- },
- "visibility": {
- "showScrollbar": { "type": "boolean", "default": "false", "note": "Whether to show the scrollbar in the content area." }
- }
- },
- "types": {
- "CometChatMessageInformationRootProps": "Root provider props",
- "CometChatMessageInformationHeaderProps": "Header sub-component props",
- "CometChatMessageInformationMessagePreviewProps": "Message preview sub-component props",
- "CometChatMessageInformationReceiptListProps": "Receipt list sub-component props",
- "CometChatUserReceiptInfo": "Combined user receipt info (user + readAt + deliveredAt)",
- "CometChatMessageInformationContextValue": "Context value for sub-components"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatMessageInformation` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatMessageInformation } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-message-information` |
+| Primary output | `onClose: () => void` — closes the information panel |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the target `message`; wire `onClose` to dismiss the panel |
+| Full props | See [Props](#props) |
+
## Where It Fits
diff --git a/ui-kit/react/components/message-list.mdx b/ui-kit/react/components/message-list.mdx
index 936115211..d97a40d19 100644
--- a/ui-kit/react/components/message-list.mdx
+++ b/ui-kit/react/components/message-list.mdx
@@ -4,207 +4,21 @@ description: "Scrollable message feed with plugin-based bubble rendering, reacti
---
-```json
-{
- "component": "CometChatMessageList",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatMessageList } from \"@cometchat/chat-uikit-react\";",
- "description": "Scrollable message feed with plugin-based bubble rendering, reactions, receipts, threads, and real-time updates.",
- "cssRootClass": ".cometchat-message-list",
- "primaryOutput": {
- "prop": "onThreadRepliesClick",
- "type": "(message: CometChat.BaseMessage) => void"
- },
- "props": {
- "entity": {
- "user": {
- "type": "CometChat.User",
- "default": "undefined",
- "note": "For 1-on-1 chat. Mutually exclusive with group."
- },
- "group": {
- "type": "CometChat.Group",
- "default": "undefined",
- "note": "For group chat. Mutually exclusive with user."
- },
- "parentMessageId": {
- "type": "number",
- "default": "undefined",
- "note": "Enables thread mode — fetches replies to this message."
- }
- },
- "data": {
- "messagesRequestBuilder": {
- "type": "CometChat.MessagesRequestBuilder",
- "default": "SDK default (limit 30)",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "reactionsRequestBuilder": {
- "type": "CometChat.ReactionsRequestBuilder",
- "default": "undefined"
- },
- "messageTypes": {
- "type": "string[]",
- "default": "Plugin registry types"
- },
- "messageCategories": {
- "type": "string[]",
- "default": "Plugin registry categories"
- },
- "goToMessageId": {
- "type": "number",
- "default": "undefined",
- "note": "Jump to a specific message (e.g., from search or deep link)"
- },
- "startFromUnreadMessages": {
- "type": "boolean",
- "default": false
- },
- "loadLastAgentConversation": {
- "type": "boolean",
- "default": false
- }
- },
- "visibility": {
- "hideReceipts": { "type": "boolean", "default": false },
- "hideStickyDate": { "type": "boolean", "default": false },
- "hideDateSeparator": { "type": "boolean", "default": false },
- "hideAvatar": { "type": "boolean", "default": false },
- "hideGroupActionMessages": { "type": "boolean", "default": false },
- "hideModerationView": { "type": "boolean", "default": false },
- "showScrollbar": { "type": "boolean", "default": false },
- "showSmartReplies": { "type": "boolean", "default": false },
- "showConversationStarters": { "type": "boolean", "default": false },
- "showMarkAsUnreadOption": { "type": "boolean", "default": false },
- "disableTruncation": { "type": "boolean", "default": false },
- "isAgentChat": { "type": "boolean", "default": false }
- },
- "optionToggles": {
- "hideReplyOption": { "type": "boolean", "default": false },
- "hideReplyInThreadOption": { "type": "boolean", "default": false },
- "hideEditMessageOption": { "type": "boolean", "default": false },
- "hideDeleteMessageOption": { "type": "boolean", "default": false },
- "hideCopyMessageOption": { "type": "boolean", "default": false },
- "hideReactionOption": { "type": "boolean", "default": false },
- "hideMessageInfoOption": { "type": "boolean", "default": false },
- "hideFlagMessageOption": { "type": "boolean", "default": false },
- "hideMessagePrivatelyOption": { "type": "boolean", "default": false },
- "hideTranslateMessageOption": { "type": "boolean", "default": false },
- "hideFlagRemarkField": { "type": "boolean", "default": false },
- "quickOptionsCount": { "type": "number", "default": 3 }
- },
- "dateFormatting": {
- "separatorDateTimeFormat": { "type": "CometChatDateFormatConfig" },
- "stickyDateTimeFormat": { "type": "CometChatDateFormatConfig" },
- "messageSentAtDateTimeFormat": { "type": "CometChatDateFormatConfig" },
- "messageInfoDateTimeFormat": { "type": "CometChatDateFormatConfig" }
- },
- "alignment": {
- "messageAlignment": {
- "type": "CometChatMessageListAlignment",
- "values": ["0 (left)", "1 (standard)"],
- "default": "1 (standard)"
- }
- },
- "sound": {
- "disableSoundForMessages": { "type": "boolean", "default": false },
- "customSoundForMessages": { "type": "string", "default": "built-in" }
- },
- "ai": {
- "smartRepliesKeywords": {
- "type": "string[]",
- "default": "['what','when','why','who','where','how','?']"
- },
- "smartRepliesDelayDuration": {
- "type": "number",
- "default": 10000
- }
- },
- "callbacks": {
- "onThreadRepliesClick": "(message: CometChat.BaseMessage) => void",
- "onAvatarClick": "(user: CometChat.User) => void",
- "onEditMessage": "(message: CometChat.BaseMessage) => void",
- "onReplyMessage": "(message: CometChat.BaseMessage) => void",
- "onReactionClick": "(reaction: CometChat.ReactionCount, message: CometChat.BaseMessage) => void",
- "onReactionListItemClick": "(reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void",
- "onActiveChatChanged": "(data: { user?, group?, message?, unreadMessageCount? }) => void",
- "onMessageRead": "(message: CometChat.BaseMessage) => void",
- "onMessageDeleted": "(message: CometChat.BaseMessage) => void",
- "onConversationMarkedAsRead": "(conversation: CometChat.Conversation) => void",
- "onConversationUpdated": "(conversation: CometChat.Conversation) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "viewSlots": {
- "bubbleView": "(message: CometChat.BaseMessage, loggedInUser: CometChat.User) => ReactNode",
- "headerView": "ReactNode",
- "footerView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode"
- }
- },
- "events": [
- {
- "name": "ui:message/read",
- "payload": "{ message }",
- "description": "Message marked as read"
- },
- {
- "name": "ui:message/deleted",
- "payload": "{ message }",
- "description": "Message deleted by user"
- },
- {
- "name": "ui:active-chat/changed",
- "payload": "{ user?, group?, message?, unreadMessageCount? }",
- "description": "Active chat context changed on init"
- },
- {
- "name": "ui:conversation/read",
- "payload": "{ conversationId }",
- "description": "Conversation marked as read"
- },
- {
- "name": "ui:conversation/updated",
- "payload": "{ conversation }",
- "description": "Conversation updated (mark-as-unread)"
- }
- ],
- "sdkListeners": [
- "onTextMessageReceived",
- "onMediaMessageReceived",
- "onCustomMessageReceived",
- "onInteractiveMessageReceived",
- "onTypingStarted",
- "onTypingEnded",
- "onMessagesDelivered",
- "onMessagesRead",
- "onMessagesDeliveredToAll",
- "onMessagesReadByAll",
- "onMessageEdited",
- "onMessageDeleted",
- "onTransientMessageReceived"
- ],
- "types": {
- "CometChatMessageListAlignment": {
- "left": 0,
- "standard": 1
- },
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatMessageList` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatMessageList } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-message-list` |
+| Primary output | `onThreadRepliesClick: (message: CometChat.BaseMessage) => void` — opens the message's thread |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; Smart Replies / Conversation Starters require the matching [AI features](/ui-kit/react/ai-features) enabled in the Dashboard |
+| Stitching | Pass `user`, `group`, or `parentMessageId`; wire `onThreadRepliesClick` to open a thread |
+| Events emitted | `ui:message/read`, `ui:message/deleted`, `ui:active-chat/changed`, `ui:conversation/read`, `ui:conversation/updated` — see [Event System](/ui-kit/react/event-system) |
+| Events received | `ui:message/sent`, `ui:compose/edit`, `ui:group/*` member and lifecycle events, `ui:call/*` events — see [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Incoming messages, typing, receipts (delivered/read), edits/deletes, transient messages |
+| Full props | See [Props](#props) |
+
## Overview
@@ -420,7 +234,7 @@ Pass a `CometChat.MessagesRequestBuilder` to `messagesRequestBuilder` to control
| Prop | Signature | Fires when |
| --- | --- | --- |
-| `onThreadRepliesClick` | `(message: CometChat.BaseMessage) => void` | User clicks the thread reply indicator |
+| `onThreadRepliesClick` | `(message: CometChat.BaseMessage) => void` | User clicks the thread reply indicator — wire this to open a thread panel ([Threaded Messages guide](/ui-kit/react/guide-threaded-messages)) |
| `onAvatarClick` | `(user: CometChat.User) => void` | User clicks an avatar on an incoming message |
| `onEditMessage` | `(message: CometChat.BaseMessage) => void` | User selects "Edit" from context menu |
| `onReplyMessage` | `(message: CometChat.BaseMessage) => void` | User selects "Reply" from context menu |
@@ -451,7 +265,7 @@ The "Edit" and "Reply" context menu options publish `ui:compose/edit` and `ui:co
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components) — part of the UI Kit's [Event System](/ui-kit/react/event-system). These let group/call/composer actions elsewhere in your app update the list automatically:
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -684,6 +498,10 @@ View slot props (`bubbleView`, `headerView`, `footerView`, `loadingView`, `empty
### Entity
+
+The message list requires exactly one entity — a `user` (1:1) or a `group` — to know which conversation to render. Without either prop it shows nothing. For how to derive the active entity from a conversation/user/group selection and mount the list, see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation).
+
+
---
### user
@@ -717,6 +535,10 @@ Enables thread mode. When set, the component fetches and displays replies to the
| Type | `number` |
| Default | `undefined` |
+
+Thread replies require wiring: capture the parent from `onThreadRepliesClick`, then mount a **second** `CometChatMessageList` + `CometChatMessageComposer` with this `parentMessageId` (usually alongside a `CometChatThreadHeader`) in a thread panel. See the [Threaded Messages guide](/ui-kit/react/guide-threaded-messages) for the full pattern.
+
+
---
### Data
@@ -776,6 +598,10 @@ Jump to a specific message by ID (e.g., from search results or a deep link). The
| Type | `number` |
| Default | `undefined` |
+
+This is how in-conversation search "jump to result" and deep links work: take the message ID from `CometChatSearch` (or your deep link) and pass it here. See the [Search Messages guide](/ui-kit/react/guide-search-messages) for the end-to-end wiring.
+
+
---
### startFromUnreadMessages
@@ -793,6 +619,10 @@ When `true`, the list scrolls to the first unread message on open instead of the
When `true`, loads the last agent conversation on initial render. Used for AI agent chat flows.
+
+Agent chat props (`loadLastAgentConversation`, `isAgentChat`) require an **AI Agent configured in the CometChat Dashboard** — the conversation entity must be that agent user. For a purpose-built agent experience, use the [AI Assistant Chat](/ui-kit/react/components/ai-assistant-chat) component, which wraps this list. See [AI Features](/ui-kit/react/ai-features) for the broader AI capabilities.
+
+
| | |
| --- | --- |
| Type | `boolean` |
@@ -868,6 +698,10 @@ Hide the moderation footer beneath disapproved messages.
| Type | `boolean` |
| Default | `false` |
+
+The moderation footer only appears when messages are actually moderated, which requires **Moderation rules configured in the CometChat Dashboard**. See [Moderation overview](/moderation/overview) to set up rules. This prop only controls whether the UI Kit renders the footer for already-moderated messages.
+
+
---
### showScrollbar
@@ -885,6 +719,10 @@ Show the native scrollbar on the message list. When `false`, the scrollbar is hi
Show AI-generated smart reply suggestions in the footer when the last received message matches keyword criteria.
+
+This requires the **Smart Replies** AI feature to be enabled for your app in the CometChat Dashboard. With the feature disabled, no suggestions are generated even when `showSmartReplies` is `true`. See [AI Features](/ui-kit/react/ai-features#smart-replies).
+
+
| | |
| --- | --- |
| Type | `boolean` |
@@ -896,6 +734,10 @@ Show AI-generated smart reply suggestions in the footer when the last received m
Show AI-generated conversation starters in the footer when the message list is empty.
+
+This requires the **Conversation Starter** AI feature to be enabled for your app in the CometChat Dashboard. With the feature disabled, no starters are generated even when `showConversationStarters` is `true`. See [AI Features](/ui-kit/react/ai-features#conversation-starter).
+
+
| | |
| --- | --- |
| Type | `boolean` |
@@ -1026,6 +868,10 @@ Hide the "Flag/Report" option from the message context menu.
| Type | `boolean` |
| Default | `false` |
+
+Flagging/reporting a message feeds CometChat **Moderation**. Flagged messages are reviewed in the [Moderation dashboard](/moderation/overview), and custom report reasons are configured there. See [Moderation overview](/moderation/overview).
+
+
---
### hideMessagePrivatelyOption
@@ -1048,6 +894,10 @@ Hide the "Translate" option from the message context menu.
| Type | `boolean` |
| Default | `false` |
+
+The "Translate" option only works when the **Message Translation extension is enabled** in the CometChat Dashboard. Without it, the option has nothing to call. Enable it from [Extensions](/ui-kit/react/extensions) — see the [Message Translation guide](/fundamentals/message-translation).
+
+
---
### hideFlagRemarkField
diff --git a/ui-kit/react/components/notification-feed.mdx b/ui-kit/react/components/notification-feed.mdx
index 79711463c..fe47845ef 100644
--- a/ui-kit/react/components/notification-feed.mdx
+++ b/ui-kit/react/components/notification-feed.mdx
@@ -4,61 +4,27 @@ description: "Full-screen notification feed component with category filtering, c
---
-```json
-{
- "component": "CometChatNotificationFeed",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatNotificationFeed } from \"@cometchat/chat-uikit-react\";",
- "description": "Full-screen notification feed with category filtering, timestamp grouping, card rendering via @cometchat/cards-react, real-time updates, and automatic engagement reporting.",
- "cssRootClass": ".cometchat-notification-feed",
- "props": {
- "data": {
- "title": { "type": "string", "default": "\"Notifications\"" },
- "notificationFeedRequestBuilder": { "type": "NotificationFeedRequestBuilder", "default": "SDK default (20 per page)" },
- "notificationCategoriesRequestBuilder": { "type": "NotificationCategoriesRequestBuilder", "default": "SDK default (50 per page)" }
- },
- "callbacks": {
- "onItemClick": "(feedItem: NotificationFeedItem) => void",
- "onActionClick": "(feedItem: NotificationFeedItem, action: CardAction) => void",
- "onError": "(error: CometChat.CometChatException) => void",
- "onBackPress": "() => void"
- },
- "visibility": {
- "showHeader": { "type": "boolean", "default": true },
- "showBackButton": { "type": "boolean", "default": false },
- "showFilterChips": { "type": "boolean", "default": true }
- },
- "viewSlots": {
- "headerView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "loadingView": "ReactNode",
- "itemView": "(item: NotificationFeedItem) => ReactNode"
- },
- "cards": {
- "cardThemeMode": { "type": "\"auto\" | \"light\" | \"dark\"", "default": "\"auto\"" },
- "cardThemeOverride": { "type": "Record", "default": "undefined" }
- }
- },
- "automaticBehaviors": [
- "Real-time updates via WebSocket listener",
- "Delivery reporting on fetch",
- "Read reporting on viewport visibility (IntersectionObserver)",
- "Unread count polling every 30 seconds",
- "Infinite scroll pagination",
- "Timestamp grouping (Today, Yesterday, day name, date)",
- "Category filter chips with unread badges",
- "Mark all read button"
- ],
- "additionalExports": {
- "useNotificationUnreadCount": "Hook for tracking unread count with shared polling"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatNotificationFeed` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatNotificationFeed } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-notification-feed` |
+| Primary output | `onItemClick: (feedItem: NotificationFeedItem) => void` — emits the clicked feed item |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus [Campaigns](/ui-kit/react/campaigns) configured in the Dashboard |
+| Stitching | Wire `onItemClick` / `onActionClick` to route the tapped notification (see [Campaigns](/ui-kit/react/campaigns)) |
+| SDK listeners (automatic) | Real-time feed updates, delivery/read reporting, and unread-count polling — handled internally |
+| Full props | See [Props](#props) |
+
`CometChatNotificationFeed` displays a scrollable notification feed where each item is rendered as a card using `@cometchat/cards-react`. It handles fetching, pagination, category filtering, timestamp grouping, real-time updates, and read/delivered/engagement reporting automatically.
+
+**Prerequisite: Campaigns must be configured first.** The feed only shows content once **Campaigns / Notifications are set up in the CometChat Dashboard** — channels, categories, and card templates. Without this, the feed renders but stays empty. See [Campaigns](/ui-kit/react/campaigns) for the end-to-end setup (Dashboard configuration through frontend wiring).
+
+
@@ -200,6 +166,10 @@ Fires when an interactive element (button, link) inside a card is clicked. The `
/>
```
+
+**Navigation is your app's responsibility.** `onItemClick` and `onActionClick` only report the intent (deep link, `chatWithUser`, `chatWithGroup`, `openUrl`) — the component does not route anywhere on its own. Your app must handle the transition (open the URL, switch to the chat with `params.uid` / `params.guid`, etc.). For the recommended navigation-event pattern, see [Event System — Navigation](/ui-kit/react/event-system#navigation).
+
+
#### onError
Fires when an internal error occurs (network failure, SDK exception).
diff --git a/ui-kit/react/components/outgoing-call.mdx b/ui-kit/react/components/outgoing-call.mdx
index aee19e4ea..57db7598b 100644
--- a/ui-kit/react/components/outgoing-call.mdx
+++ b/ui-kit/react/components/outgoing-call.mdx
@@ -4,46 +4,18 @@ description: "Displays the outgoing call screen with receiver info and a cancel
---
-```json
-{
- "component": "CometChatOutgoingCall",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatOutgoingCall } from \"@cometchat/chat-uikit-react\";",
- "description": "Displays the outgoing call screen with receiver info and a cancel button while waiting for the call to be answered.",
- "cssRootClass": ".cometchat-outgoing-call",
- "primaryOutput": {
- "prop": "onCallCanceled",
- "type": "() => void"
- },
- "props": {
- "data": {
- "call": {
- "type": "CometChat.Call",
- "required": true,
- "note": "The CometChat call object representing the outgoing call"
- }
- },
- "callbacks": {
- "onCallCanceled": "() => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "sound": {
- "disableSoundForCalls": { "type": "boolean", "default": false },
- "customSoundForCalls": { "type": "string", "default": "built-in" }
- },
- "viewSlots": {
- "titleView": "ReactNode",
- "subtitleView": "ReactNode",
- "avatarView": "ReactNode",
- "cancelButtonView": "ReactNode"
- }
- },
- "events": [],
- "eventsReceived": [],
- "sdkListeners": [],
- "types": {}
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatOutgoingCall` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatOutgoingCall } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-outgoing-call` |
+| Primary output | `onCallCanceled: () => void` — fires when the user cancels the call |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the outgoing `call` object; wire `onCallCanceled` to dismiss the screen |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/poll-bubble.mdx b/ui-kit/react/components/poll-bubble.mdx
index 5d0304e1d..f3c371d70 100644
--- a/ui-kit/react/components/poll-bubble.mdx
+++ b/ui-kit/react/components/poll-bubble.mdx
@@ -5,32 +5,28 @@ description: "A self-extracting bubble that renders a poll with its question, se
---
-```json
-{
- "component": "CometChatPollBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatPollBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting poll bubble. Derives the question, options, vote counts, totals, and the logged-in user's vote from the message metadata.",
- "cssRootClass": ".cometchat-poll-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.CustomMessage", "required": true, "note": "Contains poll data in its metadata; drives all extraction." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "disableInteraction": { "type": "boolean", "default": false },
- "onVoteSubmit": { "type": "(event: CometChatPollVoteEvent) => void" },
- "onVoteError": { "type": "(event: CometChatPollVoteErrorEvent) => void" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatPollBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatPollBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-poll-bubble` |
+| Primary output | `onVoteSubmit: (event: CometChatPollVoteEvent) => void` — emits the submitted vote |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the [Polls extension](/fundamentals/polls) enabled in the Dashboard |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
`CometChatPollBubble` renders a poll. It is **self-extracting**: pass the SDK custom `message` and the bubble derives the question, options, per-option vote counts, total votes, and the logged-in user's selected option entirely from the message metadata. Selecting an option submits a vote; the bar fills and counts/avatars update.
+
+**Requires the Polls extension enabled in the [CometChat Dashboard](/fundamentals/polls).** Poll messages (`extension_poll`) are only produced once the Polls extension is turned on for your app. Without it the composer cannot send polls and this bubble never renders. See the [Polls guide](/fundamentals/polls) to enable it, and the [Plugins overview](/ui-kit/react/plugins/overview#built-in-plugins) for how the UI Kit auto-routes poll messages to this bubble.
+
+
**Live Preview** — interact with the poll bubble.
@@ -155,6 +151,9 @@ Additional CSS class applied to the root element.
Plugin behavior, context menu, and conversation preview
+
+ Turn on the Polls extension that produces these messages
+
Render sticker messages
diff --git a/ui-kit/react/components/reaction-list.mdx b/ui-kit/react/components/reaction-list.mdx
index 26e56de93..60b543f59 100644
--- a/ui-kit/react/components/reaction-list.mdx
+++ b/ui-kit/react/components/reaction-list.mdx
@@ -4,39 +4,18 @@ description: "Standalone panel showing who reacted to a message, with emoji tab
---
-```json
-{
- "component": "CometChatReactionList",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatReactionList } from \"@cometchat/chat-uikit-react\";",
- "description": "Standalone panel showing who reacted to a message, with emoji tab filtering, pagination, and optimistic removal for the current user.",
- "cssRootClass": ".cometchat-reaction-list",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void"
- },
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "note": "Required. The message to show reactions for." },
- "reactionsRequestBuilder": { "type": "CometChat.ReactionsRequestBuilder" }
- },
- "callbacks": {
- "onItemClick": { "type": "(reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void", "note": "Fires only for current user's reactions (to remove)." },
- "onEmpty": { "type": "() => void", "note": "Fires when all reactions are removed. Parent should close the panel." },
- "onError": { "type": "(error: unknown) => void" }
- }
- },
- "types": {
- "CometChatReactionListRootProps": "Root provider props",
- "CometChatReactionListTabsProps": "Emoji tab bar props",
- "CometChatReactionListItemsProps": "Scrollable reactor list props",
- "CometChatReactionListLoadingStateProps": "Shimmer loading state props",
- "CometChatReactionListErrorStateProps": "Error state props",
- "CometChatReactionListEmptyStateProps": "Empty state props",
- "CometChatReactionListContextValue": "Full context value"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatReactionList` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatReactionList } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-reaction-list` |
+| Primary output | `onItemClick: (reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void` — removes the current user's reaction |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the target `message`; wire `onEmpty` to close the panel when all reactions are removed |
+| Full props | See [Props](#props) |
+
## Where It Fits
@@ -362,3 +341,18 @@ Optional custom CSS class for the root container.
- Shimmer respects `prefers-reduced-motion`.
- Spinner respects `prefers-reduced-motion`.
- High contrast mode supported via `@media (prefers-contrast: high)`.
+
+## Related
+
+
+`CometChatReactionList` never calls the SDK itself. The **parent owns reaction removal** — it calls `CometChat.removeReaction`, manages the panel's open/close state, and responds to `onItemClick` (a current-user reaction was tapped) and `onEmpty` (all reactions gone — close the panel).
+
+
+
+
+ Display-only reaction chips shown on message bubbles
+
+
+ The parent that owns the reaction add/remove SDK calls
+
+
diff --git a/ui-kit/react/components/reactions.mdx b/ui-kit/react/components/reactions.mdx
index 193d56f04..19e345008 100644
--- a/ui-kit/react/components/reactions.mdx
+++ b/ui-kit/react/components/reactions.mdx
@@ -4,47 +4,28 @@ description: "Displays emoji reaction chips on message bubbles with hover toolti
---
-```json
-{
- "component": "CometChatReactions",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatReactions } from \"@cometchat/chat-uikit-react\";",
- "description": "Displays emoji reaction chips on message bubbles with hover tooltips, a full reactor list, and overflow handling.",
- "cssRootClass": ".cometchat-reactions",
- "primaryOutput": {
- "prop": "onReactionClick",
- "type": "(emoji: string, message: CometChat.BaseMessage) => void"
- },
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "note": "Required. The message to show reactions for." },
- "alignment": { "type": "'left' | 'right' | 'center'", "default": "'left'" },
- "reactionsRequestBuilder": { "type": "CometChat.ReactionsRequestBuilder" }
- },
- "callbacks": {
- "onReactionClick": { "type": "(emoji: string, message: CometChat.BaseMessage) => void" },
- "onReactorClick": { "type": "(reaction: CometChat.Reaction, message: CometChat.BaseMessage) => void" },
- "onError": { "type": "(error: unknown) => void" }
- },
- "config": {
- "hoverDebounceTime": { "type": "number", "note": "Debounce (ms) before showing the hover tooltip." }
- }
- },
- "types": {
- "CometChatReactionsRootProps": "Root provider props",
- "CometChatReactionsBarProps": "Reaction chips bar props",
- "CometChatReactionsChipProps": "Single reaction chip props",
- "CometChatReactionsInfoProps": "Hover tooltip props",
- "CometChatReactionsOverflowProps": "Overflow button props"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatReactions` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatReactions } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-reactions` |
+| Primary output | `onReactionClick: (emoji: string, message: CometChat.BaseMessage) => void` — emits the clicked reaction |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the target `message`; wire `onReactionClick` / `onReactorClick` to handle taps |
+| Full props | See [Props](#props) |
+
## Where It Fits
`CometChatReactions` renders below message bubbles to show emoji reactions. It is typically used inside `CometChatMessageBubble` as the footer view. The parent (usually `CometChatMessageList`) owns the reaction add/remove SDK calls and passes the updated message down.
+
+**This component is display-only.** It renders reaction chips and tooltips but does **not** call the SDK to add or remove reactions. The **parent owns all reaction SDK calls** — it handles `onReactionClick` (to toggle a reaction via the SDK), supplies `reactionsRequestBuilder`, and passes an updated `message` prop down after each change. In practice the parent is [Message List](/ui-kit/react/components/message-list), which wires these calls for you. For a standalone reactor panel with removal support, use [Reaction List](/ui-kit/react/components/reaction-list).
+
+
**Live Preview** — interact with the reactions component.
diff --git a/ui-kit/react/components/search.mdx b/ui-kit/react/components/search.mdx
index fa56f643b..d8674c733 100644
--- a/ui-kit/react/components/search.mdx
+++ b/ui-kit/react/components/search.mdx
@@ -4,138 +4,30 @@ description: "Unified search across conversations and messages with filter chips
---
-```json
-{
- "component": "CometChatSearch",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatSearch } from \"@cometchat/chat-uikit-react\";",
- "description": "Unified search across conversations and messages with filter chips, scoped search, and customizable result views.",
- "cssRootClass": ".cometchat-search",
- "primaryOutput": {
- "prop": "onConversationClicked",
- "type": "(event: CometChatSearchConversationClickEvent) => void"
- },
- "props": {
- "data": {
- "searchIn": {
- "type": "CometChatSearchScope[]",
- "default": "[] (both conversations and messages)",
- "note": "Empty array shows both sections"
- },
- "searchFilters": {
- "type": "CometChatSearchFilter[]",
- "default": "all available filters"
- },
- "initialSearchFilter": {
- "type": "CometChatSearchFilter",
- "default": "undefined"
- },
- "defaultSearchText": {
- "type": "string",
- "default": "undefined"
- },
- "uid": {
- "type": "string",
- "default": "undefined",
- "note": "Scope search to a specific user's conversation"
- },
- "guid": {
- "type": "string",
- "default": "undefined",
- "note": "Scope search to a specific group's conversation"
- },
- "lastMessageDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "DD/MM/YYYY for all date ranges in search context"
- },
- "messageSentAtDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "undefined"
- },
- "conversationsRequestBuilder": {
- "type": "CometChat.ConversationsRequestBuilder",
- "default": "SDK default",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "messagesRequestBuilder": {
- "type": "CometChat.MessagesRequestBuilder",
- "default": "SDK default",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "textFormatters": {
- "type": "CometChatTextFormatter[]",
- "default": "undefined"
- }
- },
- "callbacks": {
- "onBack": "() => void",
- "onConversationClicked": "(event: CometChatSearchConversationClickEvent) => void",
- "onMessageClicked": "(event: CometChatSearchMessageClickEvent) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "visibility": {
- "hideBackButton": { "type": "boolean", "default": false },
- "hideUserStatus": { "type": "boolean", "default": false },
- "hideGroupType": { "type": "boolean", "default": false },
- "hideReceipts": { "type": "boolean", "default": false }
- },
- "viewSlots": {
- "initialView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "conversationItemView": "(conversation: CometChat.Conversation) => ReactNode",
- "conversationLeadingView": "(conversation: CometChat.Conversation) => ReactNode",
- "conversationTitleView": "(conversation: CometChat.Conversation) => ReactNode",
- "conversationSubtitleView": "(conversation: CometChat.Conversation) => ReactNode",
- "conversationTrailingView": "(conversation: CometChat.Conversation) => ReactNode",
- "messageItemView": "(message: CometChat.BaseMessage) => ReactNode",
- "messageLeadingView": "(message: CometChat.BaseMessage) => ReactNode",
- "messageTitleView": "(message: CometChat.BaseMessage) => ReactNode",
- "messageSubtitleView": "(message: CometChat.BaseMessage) => ReactNode",
- "messageTrailingView": "(message: CometChat.BaseMessage) => ReactNode",
- "conversationOptions": "(conversation: CometChat.Conversation) => CometChatSearchConversationOption[]"
- }
- },
- "events": [],
- "sdkListeners": [],
- "types": {
- "CometChatSearchScope": "'conversations' | 'messages'",
- "CometChatSearchFilter": "'messages' | 'conversations' | 'unread' | 'groups' | 'photos' | 'videos' | 'links' | 'files' | 'audio'",
- "CometChatSearchConversationClickEvent": {
- "conversation": "CometChat.Conversation",
- "searchKeyword": "string"
- },
- "CometChatSearchMessageClickEvent": {
- "message": "CometChat.BaseMessage",
- "searchKeyword": "string"
- },
- "CometChatSearchConversationOption": {
- "id": "string",
- "title": "string",
- "iconURL": "string | undefined",
- "onClick": "(conversation: CometChat.Conversation) => void"
- },
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatSearch` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatSearch } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-search` |
+| Primary output | `onConversationClicked: (event: CometChatSearchConversationClickEvent) => void` — emits the clicked search result |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Wire `onConversationClicked` / `onMessageClicked` to open the selected result — see the [Search Messages guide](/ui-kit/react/guide-search-messages) |
+| Full props | See [Props](#props) |
+
## Overview
`CometChatSearch` is a unified search component. It searches across conversations and messages, displaying results in separate sections with filter chips for scoping. It emits the selected result via `onConversationClicked` or `onMessageClicked` — both include the `searchKeyword` in the event payload. Wire it to `CometChatConversations` or `CometChatMessageList` to navigate to the matched result.
+
+
+**These result callbacks are required to make the component useful.** `CometChatSearch` does not navigate on its own — clicking a result only fires `onConversationClicked` or `onMessageClicked`. Your app must handle navigation: open the [Conversations](/ui-kit/react/components/conversations) list or route to the matched entity, and pass the message's ID to [Message List](/ui-kit/react/components/message-list) via `goToMessageId` to scroll to the exact message. For an end-to-end walkthrough, see the [Search Messages guide](/ui-kit/react/guide-search-messages).
+
+
+**Message search is plan-gated.** It requires **Search enabled on your CometChat plan** (check your app's plan in the [Dashboard](https://app.cometchat.com/)). Until it's enabled, the search API responds with **HTTP `402 Payment Required`** and no results appear — even when `CometChatSearch` is wired correctly.
+
**Live Preview** — interact with the default search component.
diff --git a/ui-kit/react/components/sticker-bubble.mdx b/ui-kit/react/components/sticker-bubble.mdx
index 786f159aa..23836999c 100644
--- a/ui-kit/react/components/sticker-bubble.mdx
+++ b/ui-kit/react/components/sticker-bubble.mdx
@@ -5,29 +5,28 @@ description: "A self-extracting bubble that renders a sticker image from a stick
---
-```json
-{
- "component": "CometChatStickerBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatStickerBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting sticker bubble. Extracts the sticker image URL and name from the message metadata.",
- "cssRootClass": ".cometchat-sticker-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.CustomMessage", "required": true, "note": "The sticker custom message; drives extraction of the image URL and name." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatStickerBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatStickerBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-sticker-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user; plus the [Stickers extension](/fundamentals/stickers) enabled in the Dashboard |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
`CometChatStickerBubble` renders a sticker. It is **self-extracting**: pass the SDK custom `message` and the bubble extracts the sticker image URL and name from its metadata, so it works standalone.
+
+**Requires the Stickers extension enabled in the [CometChat Dashboard](/fundamentals/stickers).** Sticker messages (`extension_sticker`) are only produced once the Stickers extension is turned on and sticker sets are configured for your app. Without it the composer's sticker keyboard is unavailable and this bubble never renders. See the [Stickers guide](/fundamentals/stickers) to enable it, and the [Plugins overview](/ui-kit/react/plugins/overview#built-in-plugins) for how the UI Kit auto-routes sticker messages to this bubble.
+
+
**Live Preview** — interact with the sticker bubble.
@@ -109,6 +108,9 @@ Additional CSS class applied to the root element.
Plugin behavior, keyboard, and conversation preview
+
+ Turn on the Stickers extension that produces these messages
+
Render poll messages
diff --git a/ui-kit/react/components/text-bubble.mdx b/ui-kit/react/components/text-bubble.mdx
index 2e6b421cb..92f61052a 100644
--- a/ui-kit/react/components/text-bubble.mdx
+++ b/ui-kit/react/components/text-bubble.mdx
@@ -5,26 +5,18 @@ description: "A self-extracting bubble that renders text messages with markdown,
---
-```json
-{
- "component": "CometChatTextBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatTextBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Self-extracting text bubble. Renders message text through the formatter pipeline (markdown, mentions, URLs), with optional read-more truncation.",
- "cssRootClass": ".cometchat-text-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.BaseMessage", "note": "When set (and text omitted), the bubble extracts content via message.getText() and configures mention formatting." },
- "text": { "type": "string", "note": "Explicit text override (used for media captions). At least one of text / message should be set." },
- "isSentByMe": { "type": "boolean", "default": true },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "disableTruncation": { "type": "boolean", "default": false },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatTextBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatTextBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-text-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/thread-header.mdx b/ui-kit/react/components/thread-header.mdx
index c217723ca..d8d867ab1 100644
--- a/ui-kit/react/components/thread-header.mdx
+++ b/ui-kit/react/components/thread-header.mdx
@@ -4,95 +4,20 @@ description: "Displays the parent message bubble and reply count for threaded co
---
-```json
-{
- "component": "CometChatThreadHeader",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatThreadHeader } from \"@cometchat/chat-uikit-react\";",
- "description": "Displays the parent message bubble and reply count for threaded conversations.",
- "cssRootClass": ".cometchat-thread-header",
- "primaryOutput": {
- "prop": "onClose",
- "type": "() => void"
- },
- "props": {
- "data": {
- "parentMessage": {
- "type": "CometChat.BaseMessage",
- "required": true,
- "note": "The parent message of the thread"
- },
- "separatorDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "undefined"
- },
- "messageSentAtDateTimeFormat": {
- "type": "CometChatDateFormatConfig",
- "default": "undefined"
- }
- },
- "visibility": {
- "hideReceipts": { "type": "boolean", "default": false },
- "hideDate": { "type": "boolean", "default": false },
- "hideReplyCount": { "type": "boolean", "default": false },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "callbacks": {
- "onClose": "() => void",
- "onSubtitleClicked": "() => void",
- "onParentDeleted": "() => void",
- "onError": "((error: CometChat.CometChatException) => void) | null"
- },
- "viewSlots": {
- "headerView": "ReactNode",
- "messageBubbleView": "ReactNode",
- "subtitleView": "ReactNode"
- }
- },
- "events": {
- "emitted": [],
- "received": [
- {
- "name": "ui:message/sent",
- "payload": "{ message, status: 'success' }",
- "description": "Increments reply count when current user sends a reply"
- },
- {
- "name": "ui:compose/edit",
- "payload": "{ message, status: 'success' }",
- "description": "Updates parent bubble when edited"
- },
- {
- "name": "ui:message/deleted",
- "payload": "{ message }",
- "description": "Triggers onParentDeleted"
- }
- ]
- },
- "sdkListeners": [
- "onTextMessageReceived",
- "onMediaMessageReceived",
- "onCustomMessageReceived",
- "onInteractiveMessageReceived",
- "onMessageEdited",
- "onMessageDeleted"
- ],
- "types": {
- "CometChatDateFormatConfig": {
- "today": "string | undefined",
- "yesterday": "string | undefined",
- "lastWeek": "string | undefined",
- "otherDays": "string | undefined",
- "relativeTime": {
- "minute": "string | undefined",
- "minutes": "string | undefined",
- "hour": "string | undefined",
- "hours": "string | undefined"
- }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatThreadHeader` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatThreadHeader } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-thread-header` |
+| Primary output | `onClose` (`() => void`) — closes the thread view |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Pass the parent `message`; wire `onClose` to dismiss the thread view |
+| Events received | `ui:message/sent`, `ui:compose/edit`, `ui:message/deleted` — see [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | Message updates in the thread — new replies, edits, and deletes to the parent message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/components/users.mdx b/ui-kit/react/components/users.mdx
index 44e988e5d..11c5157a8 100644
--- a/ui-kit/react/components/users.mdx
+++ b/ui-kit/react/components/users.mdx
@@ -4,102 +4,21 @@ description: "Searchable, scrollable list of users with selection support and re
---
-```json
-{
- "component": "CometChatUsers",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatUsers } from \"@cometchat/chat-uikit-react\";",
- "description": "Searchable, scrollable list of users with selection support and real-time presence updates.",
- "cssRootClass": ".cometchat-users",
- "primaryOutput": {
- "prop": "onItemClick",
- "type": "(user: CometChat.User) => void"
- },
- "props": {
- "data": {
- "usersRequestBuilder": {
- "type": "CometChat.UsersRequestBuilder",
- "default": "SDK default (30 per page)",
- "note": "Pass the builder instance, not the result of .build()"
- },
- "searchRequestBuilder": {
- "type": "CometChat.UsersRequestBuilder",
- "default": "undefined"
- },
- "searchKeyword": {
- "type": "string",
- "default": "undefined"
- },
- "activeUser": {
- "type": "CometChat.User",
- "default": "undefined"
- },
- "sectionHeaderKey": {
- "type": "keyof CometChat.User",
- "default": "undefined"
- }
- },
- "callbacks": {
- "onItemClick": "(user: CometChat.User) => void",
- "onSelect": "(user: CometChat.User, selected: boolean) => void",
- "onError": "((error: CometChat.CometChatException) => void) | null",
- "onEmpty": "() => void"
- },
- "visibility": {
- "hideUserStatus": { "type": "boolean", "default": false },
- "hideSearch": { "type": "boolean", "default": false },
- "showSectionHeader": { "type": "boolean", "default": true },
- "showSelectedUsersPreview": { "type": "boolean", "default": false },
- "showScrollbar": { "type": "boolean", "default": false }
- },
- "selection": {
- "selectionMode": {
- "type": "CometChatUsersSelectionMode",
- "values": ["'none'", "'single'", "'multiple'"],
- "default": "'none'"
- }
- },
- "viewSlots": {
- "itemView": "(user: CometChat.User) => ReactNode",
- "leadingView": "(user: CometChat.User) => ReactNode",
- "titleView": "(user: CometChat.User) => ReactNode",
- "subtitleView": "(user: CometChat.User) => ReactNode",
- "trailingView": "(user: CometChat.User) => ReactNode",
- "headerView": "ReactNode",
- "loadingView": "ReactNode",
- "emptyView": "ReactNode",
- "errorView": "ReactNode",
- "options": "(user: CometChat.User) => CometChatUserOption[]"
- }
- },
- "events": [],
- "eventsReceived": [
- {
- "name": "ui:user/blocked",
- "payload": "{ user: CometChat.User }",
- "description": "Updates user in the list (shows blocked state)"
- },
- {
- "name": "ui:user/unblocked",
- "payload": "{ user: CometChat.User }",
- "description": "Updates user in the list (removes blocked state)"
- }
- ],
- "sdkListeners": [
- "onUserOnline",
- "onUserOffline"
- ],
- "types": {
- "CometChatUserOption": {
- "id": "string",
- "title": "string",
- "iconURL": "string | undefined",
- "onClick": "(user: CometChat.User) => void"
- },
- "CometChatUsersSelectionMode": "'none' | 'single' | 'multiple'"
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatUsers` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatUsers } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-users` |
+| Primary output | `onItemClick: (user: CometChat.User) => void` — emits the selected user to open |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | Emits the selected user; wire `onItemClick` to open a chat (mount MessageHeader/List/Composer) — see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation) |
+| Events received | `ui:user/blocked`, `ui:user/unblocked` — see [Event System](/ui-kit/react/event-system) |
+| SDK listeners (automatic) | User presence (online/offline) |
+| Active highlight | Pass the selected user back as `activeUser` to highlight the open row — see [activeUser](#activeuser) |
+| Full props | See [Props](#props) |
+
## Overview
@@ -170,6 +89,8 @@ function UserPicker() {
### New Conversation Example
+`onItemClick` is where you capture the selected user and mount the chat panel to start a new conversation — see the [New Chat Creation guide](/ui-kit/react/guide-new-chat-creation) for the complete flow.
+
```tsx
import { useState } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
@@ -258,7 +179,7 @@ This component does not emit any UI events.
### Events Received
-UI events this component subscribes to (published by other components):
+UI events this component subscribes to (published by other components). These flow through the shared UI event bus — see [Event System → User & Group Actions](/ui-kit/react/event-system#user--group-actions) for how they are published. To publish these `ui:user/blocked` / `ui:user/unblocked` events yourself when a user is blocked or unblocked, follow the [Block/Unblock User guide](/ui-kit/react/guide-block-unblock-user).
| Event | Payload | Behavior |
| --- | --- | --- |
@@ -763,6 +684,10 @@ Function that returns context menu options for each user item (shown on hover/sw
/>
```
+
+The `onClick` handlers above (`blockUser`, `openProfile`) are placeholders — the component only renders the menu items; you must implement the actual behavior. For the Block User option, wire it to the SDK and refresh UI state as shown in the [Block/Unblock User guide](/ui-kit/react/guide-block-unblock-user).
+
+
---
### onItemClick
diff --git a/ui-kit/react/components/video-bubble.mdx b/ui-kit/react/components/video-bubble.mdx
index ffe99dc11..2b2961e08 100644
--- a/ui-kit/react/components/video-bubble.mdx
+++ b/ui-kit/react/components/video-bubble.mdx
@@ -5,26 +5,18 @@ description: "A batch-aware bubble that renders one or more video attachments wi
---
-```json
-{
- "component": "CometChatVideosBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatVideosBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Batch-aware video bubble. Extracts video attachments and caption from a MediaMessage; renders adaptive grid layouts with poster thumbnails and opens a fullscreen viewer.",
- "cssRootClass": ".cometchat-videos-bubble",
- "selfExtracting": true,
- "multiAttachment": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of attachments and caption." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "onVideoClicked": { "type": "(attachment, index) => void" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatVideosBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatVideosBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-videos-bubble` |
+| Primary output | `onVideoClicked: (attachment: CometChatVideosBubbleAttachment, index: number) => void` — opens the fullscreen viewer |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
@@ -40,6 +32,10 @@ Key capabilities:
- **Fullscreen viewer** — click any video to open in fullscreen player
- **Batch grouping** — rendered as one connected group when several media messages are sent together (handled by the [message list](/ui-kit/react/components/message-list#multi-attachment-batch-grouping))
+
+Auto poster thumbnails are produced by the **Thumbnail Generation** extension — enable it in the Dashboard ([Thumbnail Generation](/fundamentals/thumbnail-generation)). Without it, the bubble falls back to the first video frame.
+
+
**Live Preview** — interact with the video bubble.
diff --git a/ui-kit/react/components/voice-note-bubble.mdx b/ui-kit/react/components/voice-note-bubble.mdx
index 605a34e91..206866e44 100644
--- a/ui-kit/react/components/voice-note-bubble.mdx
+++ b/ui-kit/react/components/voice-note-bubble.mdx
@@ -5,24 +5,18 @@ description: "A dedicated bubble for recorded voice notes with waveform playback
---
-```json
-{
- "component": "CometChatVoiceNoteBubble",
- "package": "@cometchat/chat-uikit-react",
- "import": "import { CometChatVoiceNoteBubble } from \"@cometchat/chat-uikit-react\";",
- "description": "Voice note bubble. Renders for audio messages explicitly tagged audioType='voice_note'. Renders the CometChatAudioBubble waveform player internally. Always standalone (no grid).",
- "cssRootClass": ".cometchat-audio-bubble",
- "selfExtracting": true,
- "props": {
- "data": {
- "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Must have metadata audioType='voice_note'." },
- "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
- "textFormatters": { "type": "CometChatTextFormatter[]" },
- "className": { "type": "string" }
- }
- }
-}
-```
+
+| Field | Value |
+| --- | --- |
+| Component | `CometChatVoiceNoteBubble` |
+| Package | `@cometchat/chat-uikit-react` |
+| Import | `import { CometChatVoiceNoteBubble } from "@cometchat/chat-uikit-react";` |
+| CSS root class | `.cometchat-audio-bubble` |
+| Primary output | None — renders from the SDK message |
+| Prerequisites | App wrapped in [`CometChatProvider`](/ui-kit/react/cometchat-provider) with valid credentials + a logged-in user |
+| Stitching | None — self-extracting from the SDK message |
+| Full props | See [Props](#props) |
+
## Overview
diff --git a/ui-kit/react/core-features.mdx b/ui-kit/react/core-features.mdx
index b7b22b315..0567fe8b1 100644
--- a/ui-kit/react/core-features.mdx
+++ b/ui-kit/react/core-features.mdx
@@ -131,6 +131,10 @@ Mentions is a robust feature provided by CometChat that enhances the interactivi
Rich Text Formatting allows users to style their messages with bold, italic, underline, strikethrough, code, links, lists, and blockquotes. This brings richer expression to conversations and helps users emphasize key points, making communication clearer and more engaging.
+
+Rich text is opt-in: enable it on the composer with `enableRichTextEditor` (see [Message Composer](/ui-kit/react/components/message-composer)).
+
+
@@ -148,9 +152,13 @@ The Threaded Conversations feature enables users to respond directly to a specif
+
+Threads require wiring: capture the parent message from the Message List's `onThreadRepliesClick`, then mount a second `CometChatMessageList` + `CometChatMessageComposer` (with `parentMessageId`) and a `CometChatThreadHeader` in a thread panel. The [Threaded Messages guide](/ui-kit/react/guide-threaded-messages) walks through the full flow end-to-end.
+
+
| Components | Functionality |
| ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
-| [Threaded Message Preview](/ui-kit/react/guide-threaded-messages) | [Threaded Message Preview](/ui-kit/react/guide-threaded-messages) component displays the parent message along with the number of replies. |
+| [Threaded Messages guide](/ui-kit/react/guide-threaded-messages) | The [Threaded Messages guide](/ui-kit/react/guide-threaded-messages) shows how to build a thread panel: `onThreadRepliesClick`, `parentMessageId`, and `CometChatThreadHeader` (which displays the parent message with its reply count). |
## Quoted Replies
@@ -213,6 +221,10 @@ Learn more about how flagged messages are handled, reviewed, and moderated in th
Conversation and Advanced Search is a powerful feature provided by CometChat that enables users to quickly find conversations, messages, and media across chats in real time. It supports filters, scopes, and custom actions, allowing users to locate content efficiently while keeping the chat experience smooth and intuitive.
+
+Search requires wiring the result callbacks to navigation: handle `onConversationClicked` / `onMessageClicked` to open the conversation and jump to a message via the Message List's `goToMessageId`. The [Search Messages guide](/ui-kit/react/guide-search-messages) walks through the full in-conversation search flow.
+
+
diff --git a/ui-kit/react/event-system.mdx b/ui-kit/react/event-system.mdx
index a2b35e12e..c73f15c10 100644
--- a/ui-kit/react/event-system.mdx
+++ b/ui-kit/react/event-system.mdx
@@ -225,6 +225,8 @@ These events are published by UI Kit components for local cross-component commun
| `ui:group/member-scope-changed` | `{ message, user, group, newScope }` | GroupMembers |
| `ui:group/ownership-changed` | `{ group, newOwner, previousOwnerUid }` | GroupMembers |
+**Used by:** the [Block/Unblock User guide](/ui-kit/react/guide-block-unblock-user) publishes and subscribes to `ui:user/blocked` / `ui:user/unblocked` to keep the composer in sync, and the [Group Chat Setup guide](/ui-kit/react/guide-group-chat-setup) reacts to `ui:group/created` in the group creation flow.
+
### Thread
| Event Type | Payload | Published by |
@@ -232,6 +234,8 @@ These events are published by UI Kit components for local cross-component commun
| `ui:thread/opened` | `{ parentMessage }` | MessageList (thread option) |
| `ui:thread/closed` | — | ThreadHeader |
+**Used by:** the [Threaded Messages guide](/ui-kit/react/guide-threaded-messages) opens and closes the thread panel in response to `ui:thread/opened` / `ui:thread/closed`.
+
### Call Actions
| Event Type | Payload | Published by |
@@ -248,6 +252,8 @@ These events are published by UI Kit components for local cross-component commun
| --- | --- | --- |
| `ui:open-chat` | `{ user?, group? }` | MessageList (message privately option) |
+**Used by:** the [Message Privately guide](/ui-kit/react/guide-message-privately) subscribes to `ui:open-chat` to open a private one-on-one panel from within a group chat.
+
### Card Actions
| Event Type | Payload | Published by |
diff --git a/ui-kit/react/guide-block-unblock-user.mdx b/ui-kit/react/guide-block-unblock-user.mdx
index 95eb9cb06..7f3a62ce1 100644
--- a/ui-kit/react/guide-block-unblock-user.mdx
+++ b/ui-kit/react/guide-block-unblock-user.mdx
@@ -105,6 +105,10 @@ const [showBlockDialog, setShowBlockDialog] = useState(false);
Use `useCometChatEvents` to subscribe to block/unblock events. This keeps the composer visibility in sync even when the block action originates from a different component (e.g., a details panel).
+
+The `ui:user/blocked` and `ui:user/unblocked` events are part of the UI Kit's [Event System](/ui-kit/react/event-system#user--group-actions). See that page for the full list of user and group action events and the `usePublishEvent` / `useCometChatEvents` hooks.
+
+
_File: ChatView.tsx_
```tsx
@@ -299,6 +303,7 @@ export default App;
## Next Steps
+- [Event System](/ui-kit/react/event-system#user--group-actions) — full reference for the `ui:user/*` events and pub/sub hooks
- [Message Composer](/ui-kit/react/components/message-composer) — learn about composer customization
- [Conversations](/ui-kit/react/components/conversations) — build a full conversations list
- [CometChatProvider](/ui-kit/react/cometchat-provider) — configure the root provider
diff --git a/ui-kit/react/guide-group-chat-setup.mdx b/ui-kit/react/guide-group-chat-setup.mdx
index ac2667ad9..b67873882 100644
--- a/ui-kit/react/guide-group-chat-setup.mdx
+++ b/ui-kit/react/guide-group-chat-setup.mdx
@@ -1,12 +1,12 @@
---
title: "Group Chat Setup"
sidebarTitle: "Group Chat Setup"
-description: "Create and join group conversations with a full messaging interface using CometChat UI Kit components."
+description: "Create public, password-protected, and private groups; add, remove, and manage members with role-based permissions; join, leave, and transfer ownership using the CometChat UI Kit."
---
## Goal
-By the end of this guide you will have a working group chat interface where users can create a new group, add members, and exchange messages in real time using the CometChat compound components.
+By the end of this guide you will have a working group chat where users can create a group of any type (public, password-protected, or private), add and remove members with role-based permissions, join or leave a group, transfer ownership, and exchange messages in real time using the CometChat components.
## Prerequisites
@@ -19,12 +19,17 @@ By the end of this guide you will have a working group chat interface where user
| Component / API | Purpose |
|:----------------|:--------|
| `CometChatConversations` | Lists existing conversations including groups |
+| `CometChatGroupMembers` | Built-in member list with role-gated kick / ban / scope-change actions |
| `CometChatMessageHeader` | Displays group name, avatar, and member count |
| `CometChatMessageList` | Renders group messages in real time |
| `CometChatMessageComposer` | Text input for sending messages to the group |
| `CometChat.createGroup()` | SDK method to create a new group |
-| `CometChat.joinGroup()` | SDK method to join an existing group |
+| `CometChat.joinGroup()` | SDK method to join a public or password-protected group |
| `CometChat.addMembersToGroup()` | SDK method to add members |
+| `CometChat.kickGroupMember()` / `banGroupMember()` | SDK methods to remove or ban a member |
+| `CometChat.updateGroupMemberScope()` | SDK method to change a member's role |
+| `CometChat.leaveGroup()` | SDK method to leave a group |
+| `CometChat.transferGroupOwnership()` | SDK method to hand ownership to another member |
## Step 1: Set up the app shell
@@ -47,16 +52,29 @@ function App() {
export default App;
```
-## Step 2: Create a new group
+## Step 2: Create a group
-Use `CometChat.createGroup()` to programmatically create a group. You need a unique GUID, a name, and a group type (public, private, or password-protected).
+A group has one of three types, and the type decides how other users can get in. Choose the right one up front — it changes both the create call and how (or whether) users can join.
+
+| Type | Constant | How users get in |
+| --- | --- | --- |
+| **Public** | `CometChat.GROUP_TYPE.PUBLIC` | Anyone can join, no password. |
+| **Password-protected** | `CometChat.GROUP_TYPE.PASSWORD` | Users must supply the correct password to join. |
+| **Private** | `CometChat.GROUP_TYPE.PRIVATE` | **Add-only.** Users cannot join — not even with a password. An admin or moderator must add them. |
+
+Create a group with `CometChat.createGroup()`. The `CometChat.Group` constructor takes a **fourth `password` argument** — it is required for password-protected groups and ignored for the other two types.
```tsx
-async function createGroup() {
+async function createGroup(
+ name: string,
+ type: string,
+ password = "" // only used when type is PASSWORD
+) {
const group = new CometChat.Group(
"group-" + Date.now(), // unique GUID
- "My Team Chat", // group name
- CometChat.GROUP_TYPE.PUBLIC // public, private, or password
+ name,
+ type, // PUBLIC | PASSWORD | PRIVATE
+ password
);
try {
@@ -69,9 +87,17 @@ async function createGroup() {
}
```
-## Step 3: Add members to the group
+
+For a password-protected group you **must** pass the password as the fourth argument. `new CometChat.Group(guid, name, CometChat.GROUP_TYPE.PASSWORD)` with no password creates a group nobody can join.
+
+
+
+When a group is created through the UI Kit's built-in flow, it publishes the `ui:group/created` event on the [Event System](/ui-kit/react/event-system#user--group-actions). Subscribe with `useCometChatEvents` if other components need to react to new groups being created.
+
-After creating a group, add members using `CometChat.addMembersToGroup()`. Each member needs a UID and a scope (admin, moderator, or participant).
+## Step 3: Add members
+
+The creator becomes the group **owner** (with admin privileges). Add members with `CometChat.addMembersToGroup()` — each member is a `CometChat.GroupMember` with a UID and a scope (`ADMIN`, `MODERATOR`, or `PARTICIPANT`).
```tsx
async function addMembers(guid: string, memberUids: string[]) {
@@ -89,23 +115,121 @@ async function addMembers(guid: string, memberUids: string[]) {
}
```
-## Step 4: Join an existing group
+
+Adding members requires an **admin** or **moderator** scope in the target group — a **participant** cannot add members. Assign `PARTICIPANT` by default and only grant `ADMIN`/`MODERATOR` when a member needs management rights. For **private** groups this is the *only* way in — there is no join. To let a user pick who to add, render [`CometChatUsers`](/ui-kit/react/components/users) in selection mode and pass the chosen UIDs to `addMembersToGroup()`.
+
+
+## Step 4: Join a group
-For public groups, users can join without an invite using `CometChat.joinGroup()`.
+How a user joins depends on the group type:
```tsx
-async function joinGroup(guid: string) {
+async function joinGroup(group: CometChat.Group, password = "") {
+ const guid = group.getGuid();
+ const type = group.getType();
+
+ // Private groups cannot be joined — the user must be added (Step 3).
+ if (type === CometChat.GROUP_TYPE.PRIVATE) {
+ console.warn("Private groups are add-only; joining is not allowed.");
+ return;
+ }
+
try {
- const group = await CometChat.joinGroup(guid, CometChat.GROUP_TYPE.PUBLIC);
- console.log("Joined group:", group.getName());
- return group;
+ // Pass the password only for password-protected groups; "" for public.
+ const joined = await CometChat.joinGroup(guid, type, password);
+ console.log("Joined group:", joined.getName());
+ return joined;
} catch (error) {
+ // A wrong password for a PASSWORD group rejects here.
console.error("Failed to join group:", error);
}
}
```
-## Step 5: Display conversations and select a group
+
+Only **public** and **password-protected** groups can be joined. A **private** group is add-only — calling `joinGroup()` on it fails; add the user via [Step 3](#step-3-add-members) instead. The built-in [`CometChatGroups`](/ui-kit/react/components/groups) list surfaces a password prompt for password-protected groups automatically.
+
+
+## Step 5: Manage members — remove, ban, and change roles
+
+The `CometChatGroupMembers` component renders the member list with built-in **kick**, **ban**, and **change-scope** actions. It shows or hides those actions based on the **logged-in user's role**, so you don't have to gate them yourself.
+
+```tsx
+import { CometChatGroupMembers } from "@cometchat/chat-uikit-react";
+
+function GroupMembersPanel({ group }: { group: CometChat.Group }) {
+ return (
+ {/* close the panel */}}
+ />
+ );
+}
+```
+
+Group actions are **scope-based** — a participant can never perform them:
+
+| Action | Participant | Moderator | Admin / Owner |
+| --- | :---: | :---: | :---: |
+| Send & receive messages | ✅ | ✅ | ✅ |
+| Add members | ❌ | ✅ | ✅ |
+| Kick / ban **participants** | ❌ | ✅ | ✅ |
+| Kick / ban admins & moderators | ❌ | ❌ | ✅ |
+| Change a member's scope | ❌ | participants only | ✅ |
+| Update / delete the group | ❌ | update only | ✅ |
+| Transfer ownership | ❌ | ❌ | Owner only |
+
+If you build your own controls instead of using the component's menu, the SDK methods are:
+
+```tsx
+// Remove a member from the group
+await CometChat.kickGroupMember(guid, uid);
+
+// Ban a member (kicked and blocked from rejoining)
+await CometChat.banGroupMember(guid, uid);
+
+// Promote / demote a member
+await CometChat.updateGroupMemberScope(
+ guid,
+ uid,
+ CometChat.GROUP_MEMBER_SCOPE.MODERATOR
+);
+```
+
+
+Calling these as a participant — or a moderator acting on an admin — rejects with a permission error. Let the acting user's scope drive which controls you render. The component already does this for its default kick/ban/scope menu.
+
+
+## Step 6: Leave a group and transfer ownership
+
+Any member can leave with `CometChat.leaveGroup()` — **except the owner**. An owner must hand ownership to another member with `CometChat.transferGroupOwnership()` *first*; leaving before transferring rejects with an error.
+
+```tsx
+async function leaveGroup(group: CometChat.Group, loggedInUid: string) {
+ const guid = group.getGuid();
+ const isOwner = group.getOwner() === loggedInUid;
+
+ try {
+ if (isOwner) {
+ // Owners cannot leave until ownership is transferred.
+ const newOwnerUid = await pickAnotherMember(guid); // your UI: choose a member
+ if (!newOwnerUid) return; // no one to hand off to — block the leave
+ await CometChat.transferGroupOwnership(guid, newOwnerUid);
+ }
+
+ await CometChat.leaveGroup(guid);
+ console.log("Left group:", group.getName());
+ } catch (error) {
+ console.error("Failed to leave group:", error);
+ }
+}
+```
+
+
+Wiring "Leave Group" straight to `leaveGroup()` throws for the owner. Detect the owner (`group.getOwner() === loggedInUser.getUid()`), show an **ownership-transfer** step (a member picker — `CometChatGroupMembers` in selection mode works well), call `transferGroupOwnership()`, and only then `leaveGroup()`. See the SDK [Transfer Group Ownership](/sdk/javascript/transfer-group-ownership) and [Leave Group](/sdk/javascript/leave-group) references.
+
+
+## Step 7: Display conversations and select a group
Use `CometChatConversations` to show the user's conversations. When a group conversation is selected, pass the group object to the message components.
@@ -135,7 +259,7 @@ function GroupChat() {
}
```
-## Step 6: Render the group message view
+## Step 8: Render the group message view
Combine `CometChatMessageList` and `CometChatMessageComposer` to display messages and allow sending within the selected group.
@@ -161,9 +285,9 @@ function GroupMessageView({ group }: { group: CometChat.Group }) {
}
```
-## Step 7: Add a create-group form
+## Step 9: Add a create-group form
-Provide a simple UI for users to create groups on the fly. Wire it to the `createGroup` function from Step 2.
+Provide a UI for users to create groups on the fly. Show a password field only when the selected type is password-protected, and pass it through to `createGroup` from Step 2.
```tsx
import { useState } from "react";
@@ -172,21 +296,27 @@ import { CometChat } from "@cometchat/chat-sdk-javascript";
function CreateGroupForm({ onCreate }: { onCreate: (group: CometChat.Group) => void }) {
const [name, setName] = useState("");
const [type, setType] = useState(CometChat.GROUP_TYPE.PUBLIC);
+ const [password, setPassword] = useState("");
+
+ const isPasswordType = type === CometChat.GROUP_TYPE.PASSWORD;
async function handleSubmit(e: React.FormEvent) {
e.preventDefault();
if (!name.trim()) return;
+ if (isPasswordType && !password) return; // password is required for this type
const group = new CometChat.Group(
"group-" + Date.now(),
name.trim(),
- type as typeof CometChat.GROUP_TYPE.PUBLIC
+ type,
+ isPasswordType ? password : ""
);
try {
const createdGroup = await CometChat.createGroup(group);
onCreate(createdGroup);
setName("");
+ setPassword("");
} catch (error) {
console.error("Group creation failed:", error);
}
@@ -206,9 +336,18 @@ function CreateGroupForm({ onCreate }: { onCreate: (group: CometChat.Group) => v
style={{ width: "100%", marginBottom: "8px", padding: "8px" }}
>
-
+
+ {isPasswordType && (
+ setPassword(e.target.value)}
+ placeholder="Group password"
+ style={{ width: "100%", marginBottom: "8px", padding: "8px" }}
+ />
+ )}
@@ -219,6 +358,10 @@ function CreateGroupForm({ onCreate }: { onCreate: (group: CometChat.Group) => v
## Complete Example
+
+The **"New Group"** button lives in the conversation list's `headerView` slot — not in a separate `
` stacked above the list — so the list header stays intact and the layout doesn't shift. Because `headerView` replaces the entire default header, re-render the default title (**"Chats"**) alongside the button.
+
+
```tsx GroupChat.tsx
import { useState } from "react";
import { CometChat } from "@cometchat/chat-sdk-javascript";
@@ -233,21 +376,27 @@ import {
function CreateGroupForm({ onCreate }: { onCreate: (group: CometChat.Group) => void }) {
const [name, setName] = useState("");
const [type, setType] = useState(CometChat.GROUP_TYPE.PUBLIC);
+ const [password, setPassword] = useState("");
+
+ const isPasswordType = type === CometChat.GROUP_TYPE.PASSWORD;
async function handleSubmit(e: React.FormEvent) {
e.preventDefault();
if (!name.trim()) return;
+ if (isPasswordType && !password) return;
const group = new CometChat.Group(
"group-" + Date.now(),
name.trim(),
- type as typeof CometChat.GROUP_TYPE.PUBLIC
+ type,
+ isPasswordType ? password : ""
);
try {
const createdGroup = await CometChat.createGroup(group);
onCreate(createdGroup);
setName("");
+ setPassword("");
} catch (error) {
console.error("Group creation failed:", error);
}
@@ -267,9 +416,18 @@ function CreateGroupForm({ onCreate }: { onCreate: (group: CometChat.Group) => v
style={{ width: "100%", marginBottom: "8px", padding: "8px" }}
>
-
+
+ {isPasswordType && (
+ setPassword(e.target.value)}
+ placeholder="Group password"
+ style={{ width: "100%", marginBottom: "8px", padding: "8px" }}
+ />
+ )}
@@ -310,19 +468,21 @@ function GroupChat() {
return (
-
-
-
-
{showCreateForm && }
-
+
+ Chats
+
+
+ }
+ />
@@ -353,6 +513,8 @@ export default App;
## Next Steps
- [Groups](/ui-kit/react/components/groups) — browse and join existing groups
-- [Group Members](/ui-kit/react/components/group-members) — manage group membership
+- [Group Members](/ui-kit/react/components/group-members) — manage group membership with role-based actions
+- [Kick / Ban Members](/sdk/javascript/group-kick-ban-members) · [Change Member Scope](/sdk/javascript/group-change-member-scope) · [Transfer Ownership](/sdk/javascript/transfer-group-ownership) — SDK references
- [Message Header](/ui-kit/react/components/message-header) — customize the group header
+- [Event System](/ui-kit/react/event-system#user--group-actions) — react to `ui:group/created` and other group action events
- [CometChatProvider](/ui-kit/react/cometchat-provider) — configure the root provider
diff --git a/ui-kit/react/guide-message-privately.mdx b/ui-kit/react/guide-message-privately.mdx
index 02454e238..ae0bf8111 100644
--- a/ui-kit/react/guide-message-privately.mdx
+++ b/ui-kit/react/guide-message-privately.mdx
@@ -105,6 +105,10 @@ async function handleMessagePrivately(uid: string) {
Use `useCometChatEvents` to subscribe to the `ui:open-chat` event, which is published internally when a user clicks "Message Privately" from the context menu. When the event fires, extract the user and open the private panel.
+
+`ui:open-chat` is one of the UI Kit's [Event System — Navigation events](/ui-kit/react/event-system#navigation). See that page for the event payload and the full list of navigation and UI events.
+
+
```tsx
import { useCometChatEvents } from "@cometchat/chat-uikit-react";
import type { CometChatEvent } from "@cometchat/chat-uikit-react";
@@ -260,6 +264,7 @@ export default App;
## Next Steps
+- [Event System](/ui-kit/react/event-system#navigation) — reference for `ui:open-chat` and other navigation events
- [Message Composer](/ui-kit/react/components/message-composer) — customize the composer for private chats
- [Conversations](/ui-kit/react/components/conversations) — manage the conversations list
- [Users](/ui-kit/react/components/users) — browse and select users directly
diff --git a/ui-kit/react/guide-new-chat-creation.mdx b/ui-kit/react/guide-new-chat-creation.mdx
index 2572cbc7f..67d708109 100644
--- a/ui-kit/react/guide-new-chat-creation.mdx
+++ b/ui-kit/react/guide-new-chat-creation.mdx
@@ -49,7 +49,7 @@ export default App;
## Step 2: Add a "New Chat" trigger
-Create a button that opens a selection panel. Use component state to toggle between the conversations view and the user/group selection view.
+Create a button that opens a selection panel. Use component state to toggle between the conversations view and the user/group selection view. Put the **"New Chat"** trigger in the conversation list's `headerView` slot rather than a separate `
` stacked above the list — that keeps the header intact and the layout stable. Because `headerView` replaces the entire default header, re-render the default title (**"Chats"**) next to the button.
```tsx NewChatApp.tsx
import { useState } from "react";
@@ -67,17 +67,9 @@ function NewChatApp() {
return (
);
@@ -208,6 +229,15 @@ export default function TabbedChatPage() {
flex-direction: column;
}
+.details-panel {
+ width: 320px;
+ height: 100%;
+ border-left: 1px solid #eee;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
.empty-conversation {
flex: 1;
display: flex;
@@ -248,6 +278,8 @@ export default App;
3. **Unified selection** — all three tabs feed into the same `selectedUser` / `selectedGroup` state. Clicking any item (conversation, call log, or user) updates the message panel.
4. **Call log handling** — when a call log is clicked, the receiver (user or group) is extracted and passed to the message components.
5. **React Router** handles navigation — the tabbed chat page is a route component at `/chat`.
+6. **Active highlight** — the current selection is passed back to each list as `activeConversation` / `activeUser` (and `activeGroup` on a Groups tab), so the open row stays highlighted while its chat is on screen.
+7. **Details panel round-trip** — clicking the message header opens a group details / members side panel (`CometChatGroupMembers`). Its `onBack` sets `showDetails` back to `false`, closing the panel — the full open→close cycle, not just opening it.
---
@@ -276,6 +308,7 @@ type Tab = "chat" | "calls" | "users" | "groups";
setSelectedGroup(group);
setSelectedUser(undefined);
}}
+ activeGroup={selectedGroup}
/>
)}
```
diff --git a/ui-kit/react/react-tab-based-chat.mdx b/ui-kit/react/react-tab-based-chat.mdx
index ba4b4146d..b4b2b3106 100644
--- a/ui-kit/react/react-tab-based-chat.mdx
+++ b/ui-kit/react/react-tab-based-chat.mdx
@@ -50,6 +50,7 @@ import {
CometChatConversations,
CometChatUsers,
CometChatCallLogs,
+ CometChatGroupMembers,
CometChatMessageHeader,
CometChatMessageList,
CometChatMessageComposer,
@@ -62,8 +63,11 @@ function App() {
const [activeTab, setActiveTab] = useState("chat");
const [selectedUser, setSelectedUser] = useState(undefined);
const [selectedGroup, setSelectedGroup] = useState(undefined);
+ const [selectedConversation, setSelectedConversation] = useState(undefined);
+ const [showDetails, setShowDetails] = useState(false);
const handleConversationClick = (conversation: CometChat.Conversation) => {
+ setSelectedConversation(conversation); // highlights the open row in the Conversations list
const entity = conversation.getConversationWith();
if (conversation.getConversationType() === "user") {
setSelectedUser(entity as CometChat.User);
@@ -123,20 +127,27 @@ function App() {
@@ -145,6 +156,16 @@ function App() {
Select a conversation to start chatting
)}
+
+ {/* Details / members side panel — opened from the header, closed via onBack */}
+ {showDetails && selectedGroup && (
+
+ setShowDetails(false)}
+ />
+
+ )}
);
@@ -209,6 +230,15 @@ export default App;
flex-direction: column;
}
+.details-panel {
+ width: 320px;
+ height: 100%;
+ border-left: 1px solid #eee;
+ overflow: hidden;
+ display: flex;
+ flex-direction: column;
+}
+
.empty-conversation {
flex: 1;
display: flex;
@@ -228,6 +258,8 @@ export default App;
2. **Conditional rendering** — only the active tab's component mounts. Switching tabs unmounts the previous list and mounts the new one.
3. **Unified selection** — all three tabs feed into the same `selectedUser` / `selectedGroup` state. Clicking any item (conversation, call log, or user) updates the message panel.
4. **Call log handling** — when a call log is clicked, the receiver (user or group) is extracted and passed to the message components.
+5. **Active highlight** — the current selection is passed back to each list as `activeConversation` / `activeUser` (and `activeGroup` on a Groups tab), so the open row stays highlighted while its chat is on screen.
+6. **Details panel round-trip** — clicking the message header opens a group details / members side panel (`CometChatGroupMembers`). Its `onBack` sets `showDetails` back to `false`, closing the panel — the full open→close cycle, not just opening it.
---
@@ -256,6 +288,7 @@ type Tab = "chat" | "calls" | "users" | "groups";
setSelectedGroup(group);
setSelectedUser(undefined);
}}
+ activeGroup={selectedGroup}
/>
)}
```
diff --git a/ui-kit/react/theming.mdx b/ui-kit/react/theming.mdx
index 2de7a9dbe..7581b2173 100644
--- a/ui-kit/react/theming.mdx
+++ b/ui-kit/react/theming.mdx
@@ -57,6 +57,50 @@ function ThemeToggle() {
---
+## Follow the System (OS) Theme
+
+The UI Kit ships `light` and `dark` themes but **does not follow the operating system's color-scheme setting on its own** — there is no `theme="system"`. A fresh app stays on the default `light` theme even when the OS is in dark mode. To follow the OS, read `prefers-color-scheme` and drive the theme yourself.
+
+Seed the initial theme from the OS setting when you mount the provider:
+
+```tsx title="src/main.tsx"
+const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
+
+
+
+;
+```
+
+Then keep it in sync at runtime by subscribing to the media query's `change` event from inside the provider (so `useTheme` is available):
+
+```tsx
+import { useEffect } from "react";
+import { useTheme } from "@cometchat/chat-uikit-react";
+
+function useFollowSystemTheme() {
+ const { setTheme } = useTheme();
+
+ useEffect(() => {
+ const media = window.matchMedia("(prefers-color-scheme: dark)");
+
+ // Apply the current OS setting immediately.
+ setTheme(media.matches ? "dark" : "light");
+
+ // Update whenever the OS toggles light/dark.
+ const onChange = (event: MediaQueryListEvent) =>
+ setTheme(event.matches ? "dark" : "light");
+ media.addEventListener("change", onChange);
+ return () => media.removeEventListener("change", onChange);
+ }, [setTheme]);
+}
+```
+
+
+Call `useFollowSystemTheme()` from a component rendered **inside** `CometChatProvider`. If you also expose a manual toggle, stop calling `setTheme` from this hook once the user overrides the theme — otherwise the next OS change will revert their choice.
+
+
+---
+
## Customizing Tokens
Override CSS variables to change the look of all components at once:
@@ -77,15 +121,19 @@ import "./cometchat-overrides.css";
### Per-Theme Overrides
-Target a specific theme with the `data-theme` selector:
+Target a specific theme with the `data-theme` selector. The `data-theme` attribute and the `.cometchat` class sit on the **same** wrapper `
`, so use the **same-element** selector `.cometchat[data-theme="dark"]` — not the descendant form `[data-theme="dark"] .cometchat`, which matches only a `.cometchat` *nested inside* another `[data-theme]` element and therefore misses the root wrapper:
```css
-[data-theme="dark"] .cometchat {
+.cometchat[data-theme="dark"] {
--cometchat-primary-color: #bb86fc;
--cometchat-background-color-01: #121212;
}
```
+
+Component-class overrides *are* descendants of the wrapper, so the descendant form is correct for them — e.g. `[data-theme="dark"] .cometchat-message-list { … }`. It's only overriding tokens on the **root wrapper** that requires the same-element `.cometchat[data-theme="dark"]` selector.
+
+
### Per-Component Overrides
Target a specific component by its BEM class name:
@@ -108,6 +156,20 @@ Or wrap the component in your own class:
}
```
+### Differentiating the Thread Panel
+
+Some surfaces paint their **own opaque token** rather than inheriting a background from their wrapper. The clearest example is the thread panel: its `CometChatMessageList` fills itself with `--cometchat-message-list-bg` (default `--cometchat-background-color-03`), while the thread header uses `--cometchat-thread-header-background` (which falls back to `--cometchat-background-color-01`). Because the list background is opaque, setting a `background` on the wrapping `
` has **no visible effect** — the list paints over it, and the panel looks mismatched against its header and composer.
+
+To style such a surface, override its own token instead of a wrapper background. For example, to make the thread panel's message list match its header:
+
+```css
+/* Scope to the thread wrapper in your app */
+.my-thread-panel {
+ --cometchat-message-list-bg: var(--cometchat-background-color-01);
+ --cometchat-thread-header-background: var(--cometchat-background-color-01);
+}
+```
+
---
## Design Token Categories
@@ -133,6 +195,8 @@ Or wrap the component in your own class:
| Token | Purpose |
| --- | --- |
| `--cometchat-background-color-01` to `04` | Background layers (01 = base, 04 = elevated) |
+| `--cometchat-message-list-bg` | Opaque background painted by `CometChatMessageList` (default `--cometchat-background-color-03`). Set this — not a wrapper `background` — to recolor the list surface |
+| `--cometchat-thread-header-background` | Background of the thread panel header (falls back to `--cometchat-background-color-01`) |
| `--cometchat-border-color-light` / `default` / `dark` / `highlight` | Border variants |
| `--cometchat-text-color-primary` / `secondary` / `tertiary` / `disabled` / `highlight` | Text colors |
| `--cometchat-icon-color-primary` / `secondary` / `tertiary` / `highlight` | Icon colors |