Attributes

The goal of the following document is to enumerate the different fields controlling design attributes in the SDK. If a clearer view of which attribute corresponds with a design element is needed, please utilize the Attributes Design Sheet.

User Bubble

NameTypeDescriptionExampleDefault
remoteUserBubbleBackgroundColorUIColorColor code for the background of the remote user bubble.#004DC9
remoteUserBubbleBorderColorUIColorColor code for the outline color of the remote user bubble.#004DC9
remoteUserBubbleLinkColorUIColorColor code for links in the text of the remote user bubble.UIColor.white
remoteUserBubbleTextColorUIColorColor code for the text of the remote user bubble.UIColor.white
remoteUserBubbleBorderWidthDoubleDouble number for the outline width of the remote user bubble.2
remoteUserBubbleTimestampColorUIColorColor code for the timestamp of the remote user bubble.#5B5C5E
remoteUserTypingTintColorUIColorColor of the remote user typing bubbles animation.UIColor.white
remoteUserBubbleLongPressOverlayColorUIColorColor of the remote user bubble overlay when user uses a long press gesture on the bubble. Overlay will appear as long as the menu controller appears on the bubble. When the menu dismissed, overlay will disappear too. In order to show overlay, enableBubblesOverlayOnLongPress should be true.UIColor.black
remoteUserBubbleLongPressOverlayAlphaFloatAlpha of the remote user bubble overlay when user uses a long press gesture on the bubble. Value can be 0.0 - 1.0. Overlay will appear as long as the menu controller appears on the bubble. When the menu is dismissed, overlay will disappear too. In order to show overlay, enableBubblesOverlayOnLongPress should be true.0.3
remoteUserBubbleTopLeftCornerRadiusFloatTop left Radius corner on the remote userbubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
remoteUserBubbleTopRightCornerRadiusFloatTop right Radius corner on the remote user bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
remoteUserBubbleBottomLeftCornerRadiusFloatBottom left Radius corner on the remote user bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
remoteUserBubbleBottomRightCornerRadiusFloatBottom right Radius corner on the remote user bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
userBubbleBackgroundColorUIColorColor code for the background of the visitor bubble.#EDEDED
userBubbleBorderColorUIColorColor code for the outline color of the visitor bubble.#EDEDED
userBubbleLinkColorUIColorColor code for links in the text of the visitor bubble.#0000ee
userBubbleTextColorUIColorColor code for the text of the visitor bubble.UIColor.black
userBubbleBorderWidthDoubleDouble number for the outline width of the visitor bubble.1
userBubbleTimestampColorUIColorColor code for the timestamp of the visitor bubble.#5B5C5E
userBubbleSendStatusTextColorUIColorColor code for the send status text of the visitor bubble.#5B5C5E
userBubbleErrorTextColorUIColorColor code for the error view text of the visitor bubble.#DE0A23
userBubbleErrorBorderColorUIColorColor code for the error view border of the visitor bubble.#DE0A23
userBubbleLongPressOverlayColorUIColorColor of the user bubble overlay when user uses a long press gesture on the bubble. Overlay will appear as long as the menu controller appears on the bubble. When the menu is dismissed, overlay will disappear too. In order to show overlay, enableBubblesOverlayOnLongPress should be true.UIColor.black
userBubbleLongPressOverlayAlphaFloatAlpha of the user's bubble overlay when user uses long press gesture on the bubble. Value can be 0.0 - 1.0. Overlay will appear as long as the menu controller appears on the bubble. When the menu is dismissed, overlay will disappear too. In order to show overlay enableBubblesOverlayOnLongPress should be true.0.3
userBubbleTopLeftCornerRadiusFloatTop left Radius corner on the User bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
userBubbleTopRightCornerRadiusFloatTop right Radius corner on the User bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
userBubbleBottomLeftCornerRadiusFloatBottom left Radius corner on the User bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
userBubbleBottomRightCornerRadiusFloatBottom right Radius corner on the User bubble. Setting the radius to a value greater than 0.0 causes the bubble's layer to begin drawing rounded corners on its background. This attribute affects the bubble's masking and it's recommended to use a corner radius which is at max equals to half of the bubble's height. Setting a corner radius larger than half of the bubble's height will cause text to cut visually.8
bubbleEmailLinksRegexString?Regular expression for email hyperlinks in users messages (consumer and agent). This attribute is optional - If not assigned, the default link detection will be enabled.nil
bubbleUrlLinksRegexString?Regular expression for url hyperlinks in users messages (consumer and agent). This attribute is optional - If not assigned, the default link detection will be enabled.nil
bubblePhoneLinksRegexString?Regular expression for phone hyperlinks in users messages (consumer and agent). This attribute is optional - If not assigned, the default link detection will be enabled.nil
bubbleTopPaddingFloatDefine the bubble Top Padding.10
bubbleBottomPaddingFloatDefine the bubble bottom Padding.10
bubbleLeadingPaddingFloatDefine the bubble Leading Padding.10
bubbleTrailingPaddingFloatDefine the bubble Trailing Padding.10
bubbleTimestampBottomPaddingFloatDefine the bubble Trailing Bottom Padding.5
bubbleTimestampTopPaddingFloatDefine the bubble Timestamp Top Padding.5

Link Preview

NewTypeDescriptionExampleDefault
enableLinkPreviewBoolEnable or disable link preview feature. If disabled, user will not see site's link preview or link preview.true
linkPreviewBackgroundColorUIColorColor code for the background of the link preview area inside cell.UIColor.white
linkPreviewTitleTextColorUIColorColor code for the title text inside link preview area inside cell.UIColor.black
linkPreviewDescriptionTextColorUIColorColor code for the description text inside link preview area inside cell.#5B5C5E
linkPreviewSiteNameTextColorUIColorColor code for the description site name link preview area inside cell.#E2E3E3
linkPreviewBorderWidthDoubleDouble number for the outline width of link preview area inside cell.1.0
linkPreviewStyleLPUrlPreviewStyleRefers to the style in which the link preview cell will be displayed.Slim:


Large:
LPUrlPreviewStyle.slim
linkPreviewSiteNameTextColorUIColorColor code for the description site name link preview area inside cell.
urlRealTimePreviewBackgroundColorUIColorThe background color of the url real time preview.UIColor.white
urlRealTimePreviewBorderColorUIColorThe border color of the url real time preview.
urlRealTimePreviewBorderWidthFloatThe border width of the url real time preview.
urlRealTimePreviewTitleTextColorUIColorThe title text color of the url real time preview.
urlRealTimePreviewDescriptionTextColorUIColorThe description text color of the url real time preview.
useNonOGTagsForLinkPreviewBoolurlPreview will also use non og tags to parse urls instead of using only og tags if useNonOGTagsForLinkPreview is true.true

Send Button

NameTypeDescriptionExampleDefault
sendButtonDisabledColorUIColorColor code for Send and Camera (of Photo Sharing) buttons in disabled mode.#AAAAAA
sendButtonEnabledColorUIColorColor code for Send and Camera (of Photo Sharing) buttons in disabled mode.#0362AC
sendButtonImageUIImageSend button Image in the conversation screen. The custom image will be changed only if isSendMessageButtonInTextMode = false. the send button image needs to follow the Custom Icon documention (https://developer.apple.com/ios/human-interface-guidelines/icons-and-images/custom-icons/)SDK bundle sendMessageIcon Icon
isSendMessageButtonInTextModeBoolTwo options for send message button mode:
  • Send message button in "text mode" - will be taken from localized resources.
  • Send message button in "icon mode".
Default mode is text

System Messages

NameTypeDescriptionExampleDefault
systemBubbleTextColorUIColorColor code for the text of the system messages.UIColor.black

Delivery Notifications

NameTypeDescriptionExampleDefault
checkmarkVisibilityCheckmarksState(Integer Enum)Checkmark visibility of the following options (type CheckmarksState): SentOnly - Show checkmarks for only Sent messages. SentAndAccepted - Show checkmarks for only Sent and Accepted messages. All - Show checkmarks for Sent, Accepted and Read messages.CheckmarksState.All
checkmarkReadColorUIColorColor of checkmark indication signs of Read messages.#004DC9
checkmarkDistributedColorUIColorColor of checkmark indication signs of Distributed messages.#5B5C5E
checkmarkSentColorUIColorColor of checkmark indication signs of Sent messages.#5B5C5E
isReadReceiptTextModeBoolTwo options for read indication:
  • Read Receipt with Text Mode.
  • Read Receipt with Icon Mode.
If the parameter is set as True the mode will be Text.
If the parameter is set as False the mode will be Icon.
true

Conversations

NameTypeDescriptionExampleDefault
deleteClosedConversationOlderThanMonthsUIntUpon SDK initialization, all closed conversations with an end date older than X months will be deleted from the database. Setting 0 will delete all closed conversations.13
sendingMessageTimeoutInMinutesUIntMaximum number of minutes to send the message.60
conversationSeparatorTextColorUIColorConversation separator text and line color.UIColor.black
enableConversationSeparatorTextMessageBoolToggle conversation separator text message when conversation resolved from agent or consumer.true
enableConversationSeparatorLineBoolToggle conversation separator line when conversation resolved from agent or consumer.true
conversationSeparatorFontSizeUIFontTextStyleDefine the conversation closed separator font size.UIFontTextStyle.caption1
conversationSeparatorBottomPaddingFloatDefine the conversation Closed label to separator line padding.7
conversationSeparatorFontNameFloatCustom font name for conversation closed separator. Fonts that are not part of the iOS families, must be defined in App's Info.plist.7
conversationSeparatorViewBottomPaddingStringDefine the conversation separator view bottom padding.nil
conversationClosedSeparatorTopPaddingFloatDefine the conversation closed separator top padding.5
enableVibrationOnMessageFromRemoteUserBoolToggle vibration sound when a new message from a remote user is received.false

Unread Messages

NameTypeDescriptionExampleDefault
scrollToBottomButtonBackgroundColorUIColorScroll to bottom button background color of the whole button.UIColor.black
scrollToBottomButtonMessagePreviewTextColorUIColorScroll to bottom button text color of the last unread message preview.UIColor.white
scrollToBottomButtonBadgeBackgroundColorUIColorScroll to bottom button unread message badge background color.#E7242D
scrollToBottomButtonBadgeTextColorUIColorScroll to bottom button unread message badge text color.UIColor.white
scrollToBottomButtonArrowColorUIColorScroll to bottom button arrow tint color.UIColor.white
unreadMessagesDividerBackgroundColorUIColorUnread Messages divider background color.#F5F5F5
unreadMessagesDividerTextColorUIColorUnread Messages divider text color.#004DC9
scrollToBottomButtonEnabledBoolToggle the mode of the Scroll to bottom button.true
scrollToBottomButtonMessagePreviewEnabledBoolToggle the mode of the Scroll to bottom unread message text preview.true
unreadMessagesDividerEnabledBoolToggle the mode of the Unread Messages divider. If disabled, the scroll to bottom button will scroll to the bottom although we can have new messages and don't show the badge at all nor "new message preview".true
unreadMessagesCornersRadiusFloatDefine the corners radius of the unread messages bubble.8 for all the corners
scrollToBottomButtonCornerRadiusFloatDefine the left top and the left bottom corners radius of the scroll down indicator.20 for left top and the left bottom the corners
scrollToBottomButtonBadgeCornerRadiusFloatDefine the corners radius of the unread messages counter inside the scroll down indicator.12 for all the corners

Localization

NameTypeDescriptionExampleDefault
countryString?Country code: When it is not nil, it will be combined with 'language' ("language_country", for example: en_US) and used instead of device default locale when formatting date and time. If no value is provided, the SDK will use the country according to the device's locale.nil
languageLPLanguageLanguage that will be used instead of default device language. Its type is LPLanguage enum that contains all the languages that are supported by MessagingSDK. It will affect the following areas: 1. Will be used when getting localized strings 2. Will be combined with 'country' ("language_country", for example: en_US) and used instead of default device locale when formatting time and date. If no value is provided, the SDK will use the device's language as default.DeviceLanguage

Brand

NameTypeDescriptionExampleDefault
conversationBackgroundColorUIColorColor code for the entire view background.UIColor.white
customFontNameConversationFeedString?Custom font name for conversation feed. This font will affect all Messages, Timestamp and Separators. Fonts that are not part of the iOS families, must be defined in App's Info.plist.nil
customFontNameNonConversationFeedString?Custom font name for all non conversation feed controls. Such as: Buttons, Alerts, Banners, Menu and External Windows. Fonts that are not part of the iOS families, must be defined in App's Info.plist.nil
customRefreshControllerImagesArray?Array of images for creating the custom refresh controller the controller will loop the images from the array. You must select at least two images in the array to take effect.nil
customRefreshControllerAnimationSpeedFloatCustom refresh controller speed animation define the full images loop time. Smaller value will create high speed animation.2

Date Separator

NameTypeDescriptionExampleDefault
dateSeparatorTitleBackgroundColorUIColorColor code for date separator title background color.UIColor.white
dateSeparatorTextColorUIColorColor code for date separator text color.#46474A
dateSeparatorLineBackgroundColorUIColorColor code for date separator line background color.UIColor.clear
dateSeparatorBackgroundColorUIColorColor code for date separator background color.#FFFFFF
dateSeparatorFontSizeUIFontTextStyleDefine the Date Separator font text style.UIFontTextStyle.footnote
customFontNameDateSeparatorStringCustom font name for Timestamp. Fonts that are not part of the iOS families must be defined in App's Info.plist.nil
dateSeparatorTopPaddingFloatDefine the Date Separator top padding.0
dateSeparatorBottomPaddingFloatDefine the Date Separator bottom padding.0

User Input View

NameTypeDescriptionExampleDefault
inputTextViewContainerBackgroundColorUIColorUser Input TextView container background color.#F5F5F5
inputTextViewCornerRadiusDoubleUser Input TextView corner radius.17.0

Date and Time

NameTypeDescriptionExampleDefault
lpDateFormatString?Custom formatting for date string (day, year..), for example: 'd MMM'. If not defined, one of the default styles will be used (see timestamps formatting).nil
lpTimeFormatString?Custom formatting for time string (hours, lpDateTimeFormat minutes..), for example: 'hh:mm a'. If not defined, one of the default styles will be used (see timestamps formatting).nil
lpDateTimeFormatString?Custom formatting for date and time string, for example: 'EEEE MM/dd/YY hh:mm a'. If not defined, one of the default styles will be used (see timestamps formatting).nil

User Avatar

NameTypeDescriptionExampleDefault
remoteUserAvatarBackgroundColorUIColorBackground color of the remote user’s avatar.#004DC9
remoteUserAvatarLeadingFloatDefine the remote user’s avatar Leading padding (left edge to avatar).8
remoteUserAvatarTrailingPaddingFloatDefine the remote user’s avatar Trailing padding (avatar to bubble).8
remoteUserAvatarIconColorUIColorDefault avatar icon color of the remote user.#0362AC#FFFFFF
remoteUserDefaultAvatarImageUIImage?Default avatar image of the remote user. When assigned, this image will disable remoteUserAvatarBackgroundColor and remoteUserAvatarIconColor configurations. If remote user has an avatar image in his profile, this attribute will be ignored.nil
brandAvatarImageUIImage?Set avatar image for brand. This is an optional UIImage that if is set to nil a default avatar will be presented. Image ratio should be 1:1 (square) and at least 50x50 pixels.nil

Navigation

NameTypeDescriptionExampleDefault
conversationNavigationBackgroundColorUIColorBackground color of navigation bar in conversation screen.#0362AC
conversationNavigationTitleColorUIColorNavigation title color in conversation screen.#FFFFFF
conversationStatusBarStyleUIStatusBarStyleStatus bar style in conversation screen..LightContent

Connection Status Bar

NameTypeDescriptionExampleDefault
connectionStatusConnectingBackgroundColorUIColorColor code for the background of the connection status bar while connecting.#f5f5f5f2
connectionStatusConnectingTextColorUIColorColor code for the text of the connection status bar while connecting.#46474a
connectionStatusFailedToConnectBackgroundColorUIColorColor code for the background of the connection status bar when connection failed.#000000cc
connectionStatusFailedToConnectTextColorUIColorColor code for the text of the connection status bar when connection failed.UIColor.white

Controller Message

NameTypeDescriptionExampleDefault
controllerBubbleTextColorUIColorColor code for the text of the controller bubble.#5b5c5e