How to customize the message bubble max width in the Conversation #89
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.
-
Versions
Summary
This guide explains how to customize the maximum width of message bubbles in the conversation view.
Guide & Snippet
iOS
Header
Android
Header
// code block
JS
Steps to Customize the Message Bubble Max Width
1. Understanding the default behavior
By default, message bubbles have a maximum width of
244px
in normal view and640px
in expanded view. You can customize this behavior by overriding theMessageBody
component using theIncomingMessageLayout
andOutgoingMessageLayout
systems.2. React Component Customization
Create custom MessageBody components for both incoming and outgoing messages, then override them using the layout systems:
3. Dynamic Width Based on Content
Create adaptive bubble widths that change based on message content for both message types:
Important Notes
AgentProviderContainer
instead ofFixedMessenger
when customizing message layoutsmarginLeft: 'auto'
style is important for outgoing messages to maintain right alignmentReference
No response
Screenshots
No response
Beta Was this translation helpful? Give feedback.
All reactions