AI Integration Quick Reference
AI Integration Quick Reference
Where It Fits
CometChatMessageBubble is the layout shell for every message in the message list. The plugin system’s renderBubble() produces the inner content (text, image, video, etc.), and the bubble wraps it with shared chrome.
Live Preview — interact with the message bubble component.Open in Storybook ↗
Message bubbles are self-extracting: each bubble takes the SDK
message and derives its own content (text, attachments, caption, poll data, call info, action text), reading the logged-in user, theme, and locale from hooks. Pass just message to render a bubble standalone — no plugin or pre-extracted props required. CometChatTextBubble also accepts an optional text override so media bubbles can render captions through it.Shared Chrome Elements
Pinned and Saved Indicators
When a message is pinned (visible to everyone in the conversation) or saved (personal to the current user), the bubble shows a small indicator in its status-info area alongside the timestamp — a pin icon for pinned, a bookmark icon for saved. A message can carry both at once. This is automatic: the bubble derives each indicator from the message’s own state (getPinnedAt() / getSavedAt()), and it updates live as messages are pinned, unpinned, saved, and unsaved. No props are required.
Live Preview — a bubble carrying both the pinned and saved indicators.Open in Storybook ↗
To restyle or hide the indicators, target their selectors (see CSS Selectors). To learn how users pin and save messages, see the Pin & Save Messages guide.
GlobalConfig Integration
hideReceipts reads from GlobalConfigContext when the prop is not explicitly set:
Props
message
The SDK message object. Required.alignment
Bubble alignment:'left' (incoming), 'right' (outgoing), 'center' (action).
contentView
The inner content from the plugin’srenderBubble(). Required.
group
Group context. Enables avatar and sender name display.hideAvatar / hideSenderName / hideTimestamp / hideThreadView
Per-bubble display controls. Not in GlobalConfig.hideReceipts
Hide receipt indicators. Reads from GlobalConfig if not set.showError
Show error receipt icon instead of normal receipts.disableInteraction
Disable hover options and keyboard interactions.options
Context menu options for this message (the hover/overflow actions).quickOptionsCount
Number of quick options shown directly; the rest move to the overflow menu.forceShowAvatar
Force-show the avatar for incoming messages even in 1:1 chats (used by agent chat).messageSentAtDateTimeFormat
Override the date format for the sent-at timestamp shown beside the bubble.View override props
Render-prop overrides for each region of the bubble. Semantics for all of them: omit (undefined) to use the built-in default, pass null to suppress the region, or pass a function/node to override it.