Users with Messages
This component is responsible for listing all the users registered on CometChat. It also allows users to send text, images, videos, or other media as messages to communicate with one another in real-time.
This component typically includes the following component:
Users: This component lists all the users registered on CometChat.
Messages: This component displays the conversation between participants in a 1:1 or group chat.
Properties
User Information
Details associated with a chat participants.
Name | Type | Description |
---|---|---|
user | User Class | View details of this particular CometChat user |
isMobileView
This refers to the display or presentation of the component specifically optimized for viewing on mobile devices such as smartphones or tablets.
Name | Type | Description |
---|---|---|
isMobileView | boolean | When set to true, the component adapts the layout, design, and functionality to provide an optimal user experience on smaller screens and touch-based interfaces. |
messageText
Temporary text displayed to provide a suggestion to the user to select a particular user / group to chat with.
Name | Type | Description |
---|---|---|
messageText | string | It represents the textual content which will be replaced with the messages component when user clicks on a particular user / group chat. |
Configurations
Properties of the child components like conversations and messages that are available for customisation.
Name | Type | Description |
---|---|---|
usersConfiguration | UsersConfiguration | Properties of the users component that are available for customisation via this component. |
messagesConfiguration | MessagesConfiguration | Properties of the messages component that are available for customisation via this component. |
Style
Name | Type | Description |
---|---|---|
usersWithMessagesStyle | WithMessagesStyle | Styling properties of the component |
Usage
- Vue
//creating users configuration
const usersConfiguration:UsersConfiguration = new UsersConfiguration({
disablePresence:true
});
//passing conversations configuration
<CometChatUsersWithMessages :usersConfiguration="usersConfiguration"
></CometChatUsersWithMessages>