Customization examples (Case 1–4)
Case 1 — Replace a whole area with a render prop
tsxsrc/screens/ChatScreen.tsx
// src/screens/ChatScreen.tsx<ChatProvider config={chatConfig} renderHeader={({title, subtitle, onBack, onVideoCall, videoCallGate}) => ( <MyHeader title={title} subtitle={subtitle} onBack={onBack} onVideo={videoCallGate?.enabled ? onVideoCall : undefined} /> )} renderConversationList={({conversations, renderDefaultItem, onEndReached, onRefresh, refreshing}) => ( <FlatList data={conversations} renderItem={({item, index}) => renderDefaultItem({conversation: item, index})} onEndReached={onEndReached} onRefresh={onRefresh} refreshing={refreshing} /> )}> <ChatNavigator /></ChatProvider>Case 2 — Replace individual components
typescriptsrc/configs/chat.customization.config.ts
// src/configs/chat.customization.config.tsimport type {ChatUiComponents} from '@realtimexsco/live-chat-react-native';import {MyBubble, MyComposer, MyRow} from '../chat/custom'; /** Only register slots you want to customize. All others use package defaults. */export const chatComponents: ChatUiComponents = { MessageBubble: MyBubble, MessageComposer: MyComposer, ConversationListItem: MyRow,};typescriptsrc/configs/chat.config.ts
// src/configs/chat.config.tsimport {chatComponents} from './chat.customization.config'; export const chatConfig = { // …credentials ui: {components: chatComponents},};Case 3 — Style only
typescript
configureChat({ ui: { styles: { conversationList: {title: {fontSize: 24, fontWeight: '800'}, fab: {borderRadius: 16}}, chatRoom: {list: {backgroundColor: '#F7F7F7'}}, message: { sender: {bubble: {backgroundColor: '#DCF8C6'}, text: {color: '#111'}}, receiver: {bubble: {backgroundColor: '#FFFFFF'}}, }, composer: {inputWrap: {borderRadius: 24}}, }, },});Case 4 — Flags and copy only
typescript
configureChat({ ui: { conversationList: {title: 'Messages', showNewChatFab: false, showMentions: false}, chatRoom: { header: {showSearch: false}, composer: {richText: false}, // plain TextInput instead of the rich editor messageActions: {forward: false, thread: false}, roomOptions: {report: false, canvas: false}, }, chatInfo: {dmTitle: 'Contact', dangerActions: {report: {show: false}}}, },});