Documentation Index Fetch the complete documentation index at: https://cometchat-22654f5b-react-uikit-v7.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
{
"component" : "CometChatCollaborativeBubble" ,
"package" : "@cometchat/chat-uikit-react" ,
"import" : "import { CometChatCollaborativeBubble } from \" @cometchat/chat-uikit-react \" ;" ,
"description" : "Shared bubble for collaborative document and whiteboard messages." ,
"cssRootClass" : ".cometchat-collaborative-bubble" ,
"props" : {
"data" : {
"url" : { "type" : "string" , "default" : "required" },
"title" : { "type" : "string" , "default" : "required" },
"subtitle" : { "type" : "string" , "default" : "required" },
"buttonText" : { "type" : "string" , "default" : "required" },
"bannerImageUrl" : { "type" : "string" , "default" : "undefined" }
},
"behavior" : {
"variant" : { "type" : "'incoming' | 'outgoing'" , "default" : "required" },
"iconType" : { "type" : "'document' | 'whiteboard'" , "default" : "'document'" },
"disabled" : { "type" : "boolean" , "default" : "false" }
},
"callbacks" : {
"onButtonClick" : { "type" : "(url: string) => void" , "default" : "window.open" }
}
}
}
Where It Fits
CometChatCollaborativeBubble is a shared component used by both CometChatCollaborativeDocumentPlugin and CometChatCollaborativeWhiteboardPlugin. It renders inside the message list when a collaborative document (extension_document) or whiteboard (extension_whiteboard) message is displayed.
import { CometChatCollaborativeBubble } from "@cometchat/chat-uikit-react" ;
import "@cometchat/chat-uikit-react/css-variables.css" ;
import bannerLight from "./assets/Collaborative_Document_Light.png" ;
function DocumentMessage ({ url }) {
return (
< CometChatCollaborativeBubble
url = { url }
variant = "outgoing"
title = "Collaborative Document"
subtitle = "Open document to edit content together"
buttonText = "Open Document"
iconType = "document"
bannerImageUrl = { bannerLight }
onButtonClick = { ( docUrl ) => window . open ( docUrl , "" , "fullscreen=yes" ) }
/>
);
}
Minimal Render
import { CometChatCollaborativeBubble } from "@cometchat/chat-uikit-react" ;
import "@cometchat/chat-uikit-react/css-variables.css" ;
function Demo () {
return (
< CometChatCollaborativeBubble
url = "https://example.com/document"
variant = "incoming"
title = "Collaborative Document"
subtitle = "Edit together"
buttonText = "Open Document"
/>
);
}
Root CSS class: .cometchat-collaborative-bubble
Features
Banner image with border-radius: 8px and error handling (hides on load failure)
Body with 32px icon (CSS mask for document/whiteboard SVG) + title + subtitle
Action button with border-top separator line
Theme-aware: light/dark banner images, sender/receiver color variants
Button disabled when URL is empty or disabled prop is true
Native <button> element for keyboard accessibility
Opens URL via window.open(url, '', 'fullscreen=yes, scrollbars=auto')
Props
url
The collaborative session URL. Required.
variant
Bubble variant based on sender/receiver.
Type 'incoming' | 'outgoing'Default —
iconType
Determines which icon SVG mask is used in the body.
Type 'document' | 'whiteboard'Default 'document'
bannerImageUrl
Theme-aware banner image URL displayed at the top of the bubble.
Type stringDefault undefined
disabled
Disables the action button. Used in thread header context.
Callback when the action button is clicked. Receives the URL.
Type (url: string) => voidDefault window.open(url, '', 'fullscreen=yes, scrollbars=auto')
CSS Selectors
Target Selector Root .cometchat-collaborative-bubbleIncoming .cometchat-collaborative-bubble--incomingOutgoing .cometchat-collaborative-bubble--outgoingDocument icon .cometchat-collaborative-bubble--document .cometchat-collaborative-bubble__body-iconWhiteboard icon .cometchat-collaborative-bubble--whiteboard .cometchat-collaborative-bubble__body-iconBanner image .cometchat-collaborative-bubble__banner-imageBody .cometchat-collaborative-bubble__bodyTitle .cometchat-collaborative-bubble__body-content-nameSubtitle .cometchat-collaborative-bubble__body-content-descriptionAction button .cometchat-collaborative-bubble__button