Theme components overview

Talkjs's pre-built chat UI is made up of many components, which you'll encounter when customizing a theme. This page provides an overview of customizable theme components, as well as of globally available subcomponents, variables, and shared types.

Customizable components

Components can be either top-level components, which are rendered directly in the user interface, or they can be subcomponents that are rendered by another component in your theme.

Top-level components also have access to a number of system components, which are provided directly by TalkJS and aren't customizable. The documentation page for each component lists which system components are available to it.

NameTypeDescription
AvatarSubcomponentRenders a user's profile image.
ChatHeaderTop-level componentA header rendered at the top of the chatbox (also in the inbox and popup widgets).
ConversationImageSubcomponentRenders a visual representation of a conversation.
ConversationListHeaderTop-level componentA header rendered at the top of the conversation list in the inbox
ConversationListItemTop-level componentThis component is rendered for each conversation in the conversation list of the inbox.
GroupChatImageSubcomponentRenders a visual representation of a group chat, showing the number of participants, and some participants' avatars.
MessageBodySubcomponentA subcomponent used by UserMessage and SystemMessage to render the message's contents.
MessageFieldTop-level componentThis component is rendered at the bottom of the chatbox (also in the inbox and popup widgets). It includes the text field where you can type messages, but also buttons for sending attachments, voice recordings, etc.
NoChatsScreenTop-level componentThis component is rendered in certain situations when the user is not part of any conversations.
NoSearchResultsTop-level componentDisplays in the conversation list when nothing matches the user's search query.
RecordingPreviewSubcomponentA component that includes a player to preview audio recordings
ReferencedMessageSubcomponentIn reply messages, display the contents of the message that's replied to.
ReplyBarSubcomponentA bar rendered at the top of the message field when the user is replying to a message.
SearchResultFooterTop-level componentDisplays a footer below search results in the conversation list.
SearchResultHeaderTop-level componentDisplays a header above search results in the conversation list.
SystemMessageTop-level componentThis component is rendered for each system message in a conversation.
TypingIndicatorSubcomponentUsed inside MessageBody to render inside a "fake" message that is shown when a user is typing.
UserMessageTop-level componentThis component is rendered for each user message in a conversation.
VoiceRecorderSubcomponentA component used by MessageField to render the interface for recording voice messages.

Globally available subcomponents

You can use the following subcomponents anywhere inside your theme.

NameDescription
EmojiUsed to insert emojis into the message text field.
IconDisplays an icon.
TimeAgoDisplays how much time has elapsed since a message was sent.

Globally available variables

You can use the following variables anywhere inside your theme.

NameDescription
StringsAn object that contains localized interface text, used throughout themes.
ThemeAn object that holds information about the current theme.

Shared types

The following shared types are used in the props given to several components.

NameDescription
ConversationA conversation in the chat
FileA file attached to a message
MarkupHolds markup that can be used as template output
MessageA message in a conversation
ReactionAn emoji reaction to a message
UserA user of the chat