@meckin/react-native-chat-widget
v0.1.0
Published
Embeddable React Native chat widget — port of @meckin/chat-widget.
Readme
react-native-chat-widget
React Native port of chat-widget-lib. Same hooks API, same state machine, same
backend protocol — rebuilt for native runtime (no DOM, no Tailwind/CSS, no
localStorage, no fetch body streaming).
Status
Work in progress. See MIGRATION.md for the prop/feature delta versus the web
library.
Install
npm install react-native-chat-widget \
react-native-svg \
react-native-markdown-display \
@react-native-clipboard/clipboard \
@react-native-async-storage/async-storage \
nativewindFor a higher-perf storage backend, swap in react-native-mmkv and pass your
own StorageAdapter to <ChatWidget storage={...} />.
For attachments and notifications, pass an adapter (see src/adapters/). The
example app wires Expo's expo-image-picker and expo-notifications; bare RN
apps typically wire react-native-image-picker and
@react-native-firebase/messaging.
Quick usage
import { ChatWidget } from "react-native-chat-widget";
<ChatWidget
apiUrl="https://api.example.com"
projectId="..."
theme="light"
onThemeToggle={() => {}}
showLauncher
/>;See example/ for a full integration including adapters.
