Chatzora Docs
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-webview

Expo Setup

If you are using Expo, run the prebuild-compliant command to automatically resolve and link native modules:

npx expo install react-native-webview

Basic 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:

PropTypeRequiredDescription
botIdstringYesYour Chatzora chatbot identifier (available in integrations dashboard).
visitorIdstringNoA static identity tracker to sync chat histories between web accounts and mobile sessions.
themeColorstringNoHex color code to override the widget primary brand color (e.g. #10b981).
dataTitlestringNoText header title for the widget window (defaults to bot name).
apiBasestringNoBase API hostname override (defaults to https://chatzora.com).
styleViewStyleNoStandard React Native style objects to customize the WebView frame container.
onClose() => voidNoEvent handler callback triggered when the widget close action button is tapped.
onMessageReceived(event) => voidNoCallback that receives raw message events sent from the web frame.