How to customize the typing indicator in the conversation #79
elliot-choic
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 customize the appearance and behavior of the typing indicator shown at the bottom of the conversation screen.
Guide & Snippet
iOS
How to Customize the Typing Indicator Dot Color
This guide shows how to customize the typing indicator appearance by changing the dot color displayed when the AI agent or user is typing.
You can customize the typing indicator by subclassing
SBATypingIndicatorMessageCelland overriding thelayoutContents(with:)method.Step 1: Create a Custom Typing Indicator Cell
Create a subclass and override the
layoutContents()method to replace the default typing indicator with a custom label:Step 2: Register the Custom Typing Indicator Cell
Register your custom cell before presenting the conversation view:
Notes:
layoutContents(with:)method is called when the cell's layout is configuredlayoutContents(with:)to replace the default typing bubble with a custom viewAndroid
Steps to Customize the Typing Indicator
Step 1: Create a custom view that represents the typing indicator
You should create a view (
CustomTyingIndicator) that visually represents the typing state.This view will be used in your custom
ViewHolder.Step 2: Create a
ViewHolderthat wraps the custom viewExtend
MessageViewHolderand bind your custom view for the typing indicator.Step 3: Extend
ConversationMessageListAdapterand return your customViewHolderOverride
onCreateViewHolderto detectVIEW_TYPE_TYPING_INDICATORand return the customViewHolder.Step 4: Register your custom adapter using
AIAgentAdapterProvidersFinally, inject the adapter into your AI Agent configuration:
React
How to customize the typing indicator appearance in the conversation
You can customize the typing indicator by replacing the
TypingIndicatorcomponent usingIncomingMessageLayout.Step 1: Create a Custom TypingIndicator Component
Step 2: Register the Custom Component
Notes:
TypingIndicatorcomponent is part ofIncomingMessageLayoutReact Native
How to customize the typing indicator appearance in the conversation
You can customize the typing indicator by replacing the
TypingIndicatorcomponent usingIncomingMessageLayout.Step 1: Create a Custom TypingIndicator Component
The slot receives a
containerStylethat carries the message row's start padding. Apply it to your outermost view so the indicator stays aligned with the message bubbles.Step 2: Register the Custom Component
Notes:
TypingIndicatorcomponent is part ofIncomingMessageLayout.thinkingMessagetext with a shimmer effect when one is provided. Handle both cases if you want to keep that behavior.Reference
No response
Screenshots
No response
All reactions