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 packageCustomization

Replace components

When to use

Prefer this when you only need branded pieces (avatar, conversation row, composer, drawers) while keeping the default layout and data wiring. Only keys you pass are overridden - omit everything else.

Passing undefined for a key is the same as omitting it. Confirm the slot is listed as wired in the Components table before debugging why an override seems ignored.

Need a completely different shell? See Replace entire UI. For visual polish only, use classNames.

Example

tsx
1<ChatMain2  {...chatConfig}3  components={{4    Avatar: MyAvatar,5    ChannelListItem: MyConversationRow,6    MessageItem: MyMessageBubble,7    MessageInput: MyComposer,8    PhoneCallButton: MyPhoneBtn,9    MembersDrawer: MyMembersPanel,10  }}11/>

White-label slots

The four slots most apps replace first. Everything else stays the package default.

tsx
1<ChatMain2  {...chatConfig}3  components={{4    MessageItem: MyMessage,5    Avatar: MyAvatar,6    EmptyState: MyEmpty,7    Header: MyHeader,8  }}9/>
KeyReplaces
MessageItemOne message row in the open chat and in a thread. Props: MessageItemSlotProps
AvatarEvery chat avatar (sidebar, header, message). Props: AvatarSlotProps
HeaderThe open conversation's header bar - same slot as ChannelHeader (ChannelHeader wins if both are set). Props: ChannelHeaderSlotProps
EmptyStateNo chat selected, a chat with no messages, an empty list and an empty filter tab. Props: EmptyStateSlotProps (kind: no-conversation | no-messages | no-chats | filtered-chats)

Replacing Header also replaces the drawers inside it, so the drawer slots only apply while you keep the built-in header. packageDefaultComponents holds every built-in if you only want to wrap it.

ChannelListFilters

Replaces the sidebar tab bar. The package still owns the filtering; your component shows the tabs and calls onFilterChange. Pass ChannelListFilters: () => null to hide the bar, or restyle the built-in one with classNames.channelListFilters.

tsx
1import type { ChannelListFiltersSlotProps } from "@convo-sco/sdk-react";2 3const MyFilters = ({ filters, activeFilterId, onFilterChange, unreadCount }: ChannelListFiltersSlotProps) => (4  <div role="tablist" aria-label="Filter conversations" className="flex gap-2 px-3 py-2">5    {filters6      .filter((f) => f.id !== "dms") // drop a tab7      .map((f) => (8        <button9          key={f.id}10          role="tab"11          aria-selected={f.id === activeFilterId}12          onClick={() => onFilterChange(f.id)}13        >14          {f.id === "groups" ? "Teams" : f.label}15          {f.id === "unread" && unreadCount > 0 ? ` (${unreadCount})` : ""}16        </button>17      ))}18  </div>19);
PropTypeNotes
filters{ id: ChannelListFilterId; label }[]Built-in tabs: all, unread, groups, dms, muted, drafts
activeFilterIdChannelListFilterIdCurrently selected tab
onFilterChange(id) => voidSwitches the list to that filter
unreadCountnumberLoaded chats with unread messages
draftCountnumberLoaded chats with unsent text

Extra host data (UserMeta)

Each host project can carry its own fields on users (for example role or department). The backend returns a free-form metadata object, the package passes it through untouched, and your app decides what to show through the UserMeta slot. It renders under the email in the New message contact row (placement: "list") and the profile preview (placement: "preview"). Omit it and nothing changes.

tsx
1import type { ChatComponents, UserMetaSlotProps } from "@convo-sco/sdk-react";2 3const UserRole = ({ user, placement }: UserMetaSlotProps) => {4  const role = user.metadata?.role;5  if (!role) return null;6  return <p className={placement === "list" ? "truncate text-xs" : "mt-1 text-[13px]"}>{String(role)}</p>;7};8 9const components: ChatComponents = { UserMeta: UserRole };10 11// If the backend only returns the field on request:12setChatQueryParamsByApi({ users: { include: "role" } });

Messages already keep metadata from the API (MessageItem slot → message.metadata).

UserProfileCard

Clicking a sender's avatar or name opens a profile card: name, online / last seen, Message (opens or starts the direct chat) and voice / video call when a direct chat exists. Replace it with the UserProfileCard slot (props: UserProfileCardSlotProps).

PreviousReplace entire UINextStyle with classNames

On this page

When to useExampleWhite-label slotsChannelListFiltersExtra host data (UserMeta)UserProfileCard
Back to top