integraize-chat-react-native
v1.0.3
Published
React Native SDK for Integraize chat widget
Maintainers
Readme
React Native Chat Integraize
React Native SDK for integrating Integraize chat widgets into React Native applications.
Features
- Lightweight and fast integration
- WebView-based embedding
- Dynamic resizing for adaptive layouts
- Cross-platform compatibility
- Simple props-based configuration
- Two-way communication between React Native and the chat widget
Installation
npm install react-native-chat-integraize react-native-webviewQuick Start
import { ChatWidget } from 'react-native-chat-integraize';
export default function App() {
return (
<ChatWidget
userId="unique-user-id"
apiUrl="https://api.integraize.com"
locale="en"
autoOpen={false}
theme={{ primaryColor: '#1D4ED8' }}
onOpen={() => console.log('Chat opened')}
onClose={() => console.log('Chat closed')}
onError={(error) => console.error('Chat error:', error)}
/>
);
}Configuration Props
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| userId | string | Yes | Unique user identifier |
| apiUrl | string | No | API server URL (default: 'https://api.integraize.com') |
| locale | string | No | Locale (default: 'uk') |
| autoOpen | boolean | No | Automatically open chat (default: false) |
| theme.primaryColor | string | No | Theme primary color (default: '#a0c96d') |
| webViewProps | object | No | Additional WebView props |
| onOpen | function | No | Callback when chat is opened |
| onClose | function | No | Callback when chat is closed |
| onError | function | No | Callback when an error occurs |
Development
# Install dependencies
npm install
# Build
npm run build
# Linting
npm run lint
# Run tests
npm testLicense
MIT
