Channels & Handoff
Mobile App SDK
Embed your Chatzora AI chatbot directly within your React Native and Expo mobile applications.
The @chatzora/react-native-sdk package provides a high-performance React Native component wrapper that handles viewport styling, authentication parameters, and direct WebView bridging to load your chatbot seamlessly on iOS and Android devices.
Installation
Install the package and its peer dependency, react-native-webview, using npm or yarn:
npm install @chatzora/react-native-sdk react-native-webviewExpo Setup
If you are using Expo, run the prebuild-compliant command to automatically resolve and link native modules:
npx expo install react-native-webviewBasic Usage
Here is a standard example of how to embed the Chatzora chatbot inside a React Native screen container:
import React from 'react';
import { SafeAreaView, StyleSheet } from 'react-native';
import { ChatzoraWidget } from '@chatzora/react-native-sdk';
export default function ChatScreen() {
return (
<SafeAreaView style={styles.container}>
<ChatzoraWidget
botId="YOUR_BOT_ID"
themeColor="#10b981"
dataTitle="Chatzora Support"
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});API & Props Reference
The ChatzoraWidget component accepts the following configuration properties:
| Prop | Type | Required | Description |
|---|---|---|---|
botId | string | Yes | Your Chatzora chatbot identifier (available in integrations dashboard). |
visitorId | string | No | A static identity tracker to sync chat histories between web accounts and mobile sessions. |
themeColor | string | No | Hex color code to override the widget primary brand color (e.g. #10b981). |
dataTitle | string | No | Text header title for the widget window (defaults to bot name). |
apiBase | string | No | Base API hostname override (defaults to https://chatzora.com). |
style | ViewStyle | No | Standard React Native style objects to customize the WebView frame container. |
onClose | () => void | No | Event handler callback triggered when the widget close action button is tapped. |
onMessageReceived | (event) => void | No | Callback that receives raw message events sent from the web frame. |