QuickBlox React Chat UIKit provides customizable screen modules and essential chat functions such as a list of dialogs, dialog creation, in-dialog chat, and dialog editing out of the box.
Screen Module | ViewModel | Components |
---|---|---|
Dialogs | DialogsViewModel | HeaderDialogsPreviewDialog |
MessageView | DialogsViewModel, MessageViewModel | HeaderMessages, AudioAttachmentComponentProps, HighLightLink, ImageAttachmentComponent, VideoAttachmentComponent, VoiceRecordingProgress |
DialogInformation | DialogsViewModel, UserViewModel | MembersList, InviteMembers, and UsersList |
HeaderDialogsProps
.
Dialog list
PreviewDialog
. When the current user clicks on one of the dialog windows in the list, they will be able to enter the chat screen.
Property name | Type | Description |
---|---|---|
header | React.ReactNode | This field allows passing a React element as the content for the main header of the chat dialog list. |
upHeaderContent | React.ReactNode | This field allows passing a React element as the content for the upper header of the chat dialog list. |
subHeaderContent | React.ReactNode | This field allows passing a React element as the content for the additional subheader of the chat dialog list. |
dialogsViewModel | DialogsViewModel | This field corresponds to the dialog view model (DialogsViewModel) responsible for handling data and managing the state of the chat dialog list, following the MVVM pattern. |
onDialogSelectHandler | Object function | This field represents a function (Handler) to handle the event of selecting (highlighting) a dialog from the chat dialog list. It might take an object of type DialogEntity representing the selected dialog. |
additionalSettings | Object | This field represents additional settings (DialogsComponentSettings) for the chat dialog list component that we have already discussed./type DialogsComponentSettings = {themeName?: ThemeNames;withoutHeader?: boolean;useSubHeader?: boolean;useUpHeader?: boolean;themeHeader?: UiKitTheme;themePreview?: UiKitTheme;} ; / |
Property name | Type | Description |
---|---|---|
upHeaderContent | React.ReactNode | This field allows passing a React element as the content for the upper header of the chat dialog list. |
subHeaderContent | React.ReactNode | This field allows passing a React element as the content for the additional subheader of the chat dialog list. |
dialogsViewModel | DialogsViewModel | This field represents the dialogs view model (DialogsViewModel) that manages the data and state of the chat messages list. In the context of the MVVM pattern, the view model handles the logic related to data and interaction with the user interface components. |
onDialogInformationHandler | Object function | This field represents the handler function (Handler) for the event of obtaining information about a dialog. It may not take any arguments and performs specific actions when requesting information about a dialog. |
theme | UiKitTheme | This field represents the theme (UiKitTheme) for styling the chat messages list component. In an MVVM pattern-based application, themes are often used to manage the style and appearance of the user interface. |
AIAnswerToMessage | AIWidget | In versions 0.2.0 and later, you can integrate AI functionality based on OpenAI features. This field allows you to specify your own AI Widget for generating quick responses to messages. For more details, please refer to the following AI Feature section of documentation. |
Property name | Type | Description |
---|---|---|
theme | UiKitTheme | This field represents the theme (UiKitTheme) for styling the dialog information component. Themes allow controlling the style and appearance of the user interface in an application built using the MVVM pattern. |
upHeaderContent | React.ReactNode | This field allows passing a React element as the content for the upper header of the chat dialog list. |
subHeaderContent | React.ReactNode | This field allows passing a React element as the content for the additional subheader of the chat dialog list. |
dialogsViewModel | DialogsViewModel | This field represents the dialog view model (DialogsViewModel), which manages data and the state of the dialog list in the chat. In the context of the MVVM pattern, the view model handles logic related to data and interaction with user interface components. |
onCloseDialogInformationHandler | Object function | This field represents a handler function for the event of closing dialog information. This function performs specific actions when the window with dialog information is closed. |
dialog | DialogEntity | This field represents the dialog entity (DialogEntity), which contains information about the selected dialog, such as its ID, name, participants, and other properties that may be relevant for displaying dialog information. |