Skip to main content
Customize message bubble appearance by passing bubble styles in theme.messageListStyles.
Prerequisites:
  1. Wrap your app with CometChatThemeProvider
  2. Bubble styles are passed via theme={{ light: { messageListStyles: { ... } } }}
  3. Specific bubble type styles (e.g., textBubbleStyles) override general containerStyle

Bubble Style Keys


Overview

Message bubbles are the core visual element in chat applications, encapsulating different types of messages like text, images, or attachments. Customizing message bubbles allows developers to create a consistent and engaging user experience that aligns with their app’s theme and design language. This guide provides an overview of how to style outgoing and incoming message bubbles and customize the appearance for specific message types.

Types for Incoming and Outgoing Bubble Style

Incoming bubbles represent messages received from other users.
  • DeepPartial is an internal utility that ensures all style properties are optional, allowing only the required fields to be overridden.
  • When customizing theme properties, whether by overriding specific properties or supplying a completely custom theme, the provided values will be deeply merged with the default theme. This means that only the specified properties will be overridden, while all other properties will retain their default values. Additionally, if a style is passed through props, it will take priority over the style provided via the theme.
In the code snippet below, incoming text message bubbles will have a background color of #f90ac6, while all other incoming message bubbles will have #f90a4e. The paddingHorizontal value set in incomingMessageBubbleStyles.containerStyle will also apply to all incoming message bubbles, unless explicitly overridden for a specific bubble type. For instance, you can set incomingMessageBubbleStyles.textBubbleStyles.containerStyle.paddingHorizontal to 0 if you want to remove horizontal padding for text bubbles.

Message Bubbles

Message bubbles are core elements of the messaging interface. Their collective appearance can be customized to create a consistent design, including color, shape, and overall style for both outgoing and incoming messages. The message bubbles’ styles can be customized by extending the predefined styles in your theme. Customizing Incoming Message Bubble
Customizing Outgoing Message Bubble
To learn more about such attributes, refer to the theme interface.

Text Bubble

Text bubbles display plain text messages. These are the most common bubble type in a chat interface. Default
Customization
Customizing Incoming and Outgoing Bubbles
To learn more about such attributes, refer to the theme interface. The Link Preview Bubble is designed to display a preview of links shared in messages. It enriches the messaging experience by showing details such as the page title, description, and an image from the linked content, making links more engaging and informative. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Image Bubble

CometChatImagesBubble renders a message’s image attachments as a grid inside a single bubble. When there are more images than visible cells, the last cell shows a +N overflow overlay; tapping any cell opens the full-screen viewer, and an optional caption renders below the grid.
Styling Style the bubble globally through the mediaGridBubbleStyles theme key:
To learn more about such attributes, refer to the theme interface.

Video Bubble

CometChatVideosBubble renders a message’s video attachments as a thumbnail grid — each cell showing a poster with a centered play overlay and a duration chip, plus a +N overflow overlay when there are more videos than visible cells. Tapping a cell opens full-screen playback.
Styling CometChatVideosBubble shares the mediaGridBubbleStyles theme key with the image grid:
To learn more about such attributes, refer to the theme interface.

Audio Bubble

CometChatAudiosBubble renders a message’s audio file attachments as stacked playback cards — each with play/pause, a draggable seek bar, elapsed/total time, and download. Past 3 attachments the rest collapse behind a “Show N more” toggle. Recorded voice notes render separately as a voice-note bubble with a waveform player.
Styling Style the bubble globally through the audiosBubbleStyles theme key:
To learn more about such attributes, refer to the theme interface.

File Bubble

CometChatFilesBubble renders a message’s document attachments as a vertical list of downloadable cards — each with a per-type icon, file name, and size. Past 3 files the rest collapse behind a “Show N more” toggle, and an optional caption renders below.
Styling Style the bubble globally through the filesBubbleStyles theme key:
To learn more about such attributes, refer to the theme interface.

Sticker Bubble

Sticker bubbles display stickers shared in a conversation, enhancing visual expression. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Poll Bubble

Poll bubbles represent polls shared within the chat, showing options and results. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Collaborative Bubble

Collaborative bubbles display collaborative content, such as shared documents or tasks. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Meet Call Bubble

Meet call bubbles display call-related actions and statuses in the chat interface. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Delete Bubble

Delete bubbles are used to display messages that have been deleted by the sender. These indicate the message removal within the chat interface. Default
Customization
Customizing Incoming and Outgoing Bubble
To learn more about such attributes, refer to the theme interface.

Call Action Bubble

Call action bubbles display call-related actions, such as missed calls, in the chat interface. Default
Customization
Customizing Bubble
To learn more about such attributes, refer to the theme interface.

Action Bubble

Action bubbles provide a customizable interface for displaying a variety of actions, such as group actions, within a chat. Default
Customization
Customizing Bubble
To learn more about such attributes, refer to the theme interface.

AI Assistant Bubble

AI Assistant bubbles display messages and interactions from an AI assistant within the chat interface. Default
Customization
Customizing Bubble
To learn more about such attributes, refer to the theme interface.

Next Steps

Introduction to Theming

Learn how CometChatThemeProvider manages light and dark modes

Colors

Customize primary, neutral, alert, and other color tokens

Component Styling

Style individual UI Kit components like Conversations and Users

Message List

Explore the Message List component and its customization options