Skip to main content

Component Categories

The CometChat React UI Kit provides pre-built components organized by functionality. Each component page includes props, events, CSS classes, and minimal examples.
For step-by-step implementation guides, see the Guides section. Component reference pages focus on API documentation.

Chat Components

Core components for building chat interfaces.

User & Group Components

Components for managing users and groups.

Calling Components

Components for voice and video calling.

Composite Components

Pre-built layouts combining multiple components.

Utility Components

Supporting components and data structures.

Component Architecture

Props Categories

Each component organizes props into categories:
CategoryPurpose
RequiredProps that must be provided
DataProps that control what data is displayed
CallbacksEvent handlers for user interactions
VisibilityProps that show/hide UI elements
View SlotsCustom renderers for component sections

CSS Architecture

Components use CSS custom properties (design tokens) for theming:
/* Global tokens set on .cometchat wrapper */
.cometchat {
  --cometchat-primary-color: #6852d6;
  --cometchat-background-color-01: #ffffff;
}

/* Component-specific overrides */
.cometchat-conversations {
  /* Uses var(--cometchat-primary-color) internally */
}

Events

Components emit events via RxJS subjects for decoupled communication:
import { CometChatMessageEvents } from "@cometchat/chat-uikit-react";

// Subscribe to message events
CometChatMessageEvents.ccMessageSent.subscribe((data) => {
  console.log("Message sent:", data.message);
});