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

Introduction

A complete real-time chat UI for React and Next.js - DMs, groups, threads, calls, attachments and full UI customization.

At a glance

@realtimexsco/live-chat drops a finished chat experience into your app: direct messages, groups, reactions, replies, forwarding, pins, stars, attachments, search, light/dark theme and locale/timezone - and lets you replace the whole chat or any single component.

Package name@realtimexsco/live-chat
Registrynpm (public)
Styles entry@realtimexsco/live-chat/styles.css - pre-compiled and self-contained; works with any Tailwind version, or none
RequiresReact 17+

Start here (5-minute overview)

  1. Install the package plus its peers react and react-dom. Lexical, DOMPurify and every other chat dependency install automatically. Tailwind is not required.
  2. Import the CSS once, globally: @import "@realtimexsco/live-chat/styles.css". No @source, no Tailwind config.
  3. Create chat.config.ts with clientId, accessToken, loggedUserDetails, apiUrl and socketUrl.
  4. Render <ChatMain {...chatConfig} /> - it includes its own viewport wrapper.
  5. Optionally pass components, classNames or features. Omit any slot and the package default is used.
tsx
1// Full page2<ChatMain {...chatConfig} viewportHeight="screen" />3 4// Admin shell with a 4rem header (Elstar, Metronic, …)5<ChatMain {...chatConfig} viewportHeight="calc(100dvh - 4rem)" />6 7// Inside your own bounded flex column (parent needs a height + min-h-0)8<div className="flex min-h-0 flex-1 overflow-hidden">9  <ChatMain {...chatConfig} viewportHeight="full" />10</div>

Tip

Don't pass empty or placeholder components for slots you want to keep - just leave those keys out of components.

What's bundled

Socket.IO client, REST client, Zustand store, Radix UI, Lexical (rich-text composer and message viewer), DOMPurify, the emoji picker, Firebase (push), VideoSDK (calling) and all chat UI ship as regular dependencies of the package - they install and uninstall with it. Your app only installs the few peers it must own a single copy of, like React. See Prerequisites.

Chat features included

FeatureSupported
Direct messages (1-to-1) and group chatsYes
Real-time messages (Socket.IO) with optimistic sendYes
Reactions, replies, forwardYes
Edit / delete (for me / for everyone)Yes
Pin & star messages, pinned bar in the headerYes - Pins, stars & jump to date
Jump to date (Today, Yesterday, a picked day…)Yes - Pins, stars & jump to date
Attachments, drag & drop onto chat / threadYes
In-chat message searchYes
Typing indicators (chat + thread)Yes
Online / “Last seen 5 minutes ago” in the 1:1 headerYes
Read receipts (sent / delivered / read)Yes
New chat / user list (a new group opens right after it's created)Yes
Groups in common (New message preview)Yes - Mentions & groups in common
Group members, admins, permissionsYes
Message threads + threads inboxYes - Message threads
Mentions pageYes - Mentions
Server limits & refusals handled (send rolled back, text kept, countdowns)Yes - When the server refuses
Canvas (collaborative documents) and composer draftsYes - Canvas & drafts
Light / dark mode, locale & timezoneYes - Themes & locale
Phone / video calling, join an ongoing callYes - Phone & video calling
Call recording + transcripts, in-call whiteboardYes (admin-gated)
Web push (FCM) + desktop (Electron), per-chat muteYes - Notifications
Admin feature gatesYes - Admin permissions
Admin-ended session handlingYes - Session end & token refresh
Workspace-wide unread badgeYes - Unread badge
Rich-text composer (Lexical)Yes - Rich text
Full UI customizationYes - Customization
NextPrerequisites

On this page

At a glanceStart here (5-minute overview)What's bundledChat features included
Back to top