First beta release of the comment components
Published: October 26, 2026
v0.1.0
The first versioned release of @sanity/collaboration: React components for commenting on Sanity content, with threads, replies, mentions, reactions and inline comments on Portable Text. The package is in beta, so a breaking change ships in a minor version and is called out in the changelog. This release also settles the entry points and the component names used by the 0.0.0-canary builds.
Entry points
@sanity/collaboration: the comment data types and framework-free helpers (toPlainText,parseCommentAddress,withCommentAddress). It has no React, Sanity UI or SDK dependency, so it also runs on a server.@sanity/collaboration/ui: the components and hooks, includingCommentsProvider,CommentsPanel,CommentThread,Comment,CommentInput,CommentListandPortableTextComments.@sanity/collaboration/sdk: the components wired to the Sanity App SDK (SDKCommentsProvider,DocumentCommentsPanel,InlineCommentsPlugin,useSDKThreadCallbacks). They read and write comments through@sanity/sdk-react/collaboration.
New features
- Translations:
CommentsProviderandSDKCommentsProvidertake alabelsprop (CommentsLabels) that translates every default component below them. A component's ownlabelsand single-string props still override it. See Translate the UI text. - Comments panel:
CommentsPanelhas Open and Resolved tabs and an optional close button (onClose), and each field has an "Add a new comment thread" button above its threads. - Comment layout: the quote sits under the author header.
- Inline highlights: highlights use three shades for nested threads, and only the innermost thread under the pointer hovers or selects. See Comment on Portable Text.
- Deselecting: clicking outside a thread or pressing Escape deselects the active comment, not only clicking the panel background.
Breaking changes from the canary builds
- Entry points: the root entry no longer re-exports the UI. Import components and hooks from
@sanity/collaboration/ui, and the SDK-wired components from@sanity/collaboration/sdk. Connected*is nowSDK*:ConnectedCommentsProviderisSDKCommentsProvider,useConnectedThreadCallbacksisuseSDKThreadCallbacks, andConnectedThreadAction,ConnectedThreadCallbacksandConnectedThreadCallbacksOptionsareSDKThreadAction,SDKThreadCallbacksandSDKThreadCallbacksOptions.CommentThreadCardis nowCommentThread(with itsProps,LabelsandHandletypes), andInlineCommentsLayeris nowPortableTextComments. Thedata-uiattribute is nowCommentThread, so update[data-ui='CommentThreadCard']selectors.- Read-only:
readOnlyis removed from the providers and fromuseCommentsContext(). Passcapabilities={() => READ_ONLY_CAPABILITIES}instead, and leave outonThreadCreateto hide the add-thread buttons.canResolvenow defaults totrueand covers reopening too, and the newcanCreatecapability covers retrying a failed create. - Prop renames:
InlineCommentHighlight'sactiveis nowselected(thedata-activeattribute is unchanged), andCommentTimestamp'sdateandeditedAtare nowcreatedAtandlastEditedAt. showContentSnapshotsmoves fromCommentsProvidertoCommentsPanel.CommentReactions.canReactis removed. PassonReactionToggleto make the reactions interactive.CommentList'srenderFieldFooteris nowrenderFieldAction, and thesortprop onCommentListandCommentsPanel(and theCommentListSorttype) is removed. Threads are always sorted newest activity first.