import { OnlineIndicator } from "stream-chat-react-native";
<OnlineIndicator online={true} size="md" />;This is beta documentation for Stream Chat React Native SDK v9. For the latest stable version, see the latest version (v8)
.
OnlineIndicator
OnlineIndicator renders a small circular dot indicating a user's online or offline presence status. It is used internally by UserAvatar and UserAvatarGroup to overlay presence information on avatars.
The indicator color is green when online and grey when offline, both sourced from the theme's semantic tokens.
Usage
Props
online (required)
Whether the user is currently online. Controls the background color of the indicator.
| Type |
|---|
| boolean |
size (required)
The size of the indicator dot.
| Type | Values |
|---|---|
| string | 'xl' | 'lg' | 'md' | 'sm' |
Size mapping:
| Size | Dimensions | Border Width |
|---|---|---|
xl | 16 × 16 | 2 |
lg | 14 × 14 | 2 |
md | 12 × 12 | 2 |
sm | 8 × 8 | 1 |