Start your first conversation
CometChat UI Kit for React Native is a collection of prebuilt UI components designed to simplify the development of an in-app chat with all the essential messaging features. Our UI Kit offers light and dark themes, various fonts, colors, and additional customization options. CometChat UI Kit supports both one-to-one and group conversations. Follow the guide below to initiate conversations from scratch using CometChat React Native UI Kit.- iOS
- Android

Prerequisites
Before installing UI Kit for React Native, you need to create a CometChat application on the CometChat Dashboard, which comprises everything required in a chat service including users, groups, calls & messages. You will need theApp ID , AuthKey, Region of your CometChat application when initialising the SDK.
i. React Native Development Environment
- Make sure you have React Native development environment properly set up on your machine. Follow the official React Native documentation to set up your development environment.
- To install UI Kit for React Native, you need to first register on CometChat Dashboard. Click here to sign up.
- Create a new app
- Head over to the QuickStart or API & Auth Keys section and note the App ID, Auth Key, and Region.
NoteEach CometChat application can be integrated with a single client app. Within the same application, users can communicate with each other across all platforms, whether they are on mobile devices or on the web.
There is a known issue with React Native versions 0.76 and 0.77 where enabling the new architecture may cause the Video Player in the UI Kit to malfunction on Android devices. To avoid this, either disable the new architecture or use a different version.
Getting Started
You can start building a modern messaging experience in your app by installing the new UI Kit. This developer kit is an add-on feature to CometChat React Native SDK.Step 1
Create a project
To get started, openterminal and create a new project using below command.
- Bash
Step 2
Add Dependency
You can install UI Kit for React Native through using below command.- Bash
Other Dependencies
- Bash
Add Permissions for android
OpenAndroidManifest.xml file from android/app/src/main location and add below permissions
- XML
Please make sure Android SDK path is set in the
ANDROID_HOME environment variable or in local.properties via the field sdk.dir.Install @cometchat/calls-sdk-react-native Package (Optional)
If you want calling functionality inside your application then you need to install calling SDK additionally inside your project.React Native UI Kit supports Calls SDK V3 or higher.
-
You can install
@cometchat/calls-sdk-react-nativeCalling SDK for React Native using below command.- Bash
-
Install dependancies required for call SDK to work
- JSON
-
Add permissions
Android:
iOS:
- XML
- XML
Step 3
Initialise CometChatUIKit
To integrate and run CometChat UI Kit in your app, you need to initialize it beforehand. The Init method initializes the settings required for CometChat. Please ensure to call this method before invoking any other methods from CometChat UI Kit or CometChat SDK.The Auth Key is an optional property of the
UIKitSettings Class. It is intended for use primarily during proof-of-concept (POC) development or in the early stages of application development. You can use the Auth Token method to log in securely.- TypeScript
Login User
For login, you require a UID. You can create your own users on the CometChat Dashboard or via API. We have pre-generated test users: cometchat-uid-1, cometchat-uid-2, cometchat-uid-3, cometchat-uid-4, cometchat-uid-5. The Login method returns the User object containing all the information of the logged-in user.This straightforward authentication method is ideal for proof-of-concept (POC) development or during the early stages of application development. For production environments, however, we strongly recommend using an Auth Token instead of an Auth Key to ensure enhanced security.
- TypeScript
- We have set up 5 users for testing having UIDs: cometchat-uid-1, cometchat-uid-2, cometchat-uid-3, cometchat-uid-4, and cometchat-uid-5.
Step 5
Render Conversation With Message
ConversationsWithMessages is a wrapper component that offers functionality to render both the Conversations and Messages components. It also enables opening the Messages by tapping on any conversation rendered in the list of conversations.- iOS
- Android

- JSX
It will automatically fetch the conversation data upon loading the list. If the conversation list is empty, you can start a new conversation.
Make sure you add a Privacy Manifest File to your app before going live