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

# Video Bubble

> A self-extracting bubble that renders video attachments with thumbnails, a play overlay, duration badge, and caption.

<Accordion title="AI Integration Quick Reference">
  ```json theme={null}
  {
    "component": "CometChatVideoBubble",
    "package": "@cometchat/chat-uikit-react",
    "import": "import { CometChatVideoBubble } from \"@cometchat/chat-uikit-react\";",
    "description": "Self-extracting video bubble. Extracts video attachments, thumbnails, and caption from a MediaMessage.",
    "cssRootClass": ".cometchat-video-bubble",
    "selfExtracting": true,
    "props": {
      "data": {
        "message": { "type": "CometChat.MediaMessage", "required": true, "note": "Drives extraction of video attachments, thumbnails, and caption." },
        "alignment": { "type": "\"left\" | \"right\"", "note": "Defaults to sender-vs-logged-in-user." },
        "textFormatters": { "type": "CometChatTextFormatter[]" },
        "className": { "type": "string" }
      }
    }
  }
  ```
</Accordion>

## Overview

`CometChatVideoBubble` renders the video attachment(s) of a media message. It is **self-extracting**: pass the SDK `message` and the bubble derives the video URLs, thumbnails, caption, and alignment itself, so it works standalone. A single video shows its thumbnail as a poster with a play overlay; multiple videos lay out in a grid with an overflow tile.

<Info>
  **Live Preview** — interact with the video bubble.

  [Open in Storybook ↗](https://storybook.cometchat.io/react/?path=/story/components-bubbles-message-bubble-video--default)
</Info>

<iframe src="https://storybook.cometchat.io/react/iframe.html?id=components-bubbles-message-bubble-video--default&viewMode=story&shortcuts=false&singleStory=true" className="w-full rounded-xl" loading="lazy" style={{height: "450px", border: "1px solid #e0e0e0"}} title="CometChat Video Bubble — Default" allow="clipboard-write" />

***

## Usage

```tsx theme={null}
import { CometChat } from "@cometchat/chat-sdk-javascript";
import { CometChatVideoBubble } from "@cometchat/chat-uikit-react";

function VideoMessage({ message }: { message: CometChat.MediaMessage }) {
  return <CometChatVideoBubble message={message} />;
}
```

***

## Props

### message

The media message. Drives extraction of video attachments, thumbnails, caption, and sender name. **Required.**

|          |                          |
| -------- | ------------------------ |
| Type     | `CometChat.MediaMessage` |
| Required | Yes                      |

***

### alignment

Override incoming/outgoing alignment. Defaults to sender-vs-logged-in-user.

|         |                     |
| ------- | ------------------- |
| Type    | `"left" \| "right"` |
| Default | derived             |

***

### textFormatters

Text formatters for caption rendering (mentions, URLs).

|         |                            |
| ------- | -------------------------- |
| Type    | `CometChatTextFormatter[]` |
| Default | `undefined`                |

***

### className

Additional CSS class applied to the root element.

|         |             |
| ------- | ----------- |
| Type    | `string`    |
| Default | `undefined` |

***

## CSS Selectors

| Target              | Selector                                                                  |
| ------------------- | ------------------------------------------------------------------------- |
| Root                | `.cometchat-video-bubble`                                                 |
| Incoming / outgoing | `.cometchat-video-bubble--incoming` / `.cometchat-video-bubble--outgoing` |
| Single video        | `.cometchat-video-bubble--single`                                         |
| Container           | `.cometchat-video-bubble__container`                                      |
| Grid                | `.cometchat-video-bubble__grid`                                           |
| Play overlay        | `.cometchat-video-bubble__play-overlay`                                   |
| Duration badge      | `.cometchat-video-bubble__duration-badge`                                 |
| Caption             | `.cometchat-video-bubble__caption`                                        |

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Video Plugin" icon="video" href="/ui-kit/react/plugins/overview#built-in-plugins">
    Plugin behavior, context menu, and conversation preview
  </Card>

  <Card title="Image Bubble" icon="image" href="/ui-kit/react/components/image-bubble">
    Render image attachments
  </Card>

  <Card title="Message Bubble" icon="comment" href="/ui-kit/react/components/message-bubble">
    The wrapper that hosts bubble content
  </Card>

  <Card title="Theming" icon="paintbrush" href="/ui-kit/react/theming">
    Customize colors, fonts, and spacing
  </Card>
</CardGroup>
