Skip to main content
Version: 5.9.0

Images

The ChatImages class holds the icons and images of the chat interface. By default, most icons are SF Symbols; chatBubble, sentStatusImage, and readStatusImage use raster resources from the SDK bundle. Any value can be replaced with an SF Symbol, a custom image from your own bundle, or a ready UIImage through ChatImage constructors.

Available images

VariableTypePurpose
searchButtonImageSF SymbolSearch icon
searchNotFoundPlaceholderImageSF SymbolImage for "nothing found"
VariableTypePurpose
backButtonImageSF Symbol"Back" button icon. Not applied in 5.x — see Known issues
nextButtonImageSF Symbol"Forward" button icon
keyboardShowImageSF SymbolShow keyboard
keyboardHideImageSF SymbolHide keyboard

Sending messages

VariableTypePurpose
sendButtonImageSF SymbolSend a message
attachButtonImageSF SymbolAttach a file

Placeholders

VariableTypePurpose
emptyChatPlaceholderImageSF SymbolChat is empty
errorPlaceholderImageSF SymbolChat loading error

Reactions

VariableTypePurpose
likeEmptyImageSF SymbolInactive like
likeFullImageSF SymbolActive like
dislikeEmptyImageSF SymbolInactive dislike
dislikeFullImageSF SymbolActive dislike

Rating

VariableTypePurpose
starRatingEmptyImageSF SymbolInactive star
starRatingFullImageSF SymbolActive star

Files and media

VariableTypePurpose
fileImageSF SymbolFile
chatBubbleCustomMessage mask

Scrolling

VariableTypePurpose
scrollToTopImageSF SymbolScroll to top
scrollToBottomImageSF SymbolScroll to bottom

Avatars

VariableTypePurpose
avatarPlaceholderImageSF SymbolAvatar placeholder
VariableTypePurpose
closeButtonImageSF SymbolClose
menuCopyImageSF SymbolCopy
menuQuoteImageSF SymbolQuote

Voice messages

VariableTypePurpose
voiceButtonImageSF SymbolVoice recording
voiceSendButtonImageSF SymbolSend voice message
voicePlayImageSF SymbolPlayback
voicePauseImageSF SymbolPause

Message statuses

VariableTypePurpose
sentStatusImageCustomMessage sent
pendingStatusImageSF SymbolMessage in progress
readStatusImageCustomMessage read
Status icon color

sentStatusImage, pendingStatusImage, readStatusImage are initialized with tintColor: ChatColors().positive on first access. When you replace an image through ChatImages properties, set the desired tintColor explicitly — custom colors from ChatComponents.colors are not applied to these three tokens automatically.

Errors and notifications

VariableTypePurpose
errorInfoImageSF SymbolError info icon
errorAlertImageSF SymbolError warning icon. Not applied in 5.x — see Known issues
errorShieldImageSF SymbolFile type error icon. Not applied in 5.x — see Known issues
scheduleImageSF SymbolSchedule / out-of-hours icon
editImageSF SymbolEdit icon

Figma and SDK mapping

On the Foundation → Icons page in Figma, icons have their own naming system. The mapping between Figma names and ChatImages properties is below:

Figma iconDescription (Figma)SDK property
icon/userUser avataravatarPlaceholderImage
icon/star_emptyEmpty rating starstarRatingEmptyImage
icon/star_halfHalf starno direct token (the SDK supports only empty/full stars)
icon/star_fullFull rating starstarRatingFullImage
icon/fileDocumentfileImage
icon/state-sendSentsentStatusImage
icon/state-receivedReceived / DeliveredChatMessageStyle.deliveredStatusImage (not in ChatImages). By default it reads the current value of sentStatusImage; to use a separate icon, set deliveredStatusImage explicitly
icon/state-errorSend errorerrorInfoImage
icon/state-sendingIn progresspendingStatusImage
icon/state-editEditingeditImage
icon/playAudio playbackvoicePlayImage
icon/photosPhoto galleryNot publicly configurable — the SDK icon is used
icon/cameraCameraNot publicly configurable — the SDK icon is used
icon-spinnerLoading spinnerIcon not configurable (system UIActivityIndicatorView); color — through LoadingIndicatorStyle.indicatorColor
icon/back"Back" buttonbackButtonImage
icon/forward"Forward" buttonnextButtonImage
icon/micMicrophonevoiceButtonImage
icon/citeQuotemenuQuoteImage
icon/cancelClosecloseButtonImage
icon/scroll-downScroll downscrollToBottomImage
icon/arrow-upScroll up (to older messages)scrollToTopImage
icon/arrow-downScroll down (to newer messages)scrollToBottomImage
icon/calendarSchedulescheduleImage
icon/menuAttachment menu triggerattachButtonImage (trigger button); the menu sheet itself is styled through chatMenuStyle (ChatMenuStyle — text and behavior only, not icons)
icon/searchSearchsearchButtonImage
icon/deleteDeleteThrough the context menu
icon/copyCopymenuCopyImage
icon/recordVoice recordingvoiceButtonImage
icon/attachAttach a fileattachButtonImage

The ChatImage class

Constructors

/// SF Symbol
init(system name: String, tintColor: UIColor? = nil)

/// SF Symbol with a specified size
init(system name: String, size: CGFloat = 14, tintColor: UIColor? = nil)

/// Custom image (specify the bundle it is stored in)
init(named: String,
bundle: Bundle = Bundle(for: ChatImage.self),
tintColor: UIColor? = nil,
renderingMode: UIImage.RenderingMode? = nil)

/// Wrap a ready UIImage
init(image: UIImage,
tintColor: UIColor? = nil,
renderingMode: UIImage.RenderingMode? = nil)

Usage example

let images = ChatImages()
images.avatarPlaceholderImage = ChatImage(system: "person.circle.fill", tintColor: .white)
images.sendButtonImage = ChatImage(system: "paperplane.fill")
images.attachButtonImage = ChatImage(system: "plus.circle")

let theme = ChatTheme(images: images)
chatCenterSDK.theme = theme

Builder pattern

To group several overrides into a single expression, use ChatImage.build(configure:) — analogous to ChatColors.build and ChatTypography.build. The method is declared on ChatImage but returns a ChatImages.

static func build(configure: (ChatImages) -> Void) -> ChatImages

FieldTypeRequiredDescription
configure(ChatImages) -> VoidYesA closure where you mutate the required properties of the ChatImages being created

Example:

let images = ChatImage.build { images in
images.sendButtonImage = ChatImage(system: "paperplane.fill", tintColor: .white)
images.attachButtonImage = ChatImage(system: "plus.circle")
images.avatarPlaceholderImage = ChatImage(system: "person.circle.fill")
}

let theme = ChatTheme(images: images)
chatCenterSDK.theme = theme