AI Integration Quick Reference
AI Integration Quick Reference
Where It Fits
CometChatCallLogs is a standalone list component that renders call history entries. Each entry shows the caller/callee, call type (audio/video), direction (incoming/outgoing/missed), and timestamp. The onItemClick callback emits the selected call log, and onCallButtonClicked fires when the call-back button is tapped.

Minimal Render
.cometchat-call-logs
Filtering Call Logs
Pass aCallLogRequestBuilder from @cometchat/calls-sdk-javascript to callLogRequestBuilder.
Filter Recipes
Refer to CallLogRequestBuilder for the full builder API.
Actions and Events
Callback Props
onItemClick
Fires when a call log entry is tapped.onCallButtonClicked
Fires when the call-back button in the trailing view is tapped.onError
Fires on internal errors (network failure, auth issue, SDK exception).Global UI Events
The component subscribes toCometChatMessageEvents.ccMessageSent to detect when a call message is sent and refresh the list.
SDK Events (Real-Time, Automatic)
The component listens to SDK call events internally for real-time updates. No manual attachment needed.In React 18 StrictMode,
useEffect runs twice on mount in development. The component handles listener cleanup internally.Custom View Slots
Each slot replaces a section of the default UI. Slots that accept a call log parameter receive the call log object for that row.itemView
Replace the entire call log list item.- TypeScript
- CSS
subtitleView
Replace the subtitle text (call type, duration).- TypeScript
- CSS
trailingView
Replace the right section (call-back button area).- TypeScript
- CSS
callInitiatedDateTimeFormat
Customize the call initiated timestamp format using aCalendarObject.
If no property is passed in the CalendarObject, the component checks the global configuration first. If also missing there, the component’s default formatting applies.
Common Patterns
Custom empty state
Filtered to video calls only
CSS Architecture
The component uses CSS custom properties (design tokens) defined in@cometchat/chat-uikit-react/css-variables.css. The cascade:
- Global tokens are set on the
.cometchatroot wrapper. - Component CSS (
.cometchat-call-logs) consumes these tokens viavar()with fallback values. - Overrides target
.cometchat-call-logsdescendant selectors in a global stylesheet.
Key Selectors
Customization Matrix
Props
All props are optional.activeCall
Highlights the currently active/selected call log entry.callInitiatedDateTimeFormat
Format for displaying the call initiated timestamp.
Falls back to global calendar configuration if not set.