Base Components | Description |
---|---|
MessageInput | This provides a basic layout for the contents of this component, such as the TextField and buttons |
ActionSheet | The ActionSheet component presents a list of options in either a list or grid mode, depending on the user’s preference |
OnSendButtonClick
event gets activated when the send message button is clicked. It has a predefined function of sending messages entered in the composer EditText
. However, you can overide this action with the following code snippet.
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.
The list of events emitted by the Messages component is as follows.
Event | Description |
---|---|
ccMessageEdited | Triggers whenever a loggedIn user edits any message from the list of messages .it will have three states such as: inProgress, success and error |
ccMessageSent | Triggers whenever a loggedIn user sends any message, it will have three states such as: inProgress, success and error |
ccLiveReaction | Triggers whenever a loggedIn clicks on live reaction |
CometChatMessageEvents
Listener’s
CometChatMessageEvents
Listener’s
messageComposerStyle
property.
Property | Description | Code |
---|---|---|
border | Used to set border | border?: string, |
borderRadius | Used to set border radius | borderRadius?: string; |
background | Used to set background colour | background?: string; |
height | Used to set height | height?: string; |
width | Used to set width | width?: string; |
inputBackground | Used to set input background color | inputBackground?: string; |
inputBorder | used to set input border | inputBorder?: string; |
inputBorderRadius | used to set input border radius | inputBorderRadius?: string; |
textFont | Used to set input text font | textFont?: string; |
textColor | used to set input text color | textColor?: string; |
placeHolderTextColor | Used to set placeholder text color | placeHolderTextColor?: string; |
placeHolderTextFont | Used to set placeholder text font | placeHolderTextFont?: string; |
attachIcontint | Used to set attachment icon tint | attachIcontint?: string; |
sendIconTint | Used to set send button icon tint | sendIconTint?: string; |
dividerTint | Used to set separator color | dividerTint?: string; |
liveReactionIconTint | Used to set live reaction icon color | liveReactionIconTint?: string; |
voiceRecordingIconTint | used to set voice recording icon color | voiceRecordingIconTint?: string; |
emojiIconTint | used to set emoji icon color | emojiIconTint?: string; |
AIIconTint | used to set AI icon color | AIIconTint?: string; |
emojiKeyboardTextFont | used to set emoji keyboard text font | emojiKeyboardTextFont?: string; |
previewTitleFont | used to set preview title font | previewTitleFont?: string; |
previewTitleColor | used to set preview title color | previewTitleColor?: string; |
previewSubtitleFont | used to set preview subtitle font | previewSubtitleFont?: string; |
previewSubtitleColor | used to set preview subtitle color | previewSubtitleColor?: string; |
closePreviewTint | used to set close preview color | closePreviewTint?: string; |
maxInputHeight | used to set max input height | maxInputHeight?: string; |
mediaRecorderStyle
property. For more details, please refer to MediaRecorder styles.
mentionsWarningStyle
property.
Property | Description | Code |
---|---|---|
User report | Used to pass user object of which header specific details will be show | user={chatUser} |
Group report | Used to pass group object of which header specific details will be shown | group={chatGroup} |
placeHolderText | Used to set composer’s placeholder text | placeHolderText="your custom placeholder text" |
mentionsWarningText | Text to be displayed when max limit reaches for valid mentions | mentionsWarningText="Your Custom Mentions warning Text" |
disableTypingEvents | Used to disable/enable typing events , default false | disableTypingEvents={true} |
disableSoundForMessages | Used to toggle sound for outgoing messages | disableSoundForMessages={true} |
sendButtonIconURL | Used to set send button icon | sendButtonIconURL="your custom isend button icon url" |
text | Used to set predefined text | text="Your custom text" |
voiceRecordingStartIconURL | Sets custom icon for voice recording start. | voiceRecordingStartIconURL="your custom voice recording start icon" |
voiceRecordingStopIconURL | Sets custom icon for voice recording stop. | voiceRecordingStopIconURL="your custom voice recording stop icon" |
voiceRecordingCloseIconURL | Sets custom icon for voice recording close. | voiceRecordingCloseIconURL="your custom voice recording close icon" |
voiceRecordingSubmitIconURL | Sets custom icon for voice recording submit | voiceRecordingSubmitIconURL="your custom voice recording submit icon" |
auxiliaryButtonAlignment | controls position of auxiliary button view , can be left or right . default right | auxiliaryButtonAlignment={AuxiliaryButtonAlignment.left} |
attachmentIconURL | sets the icon to show in the attachment button | attachmentIconURL="your custom attachment icon url" |
hideLiveReaction | used to toggle visibility for live reaction component | hideLiveReaction={true} |
customSoundForMessage | Used to give custom sounds to outgoing messages | customSoundForMessage="your custom sound for messages" |
LiveReactionIconURL | used to set custom live reaction icon. | LiveReactionIconURL="your custom live reaction icon" |
AIIconURL | used to set custom AI icon. | AIIconURL="your custom AI icon" |
emojiIconURL | used to set custom emoji icon. | emojiIconURL="your custom emoji icon" |
hideLayoutMode | used to hide the layout mode. | hideLayoutMode={true} |
hideVoiceRecording | used to hide the voice recording option. | hideVoiceRecording={true} |
Disable Mentions | Sets whether mentions in text should be disabled. Processes the text formatters If there are text formatters available and the disableMentions flag is set to true, it removes any formatters that are instances of CometChatMentionsFormatter. | disableMentions={true} |
attachmentOptions
, you can set a list of custom MessageComposerActions
for the MessageComposer Component. This will override the existing list of MessageComposerActions
.
Example
headerView
property.
Example
UserMemberWrapperConfiguration
object.
UserMemberWrapperConfiguration
indeed provides access to all the Action, Filters, Styles, Functionality, and Advanced properties of the UserMemberWrapper component.
Please note that the properties marked with the report symbol are not accessible within the Configuration Object.
Example
UserMemberWrapperConfiguration
.