Skip to main content

Where It Fits

CometChatIncomingCall is an overlay component that auto-detects incoming calls and renders a notification with accept/decline buttons. Place it at the app root level so it appears above all other content.

Minimal Render

Root CSS class: .cometchat-incoming-call

Actions and Events

Callback Props

onAccept

Fires when the accept button is clicked.

onDecline

Fires when the decline button is clicked.

onError

Fires on internal errors.

Global UI Events

CometChatCallEvents emits events subscribable from anywhere in the application.

SDK Events (Real-Time, Automatic)

The component listens to SDK call events internally for real-time incoming call detection. No manual attachment needed.

Custom View Slots

View slots for CometChatIncomingCall are functions that receive the CometChat.Call object.

leadingView

titleView

itemView


Common Patterns

Disable ringtone

Custom ringtone


CSS Architecture

Key Selectors

Example: Brand-themed incoming call


Props

All props are optional.

call

Sets a specific call object for the incoming call display.

callSettingsBuilder

Custom call settings builder for the call session.

customSoundForCalls

Custom sound file URL for incoming calls.

disableSoundForCalls

Disables the incoming call ringtone.

itemView

Custom renderer for the entire list item.

leadingView

Custom renderer for the avatar / left section.

onAccept

Callback fired when the accept button is clicked.

onDecline

Callback fired when the decline button is clicked.

onError

Callback fired when the component encounters an error.

subtitleView

Custom renderer for the subtitle text.

titleView

Custom renderer for the name / title text.

trailingView

Custom renderer for the right section.

Events


CSS Selectors