Skip to main content

Overview

CometChatDetails is a Component that provides additional information and settings related to a specific user. The details screen includes the following elements and functionalities:
  1. User Information: It displays details about the user. This includes his/her profile picture, name, status, and other relevant information.
  2. User Actions: The details screen provides actions to block/unblock the user.

Usage

Integration

The following code snippet illustrates how you can directly incorporate the Users component into your Application.

Actions

Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.
1. onClose
The onClose event is typically triggered when the close button is clicked and it carries a default action. However, with the following code snippet, you can effortlessly override this default operation. This action does not come with any predefined behavior. However, you have the flexibility to override this event and tailor it to suit your needs using the following code snippet.
2. onError
This action doesn’t change the behavior of the component but rather listens for any errors that occur in the User component.

Filters

Filters allow you to customize the data displayed in a list within a Component. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK. CometChatDetails component does not have available filters.

Events

Events are emitted by a Component. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed. To handle events supported by Users you have to add corresponding listeners by using CometChatUserEvents The list of User Related Events emitted by the Details component is as follows:

Removing CometChatUserEvents Listener’s

Customization

To fit your app’s design requirements, you can customize the appearance of the details component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.

Style

Using Style you can customize the look and feel of the component in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the component.
1. Details Style
You can set the DetailsStyle to the User Details Component to customize the styling.
List of properties exposed by DetailsStyle
2. Avatar Style
To apply customized styles to the Avatar component in the Details Component, you can use the following code snippet. For further insights on Avatar Styles refer
3. StatusIndicator Style
To apply customized styles to the Status Indicator component in the Details Component, You can use the following code snippet. For further insights on Status Indicator Styles refer
4. ListItem Style
To apply customized styles to the List Item component in the Details Component, you can use the following code snippet. For further insights on List Item Styles refer
5. Backdrop Style
To apply customized styles to the Backdrop component in the Details Component, you can use the following code snippet, you can use the following code snippet. For further insights on Backdrop Styles refer

Functionality

These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.
Default:
Custom:
Below is a list of customizations along with corresponding code snippets

Advance

For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.

SubtitleView

You can customize the subtitle view for each user item to meet your requirements Default:
Custom:

CustomProfileView

You can customize the subtitle view for each user item to meet your requirements Default:
Custom:

DetailsTemplate

The CometChatDetailsTemplate offers a structure for organizing information in the CometChat details component. It serves as a blueprint, defining how user-related details are presented. This structure allows for customization and organization within the CometChat interface.

This defines the structure of template data for the details component.

DetailsOption

The DetailsOption defines the structure for individual options within the CometChat details component, facilitating customization and functionality for user interactions. This defines the structure of each option for a template in the details component.