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-bar
Loading 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

PropTypeDefaultDescription
classNamestring—
currentUser{ avatar?: string; id: string; name: string }—Replaces the auth provider's identity as the user who is announced.
heartbeatMsnumber—How often the announce is republished. Default 15000.
maxAvatarsnumber—How many avatars to show before the rest collapse into a `+N` count. Default 5.
staleMsnumber—A user unheard for longer than this is dropped. Default 30000.
topicstring—Defaults to the presence topic of the resource and record contexts.