Presence
The online collaborator avatar stack and the connection status of the provider.
Both components read the provider awareness and render nothing until a peer advertises itself. The caret publishes the user record for you; when the document has no caret item, set it with `provider.setAwarenessField("user", …)`. The status item is the honest half of a demo: it shows Offline instead of pretending the document is shared when the websocket is down.
Preview
Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-presenceRequires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.
Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/rich-text-editor-presence
This example also uses: rich-text-editor-presencerich-text-editor-collaborationrich-text-editor-textrich-text-editor-paragraphrich-text-editor-hard-break
pnpm dlx shadcn@latest add litingyes/blocove/rich-text-editor-presence litingyes/blocove/rich-text-editor-collaboration litingyes/blocove/rich-text-editor-text litingyes/blocove/rich-text-editor-paragraph litingyes/blocove/rich-text-editor-hard-breaktypeset.css next to your stylesheet, import it after Tailwind and add the .typeset-docs preset. See the Rich text editor setup.API Reference
Props accepted by the exported components.
EditorPresence
The avatar stack of the peers currently in the document.
| Prop | Type | Default |
|---|---|---|
provider | CollaborationProvider | required |
max | number | 4 |
className | string | - |
EditorCollaborationStatus
The connection state of the provider: live, connecting or offline.
| Prop | Type | Default |
|---|---|---|
provider | CollaborationProvider | required |
className | string | - |