Overview

Talkjs's pre-built chat UI is made up of many components, which you'll encounter when customizing a theme. Components can be either theme components or system components.

Theme components

A theme component is defined by your theme. Theme components can be either rendered directly by the chat UI, for example the UserMessage component, which is rendered for every message in the conversation. Or they can be part of another theme component, for instance the Avatar theme component, which shows a user's avatar inside UserMessage, or wherever you'd like to show a user avatar.

ComponentDescription
AudioBlockDisplays an audio attachment. If the audio attachment is a voice-recorded message, a VoiceBlock is used instead.
AvatarDisplays a user's profile picture or a conversation image.
ChatHeaderThe top part of the chat panel.
CompactMessageContentDisplays a truncated version of the message's contents. Used by ConversationListItem, ReferencedMessage and ReplyBar.
ConversationImageDisplays an image associated with a conversation.
ConversationListItemDisplays an individual conversation in a conversation list.
FileBlockDisplays a file attachment without additional metadata.
GroupChatImageA visual representation of a group chat. It shows the number of participants, and some of the participants' avatars.
IconDisplays an icon.
ImageBlockDisplays an image attachment.
LocationBlockDisplays a geographic location on a map.
MessageDisplays a single message in a conversation.
MessageActionMenuA dropdown menu that allows a user to perform actions on a message, such as editing, deleting, replying to, or reacting with emojis.
MessageDividerDisplays a divider between messages sent on different dates, and between read and unread messages.
MessageFieldArea at the bottom of the chat panel in which to write messages.
MessageListFooterArea at the bottom of the message list. The message list footer can, for example, contain typing indicators to show when other users are typing.
ReferencedMessageIn reply messages, display the contents of the message that's replied to.
ReplyBarDisplayed by the MessageField when a user is writing a reply to a message.
TextBlockDisplays formatted text.
TimeAgoDisplays how much time has elapsed since a message was sent.
VideoBlockDisplays a video attachment.
VoiceBlockDisplays a voice recording attachment.

System components

A system component can be used inside theme components, but it isn't itself defined as part of a theme.

ComponentDescription
AudioPlayerDisplays a waveform of the audio, as well as controls for playing or pausing and modifying the playback speed.
EditorDisplays a text input for formatted text.
EmojiPickerUsed to insert emojis into the message text field.
EmojiSuggestBarDisplays a small autocompletion bar of potential emojis when a user types out an emoji name.
MentionSuggestListDisplays a list of participants that can be mentioned in a chat.
MenuItemDisplays a single item in a menu.
MessageContentDisplays the content of a message.
PopoverButtonDisplays a component as a popover when clicked.
ReactionPickerDisplays a picker for reacting to a message with emojis.
TextDisplays formatted text.