> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feature-card-builder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Message Bubble

> Message Bubble — CometChat documentation.

## Overview

`CometChatMessageBubble` is the reusable components which forms different types of message bubbles accordingly.

There are different section available in message bubble which can be altered by passing `CometChatMessageTemplate` in `CometChatMessages`

## Sections

Following are the sections in message bubble

1. Header View
2. Leading View
3. Content View
4. Bottom View
5. Thread View
6. footer view

#### Methods

| Methods                 | Type                                  | Description                                                                       |
| ----------------------- | ------------------------------------- | --------------------------------------------------------------------------------- |
| **setLeadingView**      | View                                  | used to set view in leadingView section                                           |
| **setHeaderView**       | View                                  | used to set view in headerview section                                            |
| **setReplyView**        | View                                  | used to set view in replyview section                                             |
| **setContentView**      | View                                  | used to set content view , by default all different type of bubble are shown here |
| **setThreadView**       | View                                  | used to set view in threadview section , by default threaded section is shown     |
| **setFooterView**       | View                                  | used to set footer view for message bubble , by default message receipt is shown  |
| **setMessageAlignment** | UIKitConstants.MessageBubbleAlignment | used to set bubble alignment , can be **left**, **right** and **center**          |
| **setStyle**            | MessageBubbleStyle                    | used to set styling properties foe message bubble                                 |
| **setBottomView**       | View                                  | used to set bottom view for message bubble , by default reactions are shown here  |

### style

| Methods             | Type           | Description                      |
| ------------------- | -------------- | -------------------------------- |
| **setBackground**   | @ColorInt int  | used to set the background color |
| **setBackground**   | Drawable       | used to set background drawable  |
| **setBorderWidth**  | @Dimension int | used to set border               |
| **setCornerRadius** | float          | used to set border radius        |
| **setBorderColor**  | @ColorInt int  | used to set border color         |
