Badge
The CometChatBadgeCount
component displays the unread count of messages for one-to-one private and group chats.
How to integrate CometChatBadge ?
- Typescript
<CometChatBadge
count={count}
style={badgeStyle}
/>
Properties
Properties | Type | Description |
---|---|---|
count | number | number to display |
style | CometChatBadgeInterface | used to customise the appearance of this view |
CometChatBadgeInterface
Properties | Type | Description |
---|---|---|
textColor | string | colour of the text shown in the badge |
textFont | FontStyleInterface | font of the text shown in the badge |
height | number | string | height of the badge |
width | number | string | width of the badge |
backgroundColor | string | colour of the badge |
border | BorderStyleInterface | border of the badge |
borderRadius | number | radius of the badge |
- Typescript
<CometChatBadge
count={badgeCount}
style={{
height: 100,
width: 100,
textFont: { fontSize: 32 },
backgroundColor: "red"
}}
/>