CometChatTextBubble is the bubble content component for text messages. It’s rendered by CometChatTextPlugin inside the message list. The plugin handles formatter configuration and message context — the bubble handles rendering.
import { CometChatTextBubble } from '@cometchat/chat-uikit-react/plugins/core/text';import { CometChatMentionsFormatter, CometChatUrlFormatter } from '@cometchat/chat-uikit-react/formatters';function TextMessage({ text, isSentByMe }) { const formatters = [new CometChatMentionsFormatter(), new CometChatUrlFormatter()]; return <CometChatTextBubble text={text} isSentByMe={isSentByMe} textFormatters={formatters} />;}
When the entire message is a single emoji (no other text), the bubble renders it at a larger font size. Detection uses Intl.Segmenter for accurate handling of complex emoji sequences (ZWJ, skin tones, flags).
When the message metadata contains link preview data (at metadata["@injected"]["extensions"]["link-preview"]["links"]), the bubble renders preview cards with image, title, description, and domain.