Tip: You can fork the sandbox, insert your CometChat credentials (App ID, Region, Auth Key.) in the code, and immediately preview how the UI and messages respond in real time.
User Interface Overview

- Sidebar (Conversation List) – Displays active conversations, including users and groups.
- Message View – Shows chat messages for the selected conversation in real-time.
- Message Composer – Provides an input field for typing and sending messages, along with support for media, emojis, and reactions.
Step-by-Step Guide
Step 1: Create Sidebar
Let’s create theSidebar component which will render different conversations.
Folder Structure
Create aCometChatSelector folder inside your src directory and add the following files:
- TypeScript
- CSS
CometChatSelector.tsx
Step 2: Update App
Now we will update theApp.tsx & App.css files to import these new components as below,
- TypeScript
- CSS
App.tsx
Step 3: Run the project
Next Steps
Enhance the User Experience
- Advanced Customizations – Personalize the chat UI to align with your brand.