Skip to main content
Version: v4

Badge

The CometChatBadgeCount component displays the unread count of messages for one-to-one private and group chats.

Image

How to integrate CometChatBadge ?

<CometChatBadge
count={count}
style={badgeStyle}
/>

Properties

PropertiesTypeDescription
countnumbernumber to display
styleCometChatBadgeInterfaceused to customise the appearance of this view

CometChatBadgeInterface

PropertiesTypeDescription
textColorstringcolour of the text shown in the badge
textFontFontStyleInterfacefont of the text shown in the badge
heightnumber | stringheight of the badge
widthnumber | stringwidth of the badge
backgroundColorstringcolour of the badge
borderBorderStyleInterfaceborder of the badge
borderRadiusnumberradius of the badge
<CometChatBadge
count={badgeCount}
style={{
height: 100,
width: 100,
textFont: { fontSize: 32 },
backgroundColor: "red"
}}
/>