Live Collaboration

1 variant

Multiplayer document blocks with live carets, selections, presence, and comment threads anchored to the text.

Live document

Collaborators' carets glide between words with name tags, one types a sentence while the header reads Saving, another selects a phrase and leaves a comment that springs into the margin. Follow anyone's caret, reply to threads, and resolve them.

Q4 launch plan

Q4 launch plan

We ship the new workspace on November 18. This plan covers the rollout, the launch week, and how we will measure whether it worked.

Rollout

Beta customers move over first, two weeks before launch. Everyone else follows in three waves of a day each, so support can keep up with questions.

Launch week

The announcement goes out on Tuesday morning with a short video and a live demo at noon. Sales gets a one-page summary the Friday before.

Success metrics

We want weekly active teams up by a fifth within a month, and fewer than one support ticket per hundred migrated workspaces.

Comments

  • Ines12m ago

    Three waves feels slow. Could we do two if the first one goes smoothly?

  • Mira8m ago

    Let's decide after the beta. Leaving three as the plan for now.

  • Theo3m ago

    I can host the demo. Need the final build by Monday.

"use client";

import { CollabDoc } from "@/components/premium/collab-doc";

export function CollabDocPreview() {
  return <CollabDoc />;
}

Install

$ bunx --bun shadcn add @beui-pro/collab-doc

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

CollabDoc9 props
  • blocks

    Starting document blocks, read on mount; the first block's text names the doc.

    readonly DocBlock[]
  • threads

    Starting comment threads, read on mount.

    readonly Thread[]
  • collaborators

    Other people shown in the presence row with live carets.

    readonly Collaborator[]
  • me

    The viewer, who authors replies.

    Collaborator
  • cursors

    Starting caret positions, keyed by collaborator id.

    Record<string, CursorPosition>
  • labels

    UI text overrides, merged over the default English labels.

    Partial<CollabLabels>
  • live

    Play the scripted session. Turn off when wiring real presence.

    boolean

    Default true

  • onShare

    Called when the user clicks the Share button.

    (() => void)
  • className

    Classes merged onto the root element.

    string
Types7 types

The object types these props take, field by field.

Collaborator4 fields
  • idRequired

    Unique id used to key cursors and reply authors.

    string
  • nameRequired

    Display name shown on the caret tag and in comments.

    string
  • avatarRequired

    Avatar image URL.

    string
  • colorRequired

    Tailwind classes for this person's caret, highlights, and avatar ring.

    CollabColor
DocBlock3 fields
  • idRequired

    Unique id that threads and cursors point to.

    string
  • kindRequired

    Text style for the block: document title, section heading, or body paragraph.

    "title" | "heading" | "paragraph"
  • textRequired

    Plain text content of the block.

    string
Thread6 fields
  • idRequired

    Unique id for the thread.

    string
  • blockIdRequired

    Id of the block the comment is anchored to.

    string
  • startRequired

    Character range in the block the comment is anchored to.

    number
  • endRequired

    Character offset in the block where the highlight ends, exclusive.

    number
  • repliesRequired

    Comments in the thread, oldest first.

    Reply[]
  • resolvedRequired

    Hides the text highlight and collapses the thread card when true.

    boolean
CursorPosition3 fields
  • blockIdRequired

    Id of the block the caret is in.

    string
  • offsetRequired

    Character offset of the caret in the block's text.

    number
  • selection

    Character range the collaborator has selected, drawn as a highlight.

    { start: number; end: number }
CollabLabels12 fields
  • shareRequired

    Text on the Share button in the header.

    string
  • savingRequired

    Status shown while an edit is being saved.

    string
  • savedRequired

    Status shown once edits are saved.

    string
  • commentsRequired

    Heading and accessible name of the comments column.

    string
  • replyRequired

    Placeholder and accessible name for the reply field.

    string
  • resolveRequired

    Accessible name and tooltip for the resolve thread button.

    string
  • reopenRequired

    Button text that reopens a resolved thread.

    string
  • resolvedRequired

    Text shown on a resolved thread before its author's name.

    string
  • followRequired

    Accessible name for an avatar button that follows that person.

    (name: string) => string
  • followingRequired

    Banner text shown while following a collaborator's caret.

    (name: string) => string
  • stopFollowingRequired

    Accessible name for the controls that stop following a collaborator.

    string
  • typingRequired

    Indicator text shown while a collaborator is typing.

    (name: string) => string
CollabColor3 fields
  • solidRequired

    Caret bar and name tag fill, such as `bg-sky-500`.

    string
  • softRequired

    Selection and comment highlight, such as `bg-sky-500/20`.

    string
  • ringRequired

    Avatar ring, such as `ring-sky-500`.

    string
Reply4 fields
  • idRequired

    Unique id for the reply.

    string
  • authorIdRequired

    Id of the collaborator who wrote the reply.

    string
  • textRequired

    Body of the reply.

    string
  • timeRequired

    Display time, such as "2m ago".

    string