RealTimeX
Sign inStart for free
RealTimeXMobile Package
Introduction5-minute overviewFeaturesHow the package worksGlossary
Requirements & dependenciesBackend credentialsInstallation step by stepTutorial — your first chat appProject config fileApp entry — index.jsQuick start — minimum working chatComplete ChatScreen example
Native configuration (iOS & Android)Firebase, APNs & backend setup
Navigation — embedding the chatSession, auth & Socket.IOPermissions & access controlAudio & video callingPush notificationsMentions viewRich-text messages (WebView editor)Total unread count
Customization — four waysDefault component fallback (important)Which slots are wiredCustomization examples (Case 1–4)UI feature flags & copy (ui)Chat info (group + DM)Style overrides (ui.styles)Render props (ChatProvider)Theme, fonts & appearance
ChatProvider props referenceconfigureChat options referenceHooks & storeCallbacks referenceAPI query paramsAll exports
Production integration pattern (Fieldr)Host app integration — providers, toasts, tab bars & navigationEnvironment variablesLocal package / monorepo (Metro)
TroubleshootingSetup checklistArchitectureDocumentation & file mapPackage development (maintainers)License
Mobile packageCustomization

Theme, fonts & appearance

Brand accent & color mode

typescript
1configureChat({2  theme: {3    colorMode: 'light',       // 'light' | 'dark'4    accent: '#124232',        // hex, or 'green' | 'teal' | 'blue' | 'indigo' | 'purple' | 'pink' | 'orange' | 'red'5    avatarShape: 'circle',    // 'circle' | 'rounded' | 'square'6    messageStyle: 'whatsapp', // 'whatsapp' | 'oval' | 'rounded' | 'square'7  },8});

A hex accent drives headers (light mode), buttons, FABs, links, checks, badges, outgoing bubbles and tinted icons; related shades are derived. Default accent: green.

theme values are the initial appearance. The user can change appearance in the package's settings; their saved choice (AsyncStorage) wins on the next launch.

Palette overrides

Fine-tune any palette key per mode with theme.colors.light / theme.colors.dark:

theme, headerBg, headerText, surface, canvas, chatBg, mainBg, border, muted, text, textSecondary, hover, incomingBubble, incomingText, outgoingBubble, outgoingText, inputBg, composerBg, online, unreadBadge, elevated, searchBg, tick, tickRead, danger, warning, white, black, transparent.

typescript
1configureChat({2  theme: {3    accent: '#6366f1',4    colors: {5      light: {chatBg: '#F5F6F8', incomingBubble: '#FFFFFF'},6      dark: {chatBg: '#0B141A'},7    },8  },9});

Theme in your own components

tsx
1import {useAppTheme} from '@realtimexsco/live-chat-react-native';2 3const {colors, fonts, isDark, colorMode, setTheme, toggleTheme, setThemeAccent,4       setAvatarShape, setMessageStyle, avatarRadius, bubbleRadii} = useAppTheme();

Also exported: getColors(mode, accent), getThemeAccent, THEME_ACCENT_OPTIONS, createAccentFromHex, normalizeHexColor, isHexColor, AVATAR_SHAPE_OPTIONS, MESSAGE_STYLE_OPTIONS, Spacing, FontSize, FontWeight, Typography, getTypography.

Fonts

The package only consumes font family names. Register the font files natively first (ios/MyChatApp/Info.plist → UIAppFonts, android/app/src/main/assets/fonts/, or npx react-native-asset), then:

typescript
1configureChat({2  fonts: {3    Regular: 'MyApp-Regular',4    SemiBold: 'MyApp-SemiBold',5    Bold: 'MyApp-Bold',6    // also: Black, Light, Italic, Bold_Italic, Light_Italic, SemiBold_Italic, Extra_Light, Extra_Light_Italic7  },8});

Empty values fall back to the system font.

PreviousRender props (ChatProvider)NextChatProvider props reference

On this page

Brand accent & color modePalette overridesTheme in your own componentsFonts
Back to top