AI Integration Quick Reference
AI Integration Quick Reference
Overview
CometChatActionBubble renders a centered, pill-shaped system message. It is used internally by the Group Action Plugin for group membership messages and the Call Action Plugin for call status messages.
The component renders nothing if messageText is empty or whitespace-only.
Key characteristics:
- Centered pill layout — no left/right alignment, no avatar, no timestamp
- Optional icon — rendered via CSS
mask-image, controlled by a CSS class name (not a URL) - Error color state — for missed calls or error scenarios, colors both icon and text red
- Accessible — uses
role="status"andaria-label
Usage
Basic (text only)
With Icon (call status)
With Custom Icon
Provide your own CSS class that defines amask-image:
Props
messageText
The action text to display. The component renders nothing if this is empty or whitespace-only.| Type | string |
| Required | Yes |
iconClassName
Optional CSS class name for the icon displayed before the text. The icon element uses CSSmask-image for rendering, which allows color control via background. Pass one of the built-in classes or a custom class that defines a mask-image.
| Type | string |
| Default | undefined (no icon shown) |
| Class | Icon |
|---|---|
cometchat-action-bubble__icon--missed-video | Missed video call |
cometchat-action-bubble__icon--missed-audio | Missed audio call |
cometchat-action-bubble__icon--outgoing-video | Outgoing video call |
cometchat-action-bubble__icon--outgoing-audio | Outgoing audio call |
cometchat-action-bubble__icon--incoming-video | Incoming video call |
cometchat-action-bubble__icon--incoming-audio | Incoming audio call |
cometchat-action-bubble__icon--call-ended | Call ended |
iconErrorColor
Whentrue, applies error color (red) to both the icon and the text. Used for missed call scenarios.
| Type | boolean |
| Default | false |
className
Additional CSS class name applied to the root element.| Type | string |
| Default | undefined |
CSS Selectors
| Target | Selector |
|---|---|
| Root container | .cometchat-action-bubble |
| Icon element | .cometchat-action-bubble__icon |
| Icon (error state) | .cometchat-action-bubble__icon--error |
| Text element | .cometchat-action-bubble__text |
| Text (error state) | .cometchat-action-bubble__text--error |
CSS Styling
Override design tokens on the component selector:How It Works
CometChatActionBubble is a presentational component — it receives its data as props and renders accordingly. It does not subscribe to events, manage state, or call the SDK.
It is consumed by two plugins:
-
Group Action Plugin — passes only
messageText(no icon). Handles group membership changes (join, leave, kick, ban, scope change). -
Call Action Plugin — passes
messageText,iconClassName, andiconErrorColor. Handles call status messages (missed, outgoing, incoming, ended).
Next Steps
Group Action Plugin
System messages for group membership changes
Call Action Plugin
System messages for call status
Custom Plugin
Build your own message plugin
Theming
Customize colors, fonts, and spacing