Skip to main content

Overview

CometChatCollaborativeDocumentBubble renders a collaborative document card — a banner image, a title, a subtitle, and an “Open Document” button. It is self-extracting: pass the SDK message and the bubble reads the document URL from the message’s extension metadata (@injected.extensions.document.document_url), so it works standalone. Clicking the button opens the document (by default in a new window).
Requires the Collaborative Document extension enabled in the CometChat Dashboard. Document messages (extension_document) — and the injected document_url this bubble reads — are only produced once the extension is turned on for your app. Without it the composer cannot create documents and this bubble never renders. See the Collaborative Document guide to enable it, and the Plugins overview for how the UI Kit auto-routes document messages to this bubble.
Live Preview — interact with the collaborative document bubble.Open in Storybook ↗

Usage


Props

message

The collaborative-document message. The bubble extracts the URL from its metadata. Required.

alignment

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

onButtonClick

Click handler for the action button. Receives the document URL. Defaults to window.open.

disabled

Disable the action button (e.g. for a thread header preview).

className

Additional CSS class applied to the root element.

CSS Selectors


Next Steps

Collaborative Document Plugin

Plugin behavior, context menu, and conversation preview

Enable Collaborative Document (Dashboard)

Turn on the extension that produces these messages

Collaborative Whiteboard Bubble

Render collaborative whiteboard messages

Message Bubble

The wrapper that hosts bubble content

Theming

Customize colors, fonts, and spacing