# Presence The online collaborator avatar stack and the connection status of the provider. ## Installation ```bash npx shadcn@latest add litingyes/blocove/rich-text-editor-presence ``` > Typography requires [shadcn/typeset](https://ui.shadcn.com/docs/typeset). Copy `typeset.css` next to your main stylesheet, import it after Tailwind and add the `.typeset-docs` preset. This example also uses: `rich-text-editor-presence`, `rich-text-editor-collaboration`, `rich-text-editor-text`, `rich-text-editor-paragraph`, `rich-text-editor-hard-break`. ```bash npx 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-break ``` 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. ## API Reference ### 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` | - | ## Registry dependencies - `avatar` - `litingyes/blocove/rich-text-editor-collaboration` Namespace: `npx shadcn@latest add @blocove/rich-text-editor-presence`