@bajaj-cap/rn-chatbot
v1.0.0
Published
React Native chatbot widget for Bajaj Capital apps — powered by Mimir
Maintainers
Readme
@bajaj-cap/rn-chatbot
React Native chatbot widget for Bajaj Capital apps — powered by Mimir.
Installation
npm install @bajaj-cap/rn-chatbot react-native-webview
# or
yarn add @bajaj-cap/rn-chatbot react-native-webviewUsage
Add <ChatBot> anywhere in your navigation layout (renders a floating 💬 button):
import { ChatBot } from '@bajaj-cap/rn-chatbot';
<ChatBot
chatbotUrl={process.env.EXPO_PUBLIC_CHATBOT_URL}
hostId={process.env.EXPO_PUBLIC_CHATBOT_HOST_ID}
userData={{ name: 'Prabhat', email: '[email protected]', phone: '9999999999' }}
/>Props
| Prop | Type | Required | Description |
|------|------|----------|-------------|
| chatbotUrl | string | ✓ | Base URL of the Mimir server |
| hostId | string | ✓ | Host ID from Mimir admin panel |
| userData.name | string | — | User's display name |
| userData.email | string | — | User's email |
| userData.phone | string | — | User's phone number |
| bottomOffset | number | — | Distance from bottom (default: 100) |
| rightOffset | number | — | Distance from right (default: 20) |
Environment variables
EXPO_PUBLIC_CHATBOT_URL=https://chat.bajajcapital.com
EXPO_PUBLIC_CHATBOT_HOST_ID=your_host_id_here