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.
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.
MessageHeaderStyle
are as follows:
Property | Type | Description |
---|---|---|
backgroundColor | string | Sets the background colour for message header |
width | string | number | Sets the width for message header |
height | string | number | Sets the height for message header |
border | BorderStyleInterface | Sets the border colour for message header |
borderRadius | number | sets the border radius for message header |
backIconTint | string | Sets the tint colour for back icon for message header |
typingIndicatorTextColor | string | Sets the typing indicator text colour for message header |
typingIndicatorTextFont | FontStyleInterface | Sets the typing indicator text font for message header |
onlineStatusColor | string | Sets the online status colour for message header |
subtitleTextColor | string | Sets the subtitle colour for message header |
subtitleTextFont | FontStyleInterface | Sets the subtitle font for message header |
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 | Used to pass user object of which header specific details will be shown | user={chatUser} |
group | Used to pass group object of which header specific details will be shown | group={chatGroup} |
protectedGroupIcon | Used to set custom protected group icon | protectedGroupIcon={{uri: <image url>}} OR import customProtectedGroupIcon from "./customProtectedGroupIcon.svg"; ``protectedGroupIcon={customProtectedGroupIcon} |
privateGroupIcon | Used to set custom private group icon | privateGroupIcon={{uri: <image url>}} OR import customPrivateGroupIcon from "./customPrivateGroupIcon.svg"; ``privateGroupIcon={customPrivateGroupIcon} |
hideBackIcon | Used to toggle back button visibility | hideBackhideBackIconButton={true} |
disableTyping | Used to enable disable typing indicators | disableTyping={true} |
disableUsersPresence | Used to toggle functionality to show user’s presence | disableUsersPresence={true |
SubtitleView
method, you can modify the SubtitleView to meet your specific needs.
backButtonIcon
method.
AppBarOptions
method.