
The CometChat React UI Kit provides pre-built, customizable UI components that developers can use to quickly integrate real-time messaging and calling into any React application.

Check out the Sample App to see the UI Kit in action with a fully functional chat experience including conversations, messaging, calling, and AI features.
npm install @cometchat/chat-uikit-react
The project has three test suites: unit tests (Vitest), E2E tests (Playwright), and Storybook.
Unit tests live alongside the source files as *.spec.ts / *.spec.tsx and cover individual components, hooks, and utilities.
Run all unit tests (single pass):
npm test
Run with coverage:
npm run test:coverage
No browser or running server is required.
Storybook provides an interactive development environment for building and testing components in isolation.
Start Storybook (dev mode):
npm run storybook
Opens at http://localhost:6006.
Build static Storybook:
npm run build-storybook
End-to-end tests live in sample-app/e2e/ and run against the live sample app. They cover full user journeys: login, messaging, reactions, threads, groups, calls, search, and more.
Create a new CometChat app (or use an existing one dedicated to E2E testing).
In the CometChat Dashboard, enable:
In the Dashboard → BYO Agents:
ai-agent-e2eAI Agent E2E@agenticcd sample-app
cp .env.e2e.example .env.e2e
Fill in .env.e2e:
COMETCHAT_APP_ID=your-app-id
COMETCHAT_REGION=us
COMETCHAT_AUTH_KEY=your-auth-key
COMETCHAT_API_KEY=your-rest-api-key
E2E_USER_UID=e2e-user-1
AI_AGENT_UID=ai-agent-e2e
npx playwright install
Seed test data (one-time, idempotent):
cd sample-app
npm run e2e:seed
Start dev server (keep running in separate terminal):
npm run dev
Run all E2E tests (headless):
npm run e2e
Run with Playwright UI (interactive):
npm run e2e:ui
Run headed (visible browser):
npm run e2e:headed
Run in debug mode:
npm run e2e:debug
Run a specific test file:
npx playwright test e2e/conversations/conversations.spec.ts
To delete all E2E-created data and reset the app:
npm run e2e:cleanup
| Chat | Purpose | Modified by Tests? |
|---|---|---|
| Bob Smith (e2e-user-2) | Static 1:1 — read-only tests | ❌ Never |
| Design Team (e2e-group-1) | Static group — pagination, group details | ❌ Never |
| Strategy (e2e-group-35) | Mutable group — send/edit/delete/thread/reactions | ✅ Yes |
| CI/CD (e2e-group-33) | Incoming messages for message-privately tests | ❌ Never |
| AI Agent E2E | AI assistant chat tests | ✅ Yes |
cd sample-app
cp .env.e2e.example .env.e2e # Fill in credentials
npx playwright install # Install browsers (once)
npm run e2e:seed # Seed test data (once)
npm run dev # Start dev server
npm run e2e # Run tests
For issues running the project or integrating with our UI Kits, consult our documentation or create a support ticket or seek real-time support via the CometChat Dashboard.
$ claude mcp add cometchat-uikit-react \
-- python -m otcore.mcp_server <graph>