Skip to main content

Where It Fits

CometChatIncomingCall is a Component that serves as a visual representation when the user receives an incoming call, such as a voice call or video call, providing options to answer or decline the call.

Minimal Render


Actions and Events

Callback Props

onAccept

Fires when the accept button is pressed.

onDecline

Fires when the decline button is pressed.

onError

Fires on internal errors (network failure, auth issue, SDK exception).

Global UI Events

CometChatUIEventHandler emits events subscribable from anywhere in the application. Add listeners and remove them on cleanup.
EventFires whenPayload
ccCallRejectedInitiated call is rejected by the receiver{ call }
ccCallAcceptedInitiated call is accepted by the receiver{ call }
ccCallEndedInitiated call successfully ends{ call }
ccCallFailledError occurs during the initiated call{ call }
When to use: sync external UI with call state changes. For example, update a call status indicator, show notifications, or log call events.

Custom View Slots

Each slot replaces a section of the default UI. Slots that accept a call parameter receive the call object for customization.
SlotSignatureReplaces
ItemView(call) => JSX.ElementEntire incoming call card
LeadingView(call) => JSX.ElementAvatar / left section
TitleView(call) => JSX.ElementCaller name / title text
SubtitleView(call) => JSX.ElementCall type / status text
TrailingView(call) => JSX.ElementAccept/decline buttons

ItemView

Custom view for the entire incoming call card.

LeadingView

Custom view for the avatar / left section.

SubtitleView

Custom view for the call type / status text.

Styling

Using Style you can customize the look and feel of the component in your app. Pass a styling object as a prop to the CometChatIncomingCall component.

Visibility Props

PropertyDescriptionCode
disableSoundForCallsDisable/enable the sound of incoming callsdisableSoundForCalls?: boolean
customSoundForCallsSet custom sound for incoming callscustomSoundForCalls?: string

Next Steps

Outgoing Call

Display and manage outgoing calls

Call Buttons

Add voice and video call buttons to your UI

Call Features

Overview of all calling features

Component Styling

Customize the appearance of UI Kit components