How to customize the font style of sender name #90
AhyoungRyu
announced in
Conversation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Versions
Summary
This guide explains how to change the font style of sender names displayed in incoming message bubbles.
Guide & Snippet
iOS
How to Customize the Sender Name Font Style
This guide shows how to customize the font style of sender names displayed in incoming message bubbles.
You can customize the sender name font by subclassing
SBAUserNameViewand overriding thesetupStyles()method.Step 1: Create a Custom User Name View
Create a subclass and override the
setupStyles()method to change the font:Step 2: Register the Custom User Name View
Register your custom view before presenting the conversation view:
Notes:
setupStyles()method is called when the view is configurednameButtonis the button that displays the sender nameAndroid
Customizing the Font Style or Color
This guide explains how to customize the appearance and layout of message bubbles in the Delight AI Agent Android SDK, including sender name styling.
Overview
The AI Agent SDK provides message containers that handle by message alignments:
The container provides overridable methods to customize individual UI components.
Message Container Types
Step 1: OtherMessageContainer (Left-aligned)
Used for messages from other participants in the conversation.
Available customization methods:
drawNickname(textView: TextView, message: BaseMessage, messageUIParams: MessageUIParams)Implementation Guide
Step 1: Create Custom Message Container
Create a custom container class that extends the appropriate base container:
Step 2: Create Custom Message Container Generator
Implement a custom generator to use your custom containers:
Step 3: Apply Custom Generator
Apply your custom generator to the conversation adapter:
React
Customizing IncomingMessage SenderName Font Styles
This guide explains how to customize the font style of sender names displayed in IncomingMessage components in the Delight AI Agent React SDK.
Overview
While global typography customization is possible through the theme system, the recommended approach for customizing sender names is to create a custom SenderName component to avoid unintended side effects on other components.
Step 1: Create Custom Component
Create a custom component for precise control over sender name font styling:
Step 2: Apply Custom Component
Notes:
React Native
Customizing IncomingMessage SenderName Font Styles
This guide explains how to customize the font style of sender names displayed in IncomingMessage components in the Delight AI Agent React Native SDK.
Overview
While global typography customization is possible through the
theme.typographyprop, the recommended approach for customizing sender names is to create a custom SenderName component to avoid unintended side effects on other components.Step 1: Create Custom Component
Step 2: Apply Custom Component
Notes:
numberOfLines={1}. Keep the same setting in a custom component unless you intentionally want wrapping.theme.typographytoAIAgentProviderContainer. The default sender name uses thecaption1variant.fontFamily.Reference
No response
Screenshots
No response
All reactions