Sign inStart for free
ConvoWeb Package
IntroductionPrerequisitesInstallationProject setupQuick start
Package structureConfigurationComponentsHooksAPI integrationSocket events
OverviewReplace entire UIReplace componentsStyle with classNamesThemes & localePhone & video callingIn-call control barTranslationsFeatures
Everyday chat toolsEvent callbacksUnread badgeRich-text messagesPins, stars & datesMessage threadsMentionsCanvas & draftsNotificationsAdmin permissionsServer refusalsSession & token refresh
Host app integrationTroubleshootingFAQVersion historyBest practicesSupport & contact
Web packageGetting started

Installation

Install the package and its two peers - everything else, including Lexical, comes with it.

Step 1 - Install the package and peers

shell
npm install @convo-sco/sdk-react react react-dom

No Tailwind plugin, no zustand and no lexical - they're bundled. See Prerequisites.

Note

Using pnpm + Vite? Add the nested optimizeDeps.include entries shown in Project setup.

Next.js

A Next.js app (13+, App Router or Pages Router) already has next, react and react-dom, so you only add the package:

shell
npm install @convo-sco/sdk-react

Starting from scratch:

shell
1npx create-next-app@latest my-chat-app --typescript --app --src-dir2cd my-chat-app3npm install @convo-sco/sdk-react

Then add the package to the transpile list:

typescript
1// next.config.ts2import type { NextConfig } from "next";3 4const nextConfig: NextConfig = {5  transpilePackages: ["@convo-sco/sdk-react"],6};7 8export default nextConfig;

Import @convo-sco/sdk-react/styles.css in src/app/layout.tsx (or pages/_app.tsx), and put "use client" at the top of any file that imports the chat. Full walkthrough in Project setup.

Step 2 - Verify the install

shell
1npm ls @convo-sco/sdk-react2npm ls lexical @lexical/react dompurify   # nested under @convo-sco/sdk-react - Lexical is bundled3ls node_modules/@convo-sco/sdk-react/dist/index.d.ts   # TypeScript types must exist

Step 3 - CSS, config file and chat page

Import the stylesheet once, create chat.config.ts and render ChatMain - see Project setup and Quick start.

Step 4 - Run your app

Start your dev server and open the page that renders ChatMain.

PreviousPrerequisitesNextProject setup

On this page

Step 1 - Install the package and peersNext.jsStep 2 - Verify the installStep 3 - CSS, config file and chat pageStep 4 - Run your app
Back to top