Skip to main content
This guide walks you through creating a tab-based messaging UI using React and CometChat UIKit. The UI will include different sections for Chats, Calls, Users, and Groups, allowing seamless navigation.

User Interface Preview

This layout consists of:
  1. Sidebar (Conversation List) – Displays recent conversations with active users and groups.
  2. Message View – Shows the selected chat with real-time messages.
  3. Message Input Box – Allows users to send messages seamlessly.

Step 1: Render the Tab Component

The CometChatConversations widget displays all conversations related to the currently logged-in user. Follow the steps below to render this component:
main.dart

Full Example: main.dart

main.dart

Step 2: Render the Messages Component

To create a complete messaging view, include the following components in messages_screen.dart:
messages_screen.dart

Step 3: Run the App

Use the following command to run the app on a connected device or emulator:
This will launch the app, and you should see the tab-based chat experience with the sidebar and message view. You can navigate between different tabs (Chats, Calls, Users, and Groups) and interact with the messaging features seamlessly.

Next Steps

Enhance the User Experience