Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-react-uikit-v7.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Goal
By the end of this guide you will have voice and video calling working in your React app — including theCometChatCallButtons component, incoming call notifications, and outgoing call screens.
Prerequisites
- A working CometChat React UI Kit v7 setup (completed the Quick Start)
CometChatProviderconfigured with valid credentials- A CometChat plan that includes calling features enabled in your dashboard
Step 1: Install the Calls SDK
The calling feature requires the optional@cometchat/calls-sdk-javascript peer dependency:
Step 2: Enable calling in CometChatProvider
Set thecallingEnabled prop to true on your CometChatProvider:
callingEnabled is true, the UI Kit:
- Registers the
CallingPluginfor call-related message rendering - Lazy-loads call components (
CometChatIncomingCall,CometChatOutgoingCall,CometChatOngoingCall) only when needed - Enables the
CometChatCallButtonscomponent to initiate calls
callingEnabled is false (the default), call components are not loaded and CometChatCallButtons renders nothing.
Step 3: Configure call settings
The Calls SDK uses the sameappId and region as your chat SDK — no separate configuration is needed. CometChatProvider passes these credentials to the Calls SDK automatically when callingEnabled is true.
If your app uses a dedicated calling app ID (separate from the chat app ID), pass it via the config prop:
Step 4: Add Call Buttons via CometChatMessageHeader
CometChatMessageHeader automatically renders voice and video call buttons when callingEnabled is true on your provider. No extra configuration needed — just render the header with a user or group:
hideVoiceCallButton or hideVideoCallButton:
group prop instead:
CometChatMessageHeader.CallButtons is a sub-component of CometChatMessageHeader. It is not a standalone component — you don’t need to import or render it separately.Step 5: Verify with a voice call
With the setup complete, test a voice call:- Open your app with two different users in separate browser tabs
- Click the voice call button (phone icon) in the chat header
- The caller sees the
CometChatOutgoingCallscreen with a “Calling…” indicator - The receiver sees the
CometChatIncomingCalloverlay with accept/reject buttons - Once accepted, both users enter the
CometChatOngoingCallview with live audio
Step 6: Verify with a video call
Video calls work identically — click the video call button (camera icon) instead. TheCometChatOngoingCall component renders a full video interface with:
- Local and remote video streams
- Mute/unmute audio toggle
- Camera on/off toggle
- End call button
Step 7: Handle incoming and outgoing calls
CometChatIncomingCall and CometChatOutgoingCall are automatically rendered by the UI Kit when callingEnabled is true. They listen for SDK call events via SDKBridgeProvider and display themselves as overlays when a call is initiated or received.
You do not need to render these components manually — they are managed internally. However, you can customize their behavior with callbacks:
Summary
| Step | Action |
|---|---|
| 1 | Install @cometchat/calls-sdk-javascript |
| 2 | Set callingEnabled={true} on CometChatProvider |
| 3 | (Optional) Configure separate calling app settings via config prop |
| 4 | Add CometChatCallButtons with a user or group prop |
| 5 | Test voice calls between two users |
| 6 | Test video calls between two users |
| 7 | (Optional) Customize incoming/outgoing call handlers |
Next Steps
- Message Header — full props reference including call button visibility
- Call Logs — display call history
- CometChatProvider — all provider configuration options