RealTimeX
Start For Free

RealTimeX

Package Documentation

IntroductionPrerequisitesInstallationProject setupQuick start
Package structureConfigurationComponentsHooksAPI integrationSocket events
OverviewReplace entire UIReplace componentsStyle with classNamesThemes & localePhone & video callingIn-call control barFeatures
TroubleshootingFAQVersion historyBest practicesSupport & contact

Package Reference

Themes & locale

Brand accent

Brand accent color is applied at runtime as CSS variables (--chat-theme and related tokens). Pass themeColor once on ChatMain. Make sure the matching :root tokens exist in your global CSS (see Project Setup).

tsx
<ChatMain {...chatConfig} themeColor="#7c3aed" />

Locale and clock

Locale, timezone, and clock format control how timestamps render across slots. Prefer these props over ad-hoc Intl calls inside custom components so formatting stays consistent.

tsx
<ChatMain
  {...chatConfig}
  locale="en-GB"
  timeZone="Europe/London"
  hour12={false}
  showDateTimeSettings={false}
  onDateTimePreferencesChange={(prefs) => console.log(prefs)}
/>

Light and dark mode

Choose controlled mode when your host app (admin template, design system) already owns theme state. Leave the built-in toggle visible when chat should manage its own mode.

PatternProps
Your app controls the theme (e.g. admin template)colorMode + onColorModeChange + showColorModeToggle={false}
Chat manages its own themedefaultColorMode="light" (built-in toggle shown)
Start in dark modedefaultColorMode="dark"
PreviousStyle with classNamesNextPhone & video calling

On this page

Brand accentLocale and clockLight and dark mode