MessageHeader
is a Component that showcases the User or Group details in the toolbar. Furthermore, it also presents a typing indicator and a back navigation button for ease of use.
MessageHeader
is comprised of the following components:
Components | Description |
---|---|
ListItem Component | This component’s view consists of avatar, status indicator , title, and subtitle. The fields are then mapped with the SDK’s user, group class. |
Back Button | BackButton that allows users to navigate back from the current activity or screen to the previous one |
OnBack
is triggered when you click on the back button of the Message Header component. You can override this action using the following code snippet.
onBack
action.
onError
action.
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.
The MessageHeader
component does not have any exposed filters.
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 MessageHeader
component does not produce any events.
MessageHeaderStyle
object to the MessageHeader
component.
Example
In this example, we are employing the MessageHeaderStyle
.
MessageHeaderStyle
are as follows:
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; |
backButtonIconTint | Used to set back button icon tint | backButtonIconTint?: string; |
typingIndicatorTextFont | Used to set typing indicator textStyle | typingIndicatorTextFont?: string; |
typingIndicatorTextColor | Used to set typing indicator text color | typingIndicatorTextColor?: string; |
subtitleTextFont | Used to set subtitle text font style | subtitleTextFont?: string; |
subtitleTextColor | Used to set subtitle text color | subtitleTextColor?: string; |
onlineStatusColor | Used to set online status colour | onlineStatusColor?: string; |
privateGroupIconBackground | Used to set private groups icon backgound | privateGroupIconBackground?: string |
passwordGroupIconBackground | Used to set protected groups icon backgound | passwordGroupIconBackground?: string |
Avatar
component within the MessageHeader
Component, you can use the following code snippet. For more information you can refer Avatar Styles.
ListItemStyle
component within the MessageHeader
Component, you can use the following code snippet. For more information, you can refer ListItem Styles.
Status Indicator
component within the MessageHeader
Component, you can use the following code snippet. For more information you can refer StatusIndicator Styles.
Property | Description | Code |
---|---|---|
user report | Used to pass user object of which header specific details will be shown | user={chatUser} |
group report | Used to pass group object of which header specific details will be shown | group={chatGroup} |
passwordGroupIcon | Used to set custom protected group icon | passwordGroupIcon="your custom private group icon url" |
privateGroupIcon | Used to set custom private group icon | privateGroupIcon="your custom protected group icon url" |
hideBackButton | Used to toggle back button visibility | hideBackButton={true} |
disableTyping | Used to enable disable typing indicators | disableTyping={true} |
disableUsersPresence | Used to toggle functionality to show user’s presence | disableUsersPresence={true} |
MessageHeader
component consists of a listItemView
. You can customize the ListItem according to your requirements by using the listItemView
property.
subtitleView
property, you can modify the SubtitleView to meet your specific needs.
backButtonIconURL
property.
menu
property.