Theme, fonts & appearance
Brand accent & color mode
configureChat({ theme: { colorMode: 'light', // 'light' | 'dark' accent: '#124232', // hex, or 'green' | 'teal' | 'blue' | 'indigo' | 'purple' | 'pink' | 'orange' | 'red' avatarShape: 'circle', // 'circle' | 'rounded' | 'square' messageStyle: 'whatsapp', // 'whatsapp' | 'oval' | 'rounded' | 'square' },});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.
configureChat({ theme: { accent: '#6366f1', colors: { light: {chatBg: '#F5F6F8', incomingBubble: '#FFFFFF'}, dark: {chatBg: '#0B141A'}, }, },});Theme in your own components
import {useAppTheme} from '@realtimexsco/live-chat-react-native'; const {colors, fonts, isDark, colorMode, setTheme, toggleTheme, setThemeAccent, 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:
configureChat({ fonts: { Regular: 'MyApp-Regular', SemiBold: 'MyApp-SemiBold', Bold: 'MyApp-Bold', // also: Black, Light, Italic, Bold_Italic, Light_Italic, SemiBold_Italic, Extra_Light, Extra_Light_Italic },});Empty values fall back to the system font.