import { BadgeCount } from "stream-chat-react-native";
<BadgeCount count={5} size="md" />;This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
BadgeCount
BadgeCount renders a rounded pill-shaped badge displaying a numeric or string count. It is typically used to show overflow counts in avatar stacks and groups, or anywhere a count indicator is needed.
The badge adapts its dimensions based on the size prop and uses theme tokens for colors, borders, and typography.
Usage
<BadgeCount count="+3" size="sm" />Props
count (required)
The value to display inside the badge. Can be a number or a string.
| Type |
|---|
string | number |
size (required)
The size of the badge. Controls the height, minimum width, font size, and padding.
| Type | Values |
|---|---|
| string | 'sm' | 'md' | 'lg' |
Size mapping:
| Size | Dimensions (min-width × height) |
|---|---|
lg | 32 × 32 |
md | 24 × 24 |
sm | 20 × 20 |