Skip to main content
Configure and style incoming, outgoing, and specific message bubbles.

Styling Architecture

Message bubbles follow a hub-and-spoke pattern:
  1. Hub stylesIncomingMessageBubbleStyle and OutgoingMessageBubbleStyle control the base bubble appearance
  2. Per-type styles — Text, Image, Audio, etc. are nested inside the hub styles

Global Setup

themes.xml

Core Message Bubbles

Text Bubble

themes.xml

Image Bubble

themes.xml

Audio Bubble

themes.xml

Video Bubble

themes.xml

File Bubble

themes.xml

Media Grid Bubble

Renders a message that carries multiple image or video attachments as a count-based grid (1, 2, 3, 4, or 5+ tiles). When there are more items than visible tiles, the last tile shows a “+N” overflow overlay; video tiles carry a centered play badge and a duration chip. Tapping a tile opens the fullscreen media viewer. A caption renders underneath the grid. The image grid and video grid derive their look from your CometChat theme. In Jetpack Compose they are governed by the dedicated CometChatImagesBubbleStyle and CometChatVideosBubbleStyle classes. Their grid-specific properties:

Audio Files Bubble

Renders a message carrying audio file attachments (audio chosen through the file/audio picker) — one player row per file, each with a play/pause button, a seekable progress bar, the time, the file name, and a download control. Four or more files collapse behind a “Show N more” toggle. Only one row plays at a time.
This bubble is distinct from the Audio Bubble, which renders voice notes recorded with the composer’s microphone. Voice notes keep their waveform look and are never grouped with other attachments.
In Jetpack Compose it is governed by CometChatAudiosBubbleStyle; the Kotlin (XML Views) list reuses your existing Audio Bubble style. Key Compose properties:

Files Bubble

Renders a message carrying document attachments as a connected stack of file cards — each with a file-type icon (PDF, Word, Excel, PowerPoint, ZIP, …), the file name, and its size/extension metadata. Four or more files collapse behind a “+N more” toggle. Tapping a card opens the file. A caption renders under the stack.
cardBackgroundColor only applies when the message carries multiple files — a single file card sits directly on the bubble background.
In Jetpack Compose it is governed by CometChatFilesBubbleStyle; the Kotlin (XML Views) list reuses your existing File Bubble style. Key Compose properties:
Captions containing rich text (code blocks, quote blocks, inline code) render through the same pipeline as Text Bubbles, so their formatting looks identical across message types.

Sticker Bubble

themes.xml

Poll Bubble

themes.xml

Collaborative Bubble

themes.xml

Meet Call Bubble

themes.xml

Delete Bubble

themes.xml

List-Level Bubbles

These bubbles are tied to the Message List style, not the Incoming/Outgoing hubs.

Call Action Bubble

themes.xml

Action Bubble

themes.xml