Documentation/Deployment/React Native SDK
Mobile embed

React Native SDK

Add Sell Whisper AI chat to iOS and Android apps with @sellwhisper/react-native and the headless @sellwhisper/chat-client. Available on npm. Works with Expo and React Native CLI.

Packages

@sellwhisper/chat-client

Headless TypeScript client. Zero React Native deps — use it for custom UIs or non-RN environments.

npm package

@sellwhisper/react-native

Ready-made chat UI, hooks, and overlays. Depends on @sellwhisper/chat-client.

npm package

Video tutorial coming soon

Add Sell Whisper AI chat to a React Native app

1. Install

Install from npm, plus Expo-compatible peers:

pnpm add @sellwhisper/chat-client @sellwhisper/react-native \
  @react-native-async-storage/async-storage \
  expo-image-picker expo-document-picker expo-av \
  expo-notifications socket.io-client \
  react-native-svg expo-linear-gradient

react-native-svg is required (every icon is drawn with it). expo-linear-gradient adds the widget's gradients; without it they become flat colour. Markdown is rendered by the SDK, so react-native-markdown-display is no longer needed.

Add Expo plugins to app.json:

{
  "expo": {
    "plugins": [
      "expo-notifications",
      "expo-image-picker",
      "expo-document-picker",
      "expo-av"
    ]
  }
}

For React Native CLI (bare), use the equivalent peer packages (react-native-image-picker, react-native-document-picker, react-native-audio-recorder-player, Firebase messaging) and run pod install in ios/.

2. Provider setup

Create a SellWhisperClient with your widget ID (from the dashboard Deploy / Widgets page), then wrap your app in SellWhisperProvider:

import React from "react";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { SellWhisperClient } from "@sellwhisper/chat-client";
import { SellWhisperProvider, SellWhisperChatScreen } from "@sellwhisper/react-native";

const client = new SellWhisperClient({
  widgetId: "YOUR_WIDGET_ID", // from the Sell Whisper AI dashboard
  // agentId: "YOUR_AGENT_ID", // optional alternative to widgetId
  // apiUrl: "https://api.sellwhisperai.com/api/v1", // optional override
  persistence: {
    adapter: AsyncStorage,
    keyPrefix: "myapp_",
  },
});

export default function App() {
  return (
    <SellWhisperProvider client={client} theme={{ mode: "auto" }}>
      <SellWhisperChatScreen
        showHeader
        showHistory
        enableAttachments
        enableVoiceNotes
      />
    </SellWhisperProvider>
  );
}

enableVoiceNotes turns on in-chat audio messages (voice notes). It is not phone or telephony calling.

3. Basic chat embed

Use a full-screen chat surface, or a floating overlay on top of your existing screens:

Full-screen chat

Render SellWhisperChatScreen inside SellWhisperProvider (see above).

Floating overlay (FAB)

import { SellWhisperProvider, SellWhisperOverlay } from "@sellwhisper/react-native";

export default function App() {
  return (
    <SellWhisperProvider client={client}>
      {/* Your existing app content */}
      <SellWhisperOverlay />
    </SellWhisperProvider>
  );
}

The SDK matches your web widget's design at the same screen width: phones open the chat full screen, tablets open a floating card above the launcher. Launcher position, size, icon and window width come from the widget's appearance settings in the dashboard. Load your configured font in the app (for example with expo-font); the SDK applies it to all text.

Optional features

Attachments

Enable with enableAttachments on SellWhisperChatScreen, or use useAttachments() for custom pickers.

Voice notes

In-chat audio messages via enableVoiceNotes / useVoiceRecorder() — not telephony.

Voice assistant

Hands-free talk mode when the widget has the voice assistant turned on. Add react-native-audio-api and its Expo config plugin; it needs a development build, not Expo Go.

Push notifications

Call usePushNotifications() inside SellWhisperProvider, then registerExpo() or registerFirebase().

import { useEffect } from "react";
import { usePushNotifications } from "@sellwhisper/react-native";

function PushRegistrar() {
  const { isSupported, registerExpo } = usePushNotifications();

  useEffect(() => {
    if (!isSupported) return;
    void registerExpo();
  }, [isSupported, registerExpo]);

  return null;
}

Key APIs

  • SellWhisperClient

    Headless client — widgetId, optional agentId / apiUrl, persistence, messaging, uploads, devices.

  • SellWhisperProvider

    Supplies the client, theme, and optional component overrides to hooks and screens.

  • SellWhisperChatScreen

    Full chat UI with header, history, attachments, voice notes and the voice assistant.

  • SellWhisperOverlay

    Launcher button that opens chat over your existing navigation: full screen on phones, a floating card on tablets.

  • usePushNotifications

    Registers Expo or Firebase push tokens with Sell Whisper via the client.

Need Help?

Our support team can help you embed Sell Whisper AI in your mobile app