AI Integration Quick Reference
AI Integration Quick Reference
Styling Architecture
Bubbles follow a hub-and-spoke pattern:- Hub styles — one per side, incoming and outgoing, set the container: background, corner radius, border, the sender’s name, the time and the text.
- Per-kind styles — text, image, file, audio, poll and the rest — refine one kind’s content inside the hub.

- SwiftUI
- UIKit
CometChatMessageListStyle has three hubs — incomingBubbleStyle, outgoingBubbleStyle
and actionBubbleStyle (the centred group-action and call lines) — each a
MessageBubbleStyle carrying a style per kind. Everything is optional: unset falls
through to the theme.Global Setup
- SwiftUI
- UIKit
Hub properties
- SwiftUI
- UIKit
Core Message Bubbles
The SwiftUI examples set a per-kind style on the outgoing hub; set it onincomingBubbleStyle
for the other side.
Text Bubble
- SwiftUI
- UIKit
TextBubbleStyle also has textFont, codeTextColor, quoteBarColor, and
separatorColor, the line between a translated message and its translation. Its
linkPreviewStrokeColor and linkPreviewStrokeWidth change nothing: this toolkit draws no
link preview.Image and Video Bubbles
One bubble draws one or many attachments as a grid with “+N”.- SwiftUI
- UIKit
placeholderColor, overflowScrimColor, overflowTextColor and
overflowTextFont; video adds playBadgeBackground and the duration pill’s colours and
font.File Bubble
- SwiftUI
- UIKit
cardCornerLarge / cardCornerSmall shape the cards; expandColor / expandFont style
“Show more”; downloadAll… the download-all button.Audio Bubbles
audioBubbleStyle styles the voice note and a single audio file; audiosBubbleStyle the
multi-file audio card.
- SwiftUI
- UIKit
Sticker Bubble
A sticker draws without a bubble, so it has no style of its own in either toolkit. Replace it with your own bubble factory (SwiftUI) or acustom / extension_sticker template (UIKit).
Poll Bubble
- SwiftUI
- UIKit
avatarStyle; the radio buttons the …RadioButton… properties.Collaborative Bubble
Documents and whiteboards.- SwiftUI
- UIKit
Meet Call Bubble
- SwiftUI
- UIKit
Delete Bubble
- SwiftUI
- UIKit
List-Level Bubbles
Centred lines that belong to neither side.Call Action Bubble
- SwiftUI
- UIKit
Action Bubble
Group actions — “Alice added Kabir”.- SwiftUI
- UIKit
Separators and indicators
- SwiftUI
- UIKit
dateSeparatorStyle, unreadSeparatorStyle, newMessageIndicatorStyle,
threadIndicatorStyle, reactionStyle and the reply quote’s
incomingMessagePreviewStyle / outgoingMessagePreviewStyle sit on
CometChatMessageListStyle.Per-kind bubbles with templates
- SwiftUI
- UIKit
A bubble factory draws one kind. Register yours with
bubbleFactories; it replaces the
built-in for that kind. See Message List.Next Steps
Component Styling
Style the other components.
Theme Introduction
Change the colours every bubble reads.