PresenceBar
Shows avatars for other users viewing the same record, with a count for those beyond maxAvatars. Renders nothing when nobody else is present. Needs a realtime data provider.
Installation
pnpm dlx shadcn@latest add @chelone/presence-barLoading preview…
Shows avatars for other users viewing the same record, with a count for those beyond maxAvatars. Renders nothing when nobody else is present. Needs a realtime data provider.
See the realtime guide for provider setup and usage.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| currentUser | { avatar?: string; id: string; name: string } | — | Replaces the auth provider's identity as the user who is announced. |
| heartbeatMs | number | — | How often the announce is republished. Default 15000. |
| maxAvatars | number | — | How many avatars to show before the rest collapse into a `+N` count. Default 5. |
| staleMs | number | — | A user unheard for longer than this is dropped. Default 30000. |
| topic | string | — | Defaults to the presence topic of the resource and record contexts. |