Skip to main content
The CometChatCallBubble component is a standalone Angular component that renders call messages within chat conversations. It displays call information including call type (audio/video), call status, duration, and an optional action button for call-back functionality.

Overview

The Call Bubble component provides a comprehensive display for call messages with support for both sender (outgoing) and receiver (incoming) styling variants:
  • Call Type Icon Display: Shows audio or video call icons with incoming/outgoing variants
  • Call Title: Displays “Voice Call” or “Video Call” based on call type
  • Call Subtitle: Shows call duration (for ended calls) or status (missed, cancelled, etc.)
  • Optional Action Button: Configurable button for actions like “Call Back” or “Join”
  • Sender/Receiver Variants: Different styling for outgoing vs incoming call messages
  • Full Accessibility Support: ARIA labels, keyboard navigation, and screen reader support
  • CSS Variable-Based Theming: Easy customization via CSS variables
  • OnPush Change Detection: Optimized performance
Live Preview — Default call bubble preview. Open in Storybook ↗

Basic Usage

Simple Call Bubble (Receiver Variant)

Sender Variant (Outgoing Call)

With Action Button

Incoming vs Outgoing Calls

Properties

Events

CallButtonClickEvent Interface

Call Statuses

The component supports the following call statuses:

Customization

Styling with CSS Variables

The Call Bubble component uses CSS variables exclusively for easy customization:

Available CSS Variables

Custom Color Schemes

Custom Icon Override

Custom Title and Subtitle

Accessibility

The Call Bubble component is fully accessible and follows WCAG 2.1 Level AA guidelines.

WCAG 2.1 Compliance

The component meets the following WCAG 2.1 success criteria:
  • 1.1.1 Non-text Content (Level A): The container has an aria-label describing the call type and status
  • 1.3.1 Info and Relationships (Level A): Proper semantic structure with role=“article”
  • 1.4.3 Contrast (Minimum) (Level AA): Sufficient color contrast for text readability
  • 2.1.1 Keyboard (Level A): Action button is fully keyboard accessible
  • 2.4.7 Focus Visible (Level AA): Visible focus indicators on interactive elements
  • 4.1.2 Name, Role, Value (Level A): All elements have accessible names and roles

ARIA Attributes

The component automatically applies appropriate ARIA attributes:

Keyboard Navigation

Screen Reader Behavior

Screen readers announce the call bubble with the call type and status (e.g., “Voice Call - Missed Call”). The action button is announced with its text label. The role="article" attribute ensures screen readers treat this as a self-contained piece of content.

Color Contrast

Both sender and receiver variants maintain sufficient color contrast:
  • Sender variant: White text on primary color background (typically purple #6852D6)
  • Receiver variant: Neutral-900 title and neutral-600 subtitle on neutral-300 background

Best Practices

Use the call bubble to display call messages in your chat interface, providing users with clear information about call type, status, and duration.
The component requires a valid CometChat.Call message object. Ensure you pass a properly initialized call message to avoid fallback state rendering.
The default title and subtitle are automatically derived from the call message. Only provide custom values via the title and subtitle inputs if you need to override the default behavior.
Use the buttonText input to add call-back functionality. The buttonClick event provides the session ID and message object for initiating a return call.
All text in the component is localized. The component uses existing localization keys from the UIKit for call-related text.
  • CometChatAudioBubble: Displays audio messages
  • CometChatVideoBubble: Displays video messages
  • CometChatDeleteBubble: Displays deleted message placeholders
  • CometChatActionBubble: Displays action/system messages
  • CometChatMessageList: Displays lists of messages including call messages

Technical Details

  • Standalone Component: Can be imported and used independently
  • Change Detection: Uses OnPush change detection strategy for optimal performance
  • Dependencies: Uses CometChatLocalize for text localization, TranslatePipe for template localization
  • Bundle Size: Minimal footprint (~3KB)
  • BEM CSS: Follows Block Element Modifier naming convention
  • Accessibility: WCAG 2.1 Level AA compliant
  • Width: Fixed 240px width for consistent bubble sizing
  • Icon Size: 40px container with 20px icon