Skip to main content

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" and aria-label

Usage

Basic (text only)

With Icon (call status)

With Custom Icon

Provide your own CSS class that defines a mask-image:

Props


messageText

The action text to display. The component renders nothing if this is empty or whitespace-only.

iconClassName

Optional CSS class name for the icon displayed before the text. The icon element uses CSS mask-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. Built-in icon classes:

iconErrorColor

When true, applies error color (red) to both the icon and the text. Used for missed call scenarios.

className

Additional CSS class name applied to the root element.

CSS Selectors

CSS Styling

Override design tokens on the component selector:
Override a specific icon:

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:
  1. Group Action Plugin — passes only messageText (no icon). Handles group membership changes (join, leave, kick, ban, scope change).
  2. Call Action Plugin — passes messageText, iconClassName, and iconErrorColor. Handles call status messages (missed, outgoing, incoming, ended).
You can also use it directly in custom plugins for any centered system message:

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