# Collaboration Caret Renders the cursors and selections of the other collaborators from the provider awareness. ## Installation ```bash npx shadcn@latest add litingyes/blocove/rich-text-editor-collaboration-caret ``` > 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-collaboration-caret`, `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-collaboration-caret 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 ``` The extension publishes the local user through the provider awareness, so the presence bar reads the same record. It needs a provider with awareness enabled: create the provider before mounting the editor, and pass a `name` and a `color` so the cursor label is readable. ## API Reference ### EditorCollaborationCaret Draws the cursors and the selections of the other peers from the provider awareness. | Prop | Type | Default | | --- | --- | --- | | `provider` | `CollaborationProvider` | `required` | | `user` | `CollaborationUser` | `required` | | `render` | `(user) => HTMLElement` | `Built-in caret` | | `selectionRender` | `(user) => DecorationAttrs` | `Built-in selection` | ## Registry dependencies - `litingyes/blocove/rich-text-editor-collaboration` - `litingyes/blocove/rich-text-editor-extension` Namespace: `npx shadcn@latest add @blocove/rich-text-editor-collaboration-caret`