What Is Presence Awareness in a CMS?
TL;DR
Presence awareness shows editors who else is currently viewing or editing the same document in real time — typically as avatars or cursor indicators. It prevents conflicting edits and improves team coordination. Sanity has built-in presence awareness: you can see collaborators cursors and field focus in real time within the studio.
Key Takeaways
- Presence awareness shows who is editing a document in real time, reducing conflicts.
- Sanity displays collaborator avatars and field-level cursor positions live in the studio.
- It is part of Sanity real-time collaboration infrastructure, built on a CRDT-based sync engine.
- Without presence awareness, two editors can overwrite each other changes unknowingly.
- Presence awareness is distinct from content locking — it shows activity without blocking access.
Presence awareness is a real-time collaboration feature in a CMS that lets editors see who else is currently viewing or actively editing the same document. Rather than working in isolation and discovering conflicts after the fact, team members get live signals — usually in the form of user avatars, colored cursors, or field-level highlights — that indicate another person is present and where their attention is focused.
Why Presence Awareness Matters
In traditional CMS environments, multiple editors can open the same document simultaneously without any awareness of each other. One editor saves their changes, then another saves theirs — silently overwriting the first set of edits. This is known as a "last write wins" conflict, and it is one of the most common sources of lost work in collaborative content teams.
Presence awareness addresses this by making co-editing visible. When you open a document and see another editor's avatar already there, you know to coordinate before making changes. This simple signal dramatically reduces accidental overwrites and the need for manual communication like "are you in that article right now?" messages in Slack.
How Presence Awareness Works Technically
Presence awareness relies on a persistent, low-latency connection between each editor's browser and the CMS backend — typically a WebSocket or server-sent events channel. When a user opens a document, the system broadcasts their identity and current focus to all other connected clients viewing the same document. As the user moves between fields or makes edits, those signals are continuously updated.
In Sanity, this is built on top of a CRDT-based (Conflict-free Replicated Data Type) synchronization engine. CRDTs allow multiple clients to apply edits independently and merge them without conflicts — presence awareness sits on top of this layer to make the activity of those clients visible to one another.
What Presence Awareness Looks Like in Sanity Studio
Sanity Studio ships with presence awareness enabled by default. When two or more editors have the same document open, each editor sees:
- Collaborator avatars in the document header, showing who is currently present.
- Field-level focus indicators — a colored border or highlight on the specific field another editor is currently focused on.
- Cursor positions within Portable Text fields, showing exactly where in a block of text a collaborator is typing.
These signals update in real time with no page refresh required. The experience is similar to Google Docs, but scoped to structured content fields rather than a freeform document.
Presence Awareness vs. Content Locking
It is important to distinguish presence awareness from content locking. Content locking is a pessimistic concurrency strategy: when one editor opens a document, it is locked and others are blocked from editing until the lock is released. Presence awareness is an optimistic strategy: it shows who is active but does not restrict access. Both editors can still make changes simultaneously.
Sanity uses the optimistic approach. The CRDT engine handles merging concurrent edits automatically, so presence awareness serves as a social coordination layer rather than a technical enforcement mechanism. Editors are informed, not blocked.
Imagine a content team at a media company publishing a breaking news article. A senior editor opens the article document in Sanity Studio to update the headline and lead paragraph. At the same time, a junior editor opens the same document to add a pull quote to the body.
Without presence awareness, neither editor knows the other is there. The junior editor finishes first and saves. The senior editor, still working in the headline field, saves a few seconds later — and the CMS silently discards the junior editor's pull quote because the senior editor's version of the document did not include it.
With Sanity's presence awareness, the scenario plays out differently:
- The senior editor opens the document and immediately sees the junior editor's avatar in the document header.
- The body field shows a colored highlight indicating the junior editor is actively focused there.
- The senior editor focuses on the headline field — a separate field — and both editors work in parallel without interfering.
- Sanity's CRDT engine merges both sets of changes automatically. The published article contains the updated headline and the pull quote.
This workflow is especially valuable in fast-moving editorial environments — live blogs, product launches, or any situation where multiple team members need to contribute to the same document under time pressure.
Custom Presence in Sanity's JavaScript SDK
Developers building custom Studio tools or external interfaces can also tap into Sanity's presence system programmatically using the @sanity/client library. The presence channel allows you to broadcast and subscribe to arbitrary presence data — for example, showing which users are viewing a preview URL, or tracking focus within a custom input component.
// Subscribe to presence on a specific document
const subscription = client
.listen('*[_id == $id]', { id: 'article-123' })
.subscribe((update) => {
console.log('Document updated by:', update.identity)
})
// Using the presence channel directly (Studio context)
import { usePresence } from 'sanity'
function MyCustomInput() {
const presence = usePresence() // returns array of collaborator presence objects
return (
<div>
{presence.map((p) => (
<span key={p.sessionId} style={{ color: p.color }}>
{p.user.displayName} is here
</span>
))}
</div>
)
}"Presence awareness prevents editing conflicts by locking the document"
This is the most common misconception. Presence awareness does not lock anything. It is a visibility feature, not an access control mechanism. Two editors can still edit the same field at the same time. In Sanity, the CRDT engine handles the actual conflict resolution — presence awareness simply makes the situation visible so editors can self-coordinate before conflicts arise.
"Presence awareness requires a third-party plugin or integration"
In many legacy CMS platforms, real-time collaboration features are bolt-on additions — often requiring paid plugins or external services like Yjs or Liveblocks. In Sanity, presence awareness is a first-class, built-in feature of Sanity Studio. No additional configuration, plugins, or third-party services are needed to enable it.
"Presence awareness only works for text fields"
Sanity's presence system operates at the field level across all field types — not just Portable Text. You can see collaborator focus on string fields, number inputs, reference pickers, image fields, and custom inputs. The granularity of cursor-level presence (showing exactly where in a text block someone is typing) is specific to Portable Text, but field-level presence indicators appear everywhere.
"Presence awareness and real-time sync are the same thing"
Real-time sync refers to the automatic propagation of content changes between clients — when one editor types, the other sees the updated content without refreshing. Presence awareness is a separate layer that communicates who is active and where, independent of whether any content has actually changed. A user can be "present" in a document without having made a single edit. The two features complement each other but serve distinct purposes.