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

Images Bubble

Renders a message that carries multiple image attachments (CometChatImagesBubble) as a count-based grid (1, 2, 3, 4, or 5+ tiles). When there are more images than visible tiles, the last tile shows a “+N” overflow overlay. Tapping a tile opens the fullscreen gallery viewer. A caption renders underneath the grid. This is the multi-attachment bubble the list renders for image messages; the single-attachment Image Bubble remains for standalone use. Default
Images Bubble rendering a grid of image attachments with a +N overflow overlay on the last tile
The image grid derives its look from your CometChat theme. In Jetpack Compose it is governed by the dedicated CometChatImagesBubbleStyle class. Its grid-specific properties:

Video Bubble

themes.xml

Videos Bubble

Renders a message that carries multiple video attachments (CometChatVideosBubble) as a count-based grid (1, 2, 3, 4, or 5+ tiles). Each tile shows a poster thumbnail with a centered play badge and a duration chip; the last tile shows a “+N” overflow overlay when there are more videos than visible tiles. Tapping a tile opens the fullscreen player. A caption renders underneath the grid. This is the multi-attachment bubble the list renders for video messages; the single-attachment Video Bubble remains for standalone use. Default
Videos Bubble rendering a grid of video thumbnails, each with a centered play badge, and a +N overflow overlay on the last tile
The video grid derives its look from your CometChat theme. In Jetpack Compose it is governed by the dedicated CometChatVideosBubbleStyle class. Its grid-specific properties:

Audio Bubble

themes.xml

Audios Bubble

Renders a message carrying audio file attachments (CometChatAudiosBubble) — 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. Default
Audios Bubble rendering stacked audio player rows, each with a play button, seek bar, time, file name, and download control, plus a Show N more toggle
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:

File Bubble

themes.xml

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. Default
Files Bubble rendering a stack of file cards, each with a file-type icon, file name, and size metadata, plus a Show N more toggle
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